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 95023 - WSDL editor opens with NPE when schema imports are broken
Summary: WSDL editor opens with NPE when schema imports are broken
Status: VERIFIED FIXED
Alias: None
Product: xml
Classification: Unclassified
Component: WSDL Model (show other bugs)
Version: 5.x
Hardware: All All
: P1 blocker (vote)
Assignee: Nam Nguyen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-08 23:43 UTC by Alexey Yarmolenko
Modified: 2007-02-18 22:57 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
test project (13.75 KB, application/octet-stream)
2007-02-08 23:44 UTC, Alexey Yarmolenko
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Yarmolenko 2007-02-08 23:43:23 UTC
Steps to reproduce
-Unzip the project attached.
-Open this project in IDE.
-Try to open any WSDl wile in editor

NPE message dialog will appear. If you close it another one pops up, making IDE
completely unusable.

java.lang.NullPointerException
	at
org.netbeans.modules.xml.wsdl.model.extensions.xsd.impl.SchemaReferenceImpl.get(SchemaReferenceImpl.java:66)
	at
org.netbeans.modules.xml.wsdl.model.extensions.xsd.impl.SchemaReferenceImpl.get(SchemaReferenceImpl.java:40)
	at
org.netbeans.modules.xml.wsdl.ui.view.treeeditor.PartNode.getHtmlDisplayName(PartNode.java:291)
	at
org.openide.explorer.view.VisualizerNode.getHtmlDisplayName(VisualizerNode.java:518)
	at
org.openide.explorer.view.NodeRenderer.getTreeCellRendererComponent(NodeRenderer.java:106)
	at
javax.swing.plaf.basic.BasicTreeUI$NodeDimensionsHandler.getNodeDimensions(BasicTreeUI.java:2807)
	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.getXOrigin(VariableHeightLayoutCache.java:1125)
	at
javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.getNodeBounds(VariableHeightLayoutCache.java:1112)
	at
javax.swing.tree.VariableHeightLayoutCache.getBounds(VariableHeightLayoutCache.java:202)
	at javax.swing.plaf.basic.BasicTreeUI.paint(BasicTreeUI.java:1191)
	at javax.swing.plaf.ComponentUI.update(ComponentUI.java:143)
	at javax.swing.JComponent.paintComponent(JComponent.java:758)
	at javax.swing.JComponent.paint(JComponent.java:1022)
	at org.openide.explorer.view.TreeView$ExplorerTree.access$1101(TreeView.java:1423)
	at org.openide.explorer.view.TreeView$ExplorerTree.guardedPaint(TreeView.java:1557)
	at org.openide.explorer.view.TreeView$ExplorerTree.access$1400(TreeView.java:1423)
	at
org.openide.explorer.view.TreeView$ExplorerTree$GuardedActions.run(TreeView.java:1837)
	at org.openide.util.Mutex.readAccess(Mutex.java:227)
	at
org.openide.explorer.view.TreeView$ExplorerTree$GuardedActions.<init>(TreeView.java:1831)
	at org.openide.explorer.view.TreeView$ExplorerTree.paint(TreeView.java:1534)
	at javax.swing.JComponent.paintChildren(JComponent.java:859)
	at javax.swing.JComponent.paint(JComponent.java:1031)
	at javax.swing.JViewport.paint(JViewport.java:747)
	at javax.swing.JComponent.paintChildren(JComponent.java:859)
	at javax.swing.JComponent.paint(JComponent.java:1031)
	at javax.swing.JComponent.paintChildren(JComponent.java:859)
	at javax.swing.JComponent.paint(JComponent.java:1031)
	at javax.swing.JComponent.paintChildren(JComponent.java:859)
	at javax.swing.JComponent.paint(JComponent.java:1031)
	at javax.swing.JComponent.paintChildren(JComponent.java:859)
	at javax.swing.JComponent.paint(JComponent.java:1031)
	at javax.swing.JComponent.paintChildren(JComponent.java:859)
	at javax.swing.JComponent.paint(JComponent.java:1031)
	at javax.swing.JComponent.paintChildren(JComponent.java:859)
	at javax.swing.JComponent.paint(JComponent.java:1031)
	at javax.swing.JComponent.paintChildren(JComponent.java:859)
	at javax.swing.JComponent.paint(JComponent.java:1031)
	at javax.swing.JComponent.paintChildren(JComponent.java:859)
	at javax.swing.JComponent.paint(JComponent.java:1031)
	at org.netbeans.core.windows.view.ui.MultiSplitPane.paint(MultiSplitPane.java:297)
	at javax.swing.JComponent.paintChildren(JComponent.java:859)
	at javax.swing.JComponent.paint(JComponent.java:1031)
	at org.netbeans.core.windows.view.ui.MultiSplitPane.paint(MultiSplitPane.java:297)
	at javax.swing.JComponent.paintChildren(JComponent.java:859)
	at javax.swing.JComponent.paint(JComponent.java:1031)
	at javax.swing.JComponent.paintChildren(JComponent.java:859)
	at javax.swing.JComponent.paint(JComponent.java:1031)
	at javax.swing.JLayeredPane.paint(JLayeredPane.java:564)
	at javax.swing.JComponent.paintChildren(JComponent.java:859)
	at javax.swing.JComponent.paint(JComponent.java:1031)
	at javax.swing.JComponent.paintChildren(JComponent.java:859)
	at javax.swing.JComponent.paint(JComponent.java:1031)
	at javax.swing.JComponent.paintChildren(JComponent.java:859)
	at javax.swing.JComponent.paint(JComponent.java:1031)
	at javax.swing.JLayeredPane.paint(JLayeredPane.java:564)
	at javax.swing.JComponent.paintChildren(JComponent.java:859)
	at javax.swing.JComponent.paintToOffscreen(JComponent.java:5111)
	at
javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(RepaintManager.java:1386)
	at javax.swing.RepaintManager$PaintManager.paint(RepaintManager.java:1317)
	at
javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:301)
	at javax.swing.RepaintManager.paint(RepaintManager.java:1132)
	at javax.swing.JComponent.paint(JComponent.java:1008)
	at java.awt.GraphicsCallback$PaintCallback.run(GraphicsCallback.java:21)
	at sun.awt.SunGraphicsCallback.runOneComponent(SunGraphicsCallback.java:60)
	at sun.awt.SunGraphicsCallback.runComponents(SunGraphicsCallback.java:97)
	at java.awt.Container.paint(Container.java:1797)
	at org.netbeans.core.windows.view.ui.MainWindow.paint(MainWindow.java:547)
	at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:738)
	at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:683)
	at javax.swing.RepaintManager.seqPaintDirtyRegions(RepaintManager.java:663)
[catch] at
javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:128)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
	at
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
	at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
Comment 1 Alexey Yarmolenko 2007-02-08 23:44:22 UTC
Created attachment 38268 [details]
test project
Comment 2 Shivanand Kini 2007-02-08 23:55:44 UTC
The xsd imports are not in the types section. 
The SchemaReferenceImpl class assumes that the xsd imports are always in types
section.
assigning to wsdl model.
Comment 3 Nam Nguyen 2007-02-09 02:28:04 UTC
Fixed by checking for null 'types'.  Checked in both trunk and release551.
Comment 4 jlautz 2007-02-18 22:57:20 UTC
Verified on Windows XP with Gavotte 070216_24 and JDK 1.5.0_09.