This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 84608 - Validation problem related to readonly models
Summary: Validation problem related to readonly models
Status: VERIFIED FIXED
Alias: None
Product: soa
Classification: Unclassified
Component: BPEL Validation (show other bugs)
Version: 5.x
Hardware: PC Windows XP
: P1 blocker (vote)
Assignee: Praveen Savur
URL:
Keywords:
: 84617 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-09-11 14:11 UTC by Andrei Chistiakov
Modified: 2006-09-14 11:18 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrei Chistiakov 2006-09-11 14:11:03 UTC
Reproduced in build 060910 (JDK 1.6 Beta 2)

To reproduce the bug:
- apply Russian Doll design pattern to the flattened OTA schema.

java.lang.IllegalArgumentException: Model source is read-only.
	at
org.netbeans.modules.xml.xam.AbstractModel.startTransaction(AbstractModel.java:322)
	at
org.netbeans.modules.xml.xam.AbstractModel.startTransaction(AbstractModel.java:312)
	at
org.netbeans.modules.bpel.model.validation.schema.BPELSchemaValidator.validate(BPELSchemaValidator.java:109)
	at org.netbeans.modules.xml.xam.spi.Validation.validate(Validation.java:78)
	at org.netbeans.modules.xml.axi.impl.AXIModelImpl.validate(AXIModelImpl.java:222)
	at org.netbeans.modules.xml.axi.impl.ModelAccessImpl.sync(ModelAccessImpl.java:75)
...
Comment 1 Chris Webster 2006-09-11 17:39:19 UTC
Assigning to BPEL team as the stack trace is being caused by BPEL validator. 
Comment 2 Michael Frisino 2006-09-11 17:45:40 UTC
praveen can you look at this?
Comment 3 Praveen Savur 2006-09-11 20:55:05 UTC
*** Issue 84617 has been marked as a duplicate of this issue. ***
Comment 4 Praveen Savur 2006-09-11 22:47:28 UTC
This particular case is fixed by having the BPELSchemaValidator ignore read-only
schema model at the beginning itself rather than later.

This is a generic bug in bpel validators that happens when a bpel file is
read-only and a validator attempts to start a trasaction before beginning to
validate. 
Comment 5 Michael Frisino 2006-09-12 03:54:09 UTC
which file was read only - the bpel file or the schema file?

what are the conditions that led to the read only status?

Can you clarify in description of fix, what are the implications for validation.
What apsect  of validation is being "skipped"?
Comment 6 Praveen Savur 2006-09-13 20:13:24 UTC
Updated 'Summary' of the bug to reflect the reason that this issue happens on
validating read only models.

XAM model does not allow transaction to be started on read-only models. Added
check so that before beginning a trasaction, validators will check whether the
model is editable. And no transaction will be started for read-only models/files. 

To answer question on how the readonly models get created: Using windows
properties set the bpel file as readonly file. Then the model will be readonly. 

To answer question "Can you clarify in description of fix, what are the
implications for validation.
What apsect  of validation is being "skipped"?
The original bug was reported on a readonly schema model. The BPEL Schema
validator was starting a transaction on the schema model and then ignoring it as
it was a schema model. Here I only modified it so that the BPELSchemaValidator
first checks whether it is a bpel model and then proceeds. That way we do not
unnecessarily start and end a transaction on a schema model.




Comment 7 Andrei Chistiakov 2006-09-14 11:18:00 UTC
Verified in build 060913.