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 - NPE on going to Design View when schema is invalid
Summary: NPE on going to Design View when schema is invalid
Status: VERIFIED FIXED
Alias: None
Product: xml
Classification: Unclassified
Component: Schema Tools (show other bugs)
Version: 5.x
Hardware: PC Windows XP
: P1 blocker (vote)
Assignee: bhate
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-05 10:02 UTC by Andrei Chistiakov
Modified: 2006-09-07 09:45 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.