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 147908 - NPE while creating schema import in a wsdl
Summary: NPE while creating schema import in a wsdl
Status: VERIFIED FIXED
Alias: None
Product: xml
Classification: Unclassified
Component: WSDL Tools (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: Shivanand Kini
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-22 17:41 UTC by Samaresh Panda
Modified: 2008-10-20 21:44 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
sample project (101.47 KB, application/x-compressed)
2008-09-23 03:45 UTC, Samaresh Panda
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Samaresh Panda 2008-09-22 17:41:04 UTC
- In a Java App, create a new WSDL
- Right click on root node, select Add Schema Import...
- Browse by File, drill down to the folders that contain schemas
- You'll see NPE.
Comment 1 Samaresh Panda 2008-09-22 17:42:28 UTC
java.lang.NullPointerException
	at org.netbeans.modules.xml.wsdl.ui.view.SchemaReferenceDecorator.validate(SchemaReferenceDecorator.java:89)
	at org.netbeans.modules.xml.wsdl.ui.view.SchemaReferenceDecorator.getHtmlDisplayName(SchemaReferenceDecorator.java:162)
	at
org.netbeans.modules.xml.xam.ui.customizer.ExternalReferenceDataNode.getHtmlDisplayName(ExternalReferenceDataNode.java:183)
	at org.openide.explorer.view.VisualizerNode.getHtmlDisplayName(VisualizerNode.java:567)
	at org.openide.explorer.view.NodeRenderer.getTreeCellRendererComponent(NodeRenderer.java:125)
	at javax.swing.plaf.basic.BasicTreeUI$NodeDimensionsHandler.getNodeDimensions(BasicTreeUI.java:2709)
	at javax.swing.tree.AbstractLayoutCache.getNodeDimensions(AbstractLayoutCache.java:475)
	at javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.updatePreferredSize(VariableHeightLayoutCache.java:1342)
	at javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.expand(VariableHeightLayoutCache.java:1478)
	at javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.expand(VariableHeightLayoutCache.java:1270)
	at javax.swing.tree.VariableHeightLayoutCache.ensurePathIsExpanded(VariableHeightLayoutCache.java:966)
	at javax.swing.tree.VariableHeightLayoutCache.setExpandedState(VariableHeightLayoutCache.java:164)
	at javax.swing.plaf.basic.BasicTreeUI.updateExpandedDescendants(BasicTreeUI.java:1648)
	at javax.swing.plaf.basic.BasicTreeUI$Handler.treeExpanded(BasicTreeUI.java:3721)
.....
Comment 2 Shivanand Kini 2008-09-22 23:20:27 UTC
I was not able to reproduce this. Can you attach the schema files that you were using when doing this?
Comment 3 Samaresh Panda 2008-09-23 03:45:49 UTC
Created attachment 70244 [details]
sample project
Comment 4 Samaresh Panda 2008-09-23 03:48:53 UTC
kini, pl. use the attached project (jar xvf JavaApplication2.jar). Use 'sample' package to create WSDL and also try to
import schema from the same package, you'll see the exception. Let me know if you need further help.
Comment 5 Shivanand Kini 2008-09-23 20:14:35 UTC
Thanks for the project.
There is a blank schema file, the models state is not well formed. 
Will add a check for this.
Comment 6 Shivanand Kini 2008-09-23 22:29:13 UTC
Fixed.
Changeset:
http://hg.netbeans.org/main/rev/f85b4efd0ce8
Comment 7 Shivanand Kini 2008-09-23 23:19:43 UTC
Fixed in soa-dev repository too.
Changeset: http://hg.netbeans.org/soa-dev/rev/aa00b9fdadd3
Comment 8 ggenipudi 2008-10-20 21:44:32 UTC
Tested and verified using NetBeans IDE 6.1 (Build 200810140114) and was able to import XSD without nullpointer exception.