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 126939 - opening a layer xml file in any project other than module project throws null pointer exception
Summary: opening a layer xml file in any project other than module project throws null...
Status: RESOLVED FIXED
Alias: None
Product: apisupport
Classification: Unclassified
Component: Project (show other bugs)
Version: 6.x
Hardware: Macintosh (x86) Windows XP
: P2 blocker (vote)
Assignee: Jesse Glick
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-07 18:24 UTC by Srinivasan Chikkala
Modified: 2008-02-08 01:23 UTC (History)
0 users

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 Srinivasan Chikkala 2008-02-07 18:24:46 UTC
If you have a xml file with layer filesytem xml content in any project other than nb module project, opening that file
throws the following null pointer exception. In some cases like bpel project, the project view can not show any files
after this exception.

How to reproduce.
1. create a java application or bpel project
2. create a xml file in that project source
3. update the xml file with a sample netbeans layer xml content and save. you get the exception. If you try to open it
also you will get the null pointer exception


java.lang.NullPointerException
	at org.netbeans.modules.apisupport.project.layers.LayerUtils$LayerHandle.getLayerFile(LayerUtils.java:507)
	at org.netbeans.modules.apisupport.project.layers.LayerNode$1EP.getEnvironment(LayerNode.java:120)
	at org.netbeans.core.xml.FileEntityResolver.findLookup(FileEntityResolver.java:196)
	at org.netbeans.core.xml.FileEntityResolver.access$200(FileEntityResolver.java:90)
	at org.netbeans.core.xml.FileEntityResolver$Lkp.update(FileEntityResolver.java:550)
	at org.netbeans.core.xml.FileEntityResolver$Lkp.beforeLookup(FileEntityResolver.java:513)
	at org.openide.util.lookup.ProxyLookup$R.myBeforeLookup(ProxyLookup.java:616)
	at org.openide.util.lookup.ProxyLookup$R.computeResult(ProxyLookup.java:491)
	at org.openide.util.lookup.ProxyLookup$R.allItems(ProxyLookup.java:482)
	at org.openide.loaders.XMLDataObjectInfoParser.lookupCookie(XMLDataObjectInfoParser.java:182)
	at org.openide.loaders.XMLDataObject.getCookie(XMLDataObject.java:305)
	at org.netbeans.modules.xml.XMLDataObject.getCookie(XMLDataObject.java:196)
	at org.openide.loaders.DataNode.getCookie(DataNode.java:419)
	at org.openide.actions.SaveAction.getSaveMessage(SaveAction.java:116)
	at org.openide.actions.SaveAction.performAction(SaveAction.java:81)
	at org.openide.util.actions.NodeAction$DelegateAction$1.run(NodeAction.java:581)
	at org.netbeans.modules.openide.util.ActionsBridge.doPerformAction(ActionsBridge.java:77)
	at org.openide.util.actions.NodeAction$DelegateAction.actionPerformed(NodeAction.java:577)
	at org.openide.windows.TopComponent.processKeyBinding(TopComponent.java:971)
	at javax.swing.JComponent.processKeyBindings(JComponent.java:2818)
	at javax.swing.JComponent.processKeyEvent(JComponent.java:2735)
	at java.awt.Component.processEvent(Component.java:5294)
	at java.awt.Container.processEvent(Container.java:1966)
	at java.awt.Component.dispatchEventImpl(Component.java:3984)
	at java.awt.Container.dispatchEventImpl(Container.java:2024)
	at java.awt.Component.dispatchEvent(Component.java:3819)
	at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1826)
	at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:681)
	at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:938)
	at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:810)
	at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:645)
	at java.awt.Component.dispatchEventImpl(Component.java:3857)
	at java.awt.Container.dispatchEventImpl(Container.java:2024)
	at java.awt.Window.dispatchEventImpl(Window.java:1791)
	at java.awt.Component.dispatchEvent(Component.java:3819)
[catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
	at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Comment 1 Jesse Glick 2008-02-08 01:23:34 UTC
627aef204f3f