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 82400 - NPE in AXIModelImpl when open j2ee webservices schema file
Summary: NPE in AXIModelImpl when open j2ee webservices schema file
Status: VERIFIED FIXED
Alias: None
Product: xml
Classification: Unclassified
Component: Schema Tools (show other bugs)
Version: 5.x
Hardware: All All
: P1 blocker (vote)
Assignee: Samaresh Panda
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-10 15:14 UTC by Nam Nguyen
Modified: 2006-09-24 17:54 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
schema #1 (44.82 KB, text/xml)
2006-08-10 15:16 UTC, Nam Nguyen
Details
main schema (14.35 KB, text/xml)
2006-08-10 15:17 UTC, Nam Nguyen
Details
full stack (6.34 KB, application/octet-stream)
2006-08-10 15:18 UTC, Nam Nguyen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nam Nguyen 2006-08-10 15:14:35 UTC
- 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)
Comment 1 Nam Nguyen 2006-08-10 15:16:01 UTC
Created attachment 32766 [details]
schema #1
Comment 2 Nam Nguyen 2006-08-10 15:17:32 UTC
Created attachment 32767 [details]
main schema
Comment 3 Nam Nguyen 2006-08-10 15:18:40 UTC
Created attachment 32768 [details]
full stack
Comment 4 Samaresh Panda 2006-08-10 18:23:31 UTC
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.
Comment 5 Nam Nguyen 2006-08-10 19:24:06 UTC
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.
Comment 6 Samaresh Panda 2006-08-10 20:26:40 UTC
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.
Comment 7 Nam Nguyen 2006-09-24 17:54:42 UTC
VERIFIED