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 79931

Summary: NPE when Right-click newly created XML schema source code.
Product: xml Reporter: Sherry Barkodar <barkodar>
Component: Schema ToolsAssignee: bhate <bhate>
Status: CLOSED FIXED    
Severity: blocker CC: cwebster
Priority: P1    
Version: 5.x   
Hardware: PC   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description Sherry Barkodar 2006-07-10 19:24:31 UTC
using NetBeans 5.5 Build 200607040200
Create a Project.
Create a New XML Schema.
Open the source.
Right-click the XML source the following NPE comes up:
java.util.EmptyStackException
	at java.util.Stack.peek(Stack.java:79)
	at
org.netbeans.modules.xml.xdm.visitor.NodeByPositionVisitor.getContainingElement(NodeByPositionVisitor.java:58)
	at
org.netbeans.modules.xml.xdm.xam.XDMAccess.getContainingElement(XDMAccess.java:280)
	at
org.netbeans.modules.xml.xdm.xam.XDMAccess.getContainingElement(XDMAccess.java:61)
	at
org.netbeans.modules.xml.xam.dom.AbstractDocumentModel.findComponent(AbstractDocumentModel.java:329)
	at
org.netbeans.modules.xml.schema.core.multiview.SchemaSourceMultiViewElement.findNode(SchemaSourceMultiViewElement.java:363)
	at
org.netbeans.modules.xml.schema.core.multiview.SchemaSourceMultiViewElement.access$200(SchemaSourceMultiViewElement.java:66)
	at
org.netbeans.modules.xml.schema.core.multiview.SchemaSourceMultiViewElement$4$1.run(SchemaSourceMultiViewElement.java:338)
	at org.openide.util.Mutex.readAccess(Mutex.java:227)
	at
org.netbeans.modules.xml.schema.core.multiview.SchemaSourceMultiViewElement$4.run(SchemaSourceMultiViewElement.java:334)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:499)
[catch] at
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:932)
Comment 1 Sherry Barkodar 2006-07-10 19:52:25 UTC
I just realized this happens when you click (not just right-click)On the comment
part of the source code.
Comment 2 bhate 2006-07-10 20:01:49 UTC
This fix is in xdm NodeByPositionVisitor.java
fix check in , will be there after 06/09/06 build.
Comment 3 Sherry Barkodar 2006-07-20 20:31:50 UTC
Haven't seen this recently. No NPE.
Comment 4 htt 2006-07-20 21:35:43 UTC
Verified in Milestone Build 16.
Comment 5 pcmreddy 2006-07-23 03:04:24 UTC
Issue is verified and Bug owner is agreed to close this issue.