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 39024 - NPE when switching projects
Summary: NPE when switching projects
Status: RESOLVED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Infrastructure (show other bugs)
Version: 3.x
Hardware: PC Windows ME/2000
: P2 blocker (vote)
Assignee: Pavel Buzek
URL:
Keywords:
: 38960 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-01-20 20:29 UTC by Chris Kutler
Modified: 2004-01-22 22:42 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
log file (296.05 KB, text/plain)
2004-01-20 20:30 UTC, Chris Kutler
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Kutler 2004-01-20 20:29:34 UTC
I switched from a project to the default project
and got an NPE

java.lang.NullPointerException
	at
org.netbeans.modules.j2ee.deployment.config.ConfigurationStorage.<init>(ConfigurationStorage.java:81)
	at
org.netbeans.modules.j2ee.deployment.impl.projects.J2eeDeploymentLookup.getStorage(J2eeDeploymentLookup.java:95)
	at
org.netbeans.modules.j2ee.deployment.impl.projects.J2eeDeploymentLookup.<init>(J2eeDeploymentLookup.java:62)
	at
org.netbeans.modules.j2ee.deployment.devmodules.spi.J2eeModuleProvider.cookieToAdd(J2eeModuleProvider.java:49)
	at
org.netbeans.modules.web.context.WebContextObject.<init>(WebContextObject.java:177)
	at
org.netbeans.modules.web.context.WebContextLoader.handleFindDataObject(WebContextLoader.java:80)
	at
org.openide.loaders.DataObjectPool.handleFindDataObject(DataObjectPool.java:111)
	at
org.openide.loaders.DataLoader.findDataObject(DataLoader.java:233)
	at
org.openide.loaders.DataLoaderPool.findDataObject(DataLoaderPool.java:365)
	at
org.openide.loaders.DataLoaderPool.findDataObject(DataLoaderPool.java:325)
	at
org.openide.loaders.DataObject.find(DataObject.java:449)
	at
org.netbeans.modules.web.context.WebContextLoader.findContext(WebContextLoader.java:132)
	at
org.netbeans.modules.web.context.WebClassesObject.ensureRoot(WebClassesObject.java:48)
	at
org.netbeans.modules.web.context.WebClassesObject.createNodeDelegate(WebClassesObject.java:73)
	at
org.openide.loaders.DataObject$1.run(DataObject.java:242)
	at org.openide.util.Mutex.readAccess(Mutex.java:233)
	at
org.openide.loaders.DataObject.getNodeDelegate(DataObject.java:238)
	at
org.openide.loaders.DataFolder.getClonedNodeDelegate(DataFolder.java:420)
	at
org.openide.loaders.FolderChildren.createNodes(FolderChildren.java:131)
	at
org.openide.nodes.Children$Keys$KE.nodes(Children.java:1987)
	at
org.openide.nodes.ChildrenArray.nodesFor(ChildrenArray.java:109)
	at
org.openide.nodes.Children$Info.nodes(Children.java:1083)
	at
org.openide.nodes.Children.updateAdd(Children.java:891)
	at
org.openide.nodes.Children.setEntries(Children.java:678)
	at
org.openide.nodes.Children$3.run(Children.java:1878)
	at org.openide.util.Mutex.postRequest(Mutex.java:863)
	at
org.openide.util.Mutex.postWriteRequest(Mutex.java:363)
	at
org.openide.nodes.Children$Keys.applyKeys(Children.java:1886)
	at
org.openide.nodes.Children$Keys.setKeys(Children.java:1845)
	at
org.openide.loaders.FolderChildren.access$500(FolderChildren.java:31)
	at
org.openide.loaders.FolderChildren$ChildrenRefreshRunnable.run(FolderChildren.java:249)
	at org.openide.util.Task.run(Task.java:136)
	at
org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:330)
[catch] at
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:678)
Comment 1 Chris Kutler 2004-01-20 20:30:26 UTC
Created attachment 12986 [details]
log file
Comment 2 Pavel Buzek 2004-01-21 18:49:17 UTC
will fix for 3.6
pls next time use attachment for ex trace (that's a general rule for
nb issuezilla)
Comment 3 Petr Jiricka 2004-01-21 19:44:14 UTC
*** Issue 38960 has been marked as a duplicate of this issue. ***
Comment 4 Pavel Buzek 2004-01-22 22:42:22 UTC
The problem is that when switching project web module context is being
recognized again by loader again, the new data object tries to check
if the context path is initialized and it finds the configuration File
but there is no FileObject for it already! I am adding check for this
in ConfigurationStorage. This is similar to what was added into
J2eeDeploymentLookup recently (for the same reason -- create new web
module and unmount it immediately). This fixes the problem, although a
'nicer' solution would be to avoid invalidation of
WebContextDataObject at this point.