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 84194

Summary: NPE on going to Design View when schema is invalid
Product: xml Reporter: Andrei Chistiakov <ca-nb>
Component: Schema ToolsAssignee: bhate <bhate>
Status: VERIFIED FIXED    
Severity: blocker CC: cwebster, htt, ivansidorkin, kozlov
Priority: P1    
Version: 5.x   
Hardware: PC   
OS: Windows XP   
Issue Type: DEFECT Exception Reporter:

Description Andrei Chistiakov 2006-09-05 10:02:03 UTC
Reproduced in build 060903 (JDK 1.6 Beta 2)

To reproduce the bug:

- open the following schema
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            targetNamespace="http://xml.netbeans.org/schema/newXmlSchema2"
            xmlns:tns="http://xml.netbeans.org/schema/newXmlSchema2"
            elementFormDefault="qualified">
    <xsd:complexType name="CT1">
        <xsd:sequence>
            <xsd:element ref="tns:E1"/>
        </xsd:sequence>
    </xsd:complexType>
</xsd:schema>
- in Schema View select CT1 and invoke 'Go To|Design' popup menu command.

java.lang.NullPointerException
	at
org.netbeans.modules.xml.schema.core.multiview.SchemaABEViewMultiViewElement$1.show(SchemaABEViewMultiViewElement.java:139)
	at
org.netbeans.modules.xml.schema.core.multiview.SchemaMultiViewSupport.viewInSwingThread(SchemaMultiViewSupport.java:261)
	at
org.netbeans.modules.xml.schema.core.multiview.SchemaMultiViewSupport.view(SchemaMultiViewSupport.java:205)
	at
org.netbeans.modules.xml.xam.ui.actions.AbstractShowComponentAction.performAction(AbstractShowComponentAction.java:69)
	at
org.netbeans.modules.xml.xam.ui.actions.GoToAction$ActSubMenuModel.performActionAt(GoToAction.java:223)
	at org.openide.awt.Actions$ISubActionListener.actionPerformed(Actions.java:1000)
	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
...
Comment 1 bhate 2006-09-06 21:39:27 UTC
We need to check the state of aximodel before enabling goto design action.
Fixed in multiviewsupport.canview
Comment 2 Andrei Chistiakov 2006-09-07 09:45:56 UTC
Verified in build 060906_1.