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.
Reproduced in build 060807_2. To reproduce the bug: - open a project that includes PO schema (do not open the schema itself); - apply Russian Doll pattern to the schema; - open the schema; - close the schema, discard changes; - apply Russian Doll pattern to the schema second time. java.lang.NullPointerException at org.netbeans.modules.xml.xam.AbstractComponent.verifyWrite(AbstractComponent.java:188) at org.netbeans.modules.xml.xam.AbstractComponent.insertAtIndex(AbstractComponent.java:321) at org.netbeans.modules.xml.xam.AbstractComponent.insertAtIndex(AbstractComponent.java:339) at org.netbeans.modules.xml.axi.AXIComponent.insertAtIndex(AXIComponent.java:438) at org.netbeans.modules.xml.axi.AXIComponent.addChildAtIndex(AXIComponent.java:430) at org.netbeans.modules.xml.axi.AXIComponent.addChildAtIndex(AXIComponent.java:423) at org.netbeans.modules.xml.axi.impl.AXIModelUpdater.addNewChildren(AXIModelUpdater.java:172) at org.netbeans.modules.xml.axi.impl.AXIModelUpdater.synchronize(AXIModelUpdater.java:133) at org.netbeans.modules.xml.axi.impl.AXIModelUpdater.visitChildren(AXIModelUpdater.java:110) at org.netbeans.modules.xml.axi.impl.AXIModelUpdater.visit(AXIModelUpdater.java:278) at org.netbeans.modules.xml.axi.Compositor.accept(Compositor.java:93) at org.netbeans.modules.xml.axi.impl.AXIModelUpdater.visitChildren(AXIModelUpdater.java:118) at org.netbeans.modules.xml.axi.impl.AXIModelUpdater.visit(AXIModelUpdater.java:226) at org.netbeans.modules.xml.axi.impl.AXIModelUpdater.visit(AXIModelUpdater.java:210) at org.netbeans.modules.xml.axi.Element.accept(Element.java:58) at org.netbeans.modules.xml.axi.impl.AXIModelUpdater.doSync(AXIModelUpdater.java:89) at org.netbeans.modules.xml.axi.impl.AXIModelImpl.doSync(AXIModelImpl.java:144) at org.netbeans.modules.xml.axi.impl.ModelAccessImpl.sync(ModelAccessImpl.java:92) at org.netbeans.modules.xml.xam.AbstractModel.sync(AbstractModel.java:221) at org.netbeans.modules.xml.axi.impl.DefaultSchemaGenerator.transformSchema(DefaultSchemaGenerator.java:151) at org.netbeans.modules.xml.axi.impl.SchemaGeneratorFactoryImpl.transformSchema(SchemaGeneratorFactoryImpl.java:105) at org.netbeans.modules.xml.schema.abe.wizard.SchemaTransformWizard$1.run(SchemaTransformWizard.java:115) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:499) [catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:932)
Created attachment 32662 [details] Sam, please see the attachment, that highlights the navigator. After the second transform the model shows only one element 'purchaseOrder', so I think the transform went OK. The NPE is occuring after transform where I do a force sync.
Sam, please see the attachment, that highlights the navigator. After the second transform the model shows only one element 'purchaseOrder', so I think the transform went OK. The NPE is occuring after transform where I do a force sync. Can you take a look at it. This is reproduced even in 'release55' branch.
When the user discards the changes, model is not updated. That is model is not in sync with the discarded changes and hence when second time when some other pattern is applied, it acts wild.
Looks like the transformation resets the peer for the AXIComponents. As per our discussion, Ayub will need to revisit the way the peers are being set.
Fix for Coke Beta Checking in src/org/netbeans/modules/xml/axi/impl/DefaultSchemaGenerator.java; new revision: 1.1.2.22.2.2; previous revision: 1.1.2.22.2.1 Checking in src/org/netbeans/modules/xml/axi/impl/VenetianBlind.java; new revision: 1.1.2.11.2.2; previous revision: 1.1.2.11.2.1 Checking in src/org/netbeans/modules/xml/axi/impl/GardenOfEden.java; new revision: 1.1.2.15.2.2; previous revision: 1.1.2.15.2.1 Checking in src/org/netbeans/modules/xml/axi/impl/SalamiSlice.java; new revision: 1.1.2.9.2.2; previous revision: 1.1.2.9.2.1 Checking in src/org/netbeans/modules/xml/axi/impl/Util.java; new revision: 1.1.2.45.2.2; previous revision: 1.1.2.45.2.1 Checking in test/unit/src/org/netbeans/modules/xml/axi/resources/courier.xsd; new revision: 1.1.4.1; previous revision: 1.1 Checking in test/unit/src/org/netbeans/modules/xml/axi/SchemaTransformTest.java; new revision: 1.1.2.18.2.2; previous revision: 1.1.2.18.2.1
Verified in build 060810_1.