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 83689 - NPE on showing invalid schema in Design view
Summary: NPE on showing invalid schema in Design view
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: issues@xml
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-29 12:10 UTC by Andrei Chistiakov
Modified: 2006-08-31 13:49 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-08-29 12:10:48 UTC
Reproduced in build 060828 (JDK 1.6 Beta 2)

To reproduce the bug:
- open the following schema
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            targetNamespace="http://xml.netbeans.org/schema/newXMLSchema"
            xmlns:tns="http://xml.netbeans.org/schema/newXMLSchema"
            elementFormDefault="qualified">
    <xsd:element name="newElement" type="xs:string"></xsd:element>
</xsd:schema>
- switch to Design.

java.lang.NullPointerException
	at
org.openide.explorer.ExplorerManager.findExplorerActionsImpl(ExplorerManager.java:763)
	at org.openide.explorer.ExplorerUtils.activateActions(ExplorerUtils.java:185)
	at
org.netbeans.modules.xml.schema.core.multiview.SchemaABEViewMultiViewElement.componentActivated(SchemaABEViewMultiViewElement.java:281)
	at
org.netbeans.core.multiview.MultiViewPeer$SelectionListener.selectionActivatedByButton(MultiViewPeer.java:628)
	at
org.netbeans.core.multiview.MultiViewModel.fireActivateCurrent(MultiViewModel.java:242)
	at
org.netbeans.core.multiview.TabsComponent$ButtonMouseListener.mousePressed(TabsComponent.java:421)
	at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:222)
	at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:221)
...
Comment 1 Chris Webster 2006-08-29 18:57:34 UTC
The problem here was the order of initialization was not creating everything
necessary during the multi-view creation. 

/cvs/xml/xam/src/org/netbeans/modules/xml/xam/spi/Attic/XsdBasedValidator.java,v
 <--  XsdBasedValidator.java
new revision: 1.1.2.20; previous revision: 1.1.2.19
Comment 2 Andrei Chistiakov 2006-08-31 13:49:04 UTC
Verified in build 060831.