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.
1. Create new sample schema - newLoanApplication. 2. Right-click on newLoanApplication.xsd in Projects window, choose Apply Design Pattern. 3. Specify suitable parameters (in this case, select Create Multiply Global Elements) and press Finish. 4. Close newLoanApplication.xsd window and choose Discard changes. 5. Repeat 2 and 3. Result: exception comes. Many different exceptions can come - I got NullPointerException, IllegalArgumentException, AssertionErrorException, ArrayIndexOutOfBoundException
Assertion Error: java.lang.AssertionError at org.netbeans.modules.xml.axi.impl.AXIModelImpl.lookupFromOtherModel(A XIModelImpl.java:112) at org.netbeans.modules.xml.axi.impl.AXIModelBuilder.getAXIComponent(AXI ModelBuilder.java:283) at org.netbeans.modules.xml.axi.impl.AXIModelBuilder.visit(AXIModelBuild er.java:211) at org.netbeans.modules.xml.schema.model.impl.GlobalComplexTypeImpl.acce pt(GlobalComplexTypeImpl.java:114) at org.netbeans.modules.xml.axi.impl.AXIModelBuilder.populateChildren(AX IModelBuilder.java:65) at org.netbeans.modules.xml.axi.impl.ElementImpl.populateChildren(Elemen tImpl.java:272) at org.netbeans.modules.xml.xam.AbstractComponent._getChildren(AbstractC omponent.java:130) at org.netbeans.modules.xml.xam.AbstractComponent.getChildren(AbstractCo mponent.java:114) at org.netbeans.modules.xml.axi.impl.AXIModelUpdater.childExists(AXIMode lUpdater.java:211) at org.netbeans.modules.xml.axi.impl.AXIModelUpdater.removeRemovedChildr en(AXIModelUpdater.java:164) at org.netbeans.modules.xml.axi.impl.AXIModelUpdater.synchronize(AXIMode lUpdater.java:149) at org.netbeans.modules.xml.axi.impl.AXIModelUpdater.visitChildren(AXIMo delUpdater.java:115) at org.netbeans.modules.xml.axi.impl.AXIModelUpdater.visit(AXIModelUpdat er.java:289) at org.netbeans.modules.xml.axi.impl.AXIModelUpdater.visit(AXIModelUpdat er.java:261) at org.netbeans.modules.xml.axi.Element.accept(Element.java:59) at org.netbeans.modules.xml.axi.impl.AXIModelUpdater.doSync(AXIModelUpda ter.java:81) at org.netbeans.modules.xml.axi.impl.AXIModelImpl.doSync(AXIModelImpl.ja va:196) at org.netbeans.modules.xml.axi.impl.ModelAccessImpl.sync(ModelAccessImp l.java:79) at org.netbeans.modules.xml.xam.AbstractModel.sync(AbstractModel.java:23 0) at org.netbeans.modules.xml.axi.impl.AXIModelImpl.sync(AXIModelImpl.java :182) at org.netbeans.modules.xml.axi.impl.DefaultSchemaGenerator$TransformHel per.execute(DefaultSchemaGenerator.java:844) at org.netbeans.modules.xml.axi.impl.DefaultSchemaGenerator.transformSch ema(DefaultSchemaGenerator.java:114) at org.netbeans.modules.xml.axi.impl.SchemaGeneratorFactoryImpl.transfor mSchema(SchemaGeneratorFactoryImpl.java:206) at org.netbeans.modules.xml.schema.abe.wizard.SchemaTransformWizard$1.ru n(SchemaTransformWizard.java:146) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:499) [catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java :932)
If I open the file and apply design pattern, then I do not see exception. ie., with the modified script below 1. Create new sample schema - newLoanApplication. 2. Right-click on newLoanApplication.xsd in Projects window, choose Apply Design Pattern. 3. Specify suitable parameters (in this case, select Create Multiply Global Elements) and press Finish. 4. Close newLoanApplication.xsd window and choose Discard changes. 5. open newLoanApplication.xsd 5. Repeat 2 and 3.
Fixed in release551 branch. Files changed: /cvs/xml/schema/core/src/org/netbeans/modules/xml/schema/core/actions/SchemaTransformAction.java new revision: 1.1.2.11.6.2; previous revision: 1.1.2.11.6.1
Verified that the aforementioned exceptions no longer occur in 070208_8; however, a different issue is found as a side effect of this same scenario (see issue 95013).