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.
- put the attached 2 schemas in same directory - open j2ee_web_services_1_1.xsd. - switch to design view. - expand webservices Get following NPE, for full stack see attachement: java.lang.NullPointerException at org.netbeans.modules.xml.axi.impl.AXIModelImpl.fromSameSchemaModel (AXIModelImpl.java:74) at org.netbeans.modules.xml.axi.impl.AXIComponentCreator.visit (AXIComponentCreator.java:155) at org.netbeans.modules.xml.schema.model.impl.AttributeReferenceImpl.accept (AttributeReferenceImpl.java:57) at org.netbeans.modules.xml.axi.impl.AXIComponentCreator.createNew (AXIComponentCreator.java:53) at org.netbeans.modules.xml.axi.impl.AXIModelBuilder.getAXIComponent (AXIModelBuilder.java:238) at org.netbeans.modules.xml.axi.impl.AXIModelBuilder.visit (AXIModelBuilder.java:135) at org.netbeans.modules.xml.schema.model.impl.AttributeReferenceImpl.accept (AttributeReferenceImpl.java:57) at org.netbeans.modules.xml.axi.impl.AXIModelBuilder.populateChildren (AXIModelBuilder.java:71) at org.netbeans.modules.xml.axi.AXIComponent.populateChildren (AXIComponent.java:366)
Created attachment 32766 [details] schema #1
Created attachment 32767 [details] main schema
Created attachment 32768 [details] full stack
The schema model returns null when I call component.getRef().get() on the following attribute reference: <xsd:attribute ref="xml:lang"/> See line 133 in j2ee_1_4.xsd.
Sam, Whatever cause getRef().get() to return null, the NPE still need to be fix. There are user conditions (could not resolve imported models) that reference.get() will return null. The other part, fail to resolve 'xml:lang' could be different bug or enhancement.
Fix integrated: AXIComponentCreator.java: new revision: 1.1.2.10; However, note that, DV will not be able to display this attribute-reference, since the referent doesn't exist. In DV, no distiction is made between Attribute, AttributeRef and Element, ElementRef. You may want to create a separate bug.
VERIFIED