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 32166 - IllegalStateException is thrown when a web module is unmounted
Summary: IllegalStateException is thrown when a web module is unmounted
Status: VERIFIED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: Code (show other bugs)
Version: 3.x
Hardware: PC Windows ME/2000
: P1 blocker (vote)
Assignee: _ rkubacki
URL:
Keywords: RANDOM, THREAD
Depends on:
Blocks:
 
Reported: 2003-03-20 15:40 UTC by Milan Kuchtiak
Modified: 2003-04-03 11:21 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
rough patch for this bug and 31647 (18.73 KB, patch)
2003-03-24 18:06 UTC, _ rkubacki
Details | Diff
the same patch against release35 branch (19.34 KB, patch)
2003-03-24 18:28 UTC, _ rkubacki
Details | Diff
patch for release35 (36.72 KB, patch)
2003-03-25 17:29 UTC, _ rkubacki
Details | Diff
refined patch for release35 (37.85 KB, patch)
2003-03-27 14:41 UTC, _ rkubacki
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Milan Kuchtiak 2003-03-20 15:40:52 UTC
Release3.5 build : 200303182350

The exception is thrown irregularily, but quite often.
Try to mount and unmount a web module several times.

Exception :

java.lang.IllegalStateException
	at
org.netbeans.modules.web.context.WebContextObject.getClassesBase(WebContextObject.java:1065)
	at
org.netbeans.modules.web.context.WebClassesObject.ensureRoot(WebClassesObject.java:50)
	at
org.netbeans.modules.web.context.WebClassesObject.createNodeDelegate(WebClassesObject.java:70)
	at
org.openide.loaders.DataObject$1.run(DataObject.java:242)
	at org.openide.util.Mutex.readAccess(Mutex.java:239)
	at
org.openide.loaders.DataObject.getNodeDelegate(DataObject.java:238)
	at
org.openide.loaders.DataFolder.getClonedNodeDelegate(DataFolder.java:414)
	at
org.openide.loaders.FolderChildren.createNodes(FolderChildren.java:132)
	at
org.openide.nodes.Children$Keys$KE.nodes(Children.java:1978)
	at
org.openide.nodes.ChildrenArray.nodesFor(ChildrenArray.java:109)
	at
org.openide.nodes.Children$Info.nodes(Children.java:1072)
	at
org.openide.nodes.Children.updateAdd(Children.java:880)
	at
org.openide.nodes.Children.setEntries(Children.java:667)
	at
org.openide.nodes.Children$3.run(Children.java:1869)
	at org.openide.util.Mutex.postRequest(Mutex.java:875)
	at
org.openide.util.Mutex.postWriteRequest(Mutex.java:375)
	at
org.openide.nodes.Children$Keys.applyKeys(Children.java:1877)
	at
org.openide.nodes.Children$Keys.setKeys(Children.java:1836)
	at
org.openide.loaders.FolderChildren.access$501(FolderChildren.java:32)
	at
org.openide.loaders.FolderChildren$ChildrenRefreshRunnable.run(FolderChildren.java:250)
	at org.openide.util.Task.run(Task.java:136)
	at
org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:328)
[catch] at
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:668)
INFORMATIONAL *********** Exception occurred
************ at Thu Mar 20 16:27:50 CET 2003
java.io.FileNotFoundException: 
	at
org.openide.loaders.DataShadow.checkOriginal(DataShadow.java:411)
	at
org.openide.loaders.DataShadow.deserialize(DataShadow.java:323)
	at
org.netbeans.modules.web.context.WebAppObject.deserialize0(WebAppObject.java:92)
[catch] at
org.netbeans.modules.web.context.WebAppLoader.handleFindDataObject(WebAppLoader.java:48)
	at
org.openide.loaders.DataLoader.findDataObject(DataLoader.java:233)
	at
org.openide.loaders.DataLoaderPool.findDataObject(DataLoaderPool.java:360)
	at
org.openide.loaders.DataLoaderPool.findDataObject(DataLoaderPool.java:320)
	at
org.openide.loaders.DataObject.find(DataObject.java:447)
	at
org.openide.loaders.FolderList.createObjects(FolderList.java:574)
	at
org.openide.loaders.FolderList.getObjects(FolderList.java:467)
	at
org.openide.loaders.FolderList.access$200(FolderList.java:50)
	at
org.openide.loaders.FolderList$ListTask.run(FolderList.java:829)
	at org.openide.util.Task.run(Task.java:136)
	at
org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:328)
	at
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:668)
Comment 1 Mikhail Romanov 2003-03-22 00:02:46 UTC
BugTraq bug #4836055 describes steps for persistent reproducing of
this bug.
Comment 2 _ rkubacki 2003-03-24 18:06:09 UTC
Created attachment 9504 [details]
rough patch for this bug and 31647
Comment 3 _ rkubacki 2003-03-24 18:16:28 UTC
Reported exception is not the only problem. Sometimes the classes FS
or some of libs or not unmounted. 

The reason is that though WebContextObject is invalidated during
unmount operation (by setValid(false) call) it is created again from
different places. 
1) If it is recreated from DataShadow.updateShadowOriginal later than
classes FS is unmounted this exception is thrown. (WebAppObject is
subclassed DataShadow used as project view of web module.) Note that
this is likely problem with DataShadow that does update even when the
shadow in not valid anymore.

2) Also it can be recreated by DataObject.find() call from
ProjectViewManager. Then call to WCO.destroyContext is executed on a
wrong instance of WCO. It means not the one that keeps track of
mounted libs and classesFS.
Comment 4 _ rkubacki 2003-03-24 18:28:15 UTC
Created attachment 9505 [details]
the same patch against release35 branch
Comment 5 _ rkubacki 2003-03-25 17:01:27 UTC
The patch doesn't solve case when empty VCS filesystem and after
checkout its root is recognized as WebContextObject -> the same
exception is thrown.
Comment 7 _ rkubacki 2003-03-25 17:29:58 UTC
Created attachment 9524 [details]
patch for release35
Comment 8 _ rkubacki 2003-03-26 09:11:00 UTC
raising priority to P1 per webapps team agreement. This needs to be
treated as a real showstopper.
Comment 9 _ rkubacki 2003-03-27 14:41:59 UTC
Created attachment 9569 [details]
refined patch for release35
Comment 10 _ rkubacki 2003-03-27 14:43:29 UTC
Patch was enhanced to solve 48360555 not only in NetBeans but also in S1S.
Comment 11 _ rkubacki 2003-03-28 10:41:45 UTC
Reviewed by Petr Jiricka and confirmed by Misha Romanov that it helps.
Comment 12 _ ttran 2003-03-28 12:50:56 UTC
approved for 3.5
Comment 14 Jan Becicka 2003-04-01 16:30:45 UTC
This issue was a qbuild stopper. See
http://qa.netbeans.org/q-builds/Q-build-report-200303252350.html

Did you merge the fix into QBE branch?
Thanks
Comment 15 _ rkubacki 2003-04-02 06:23:47 UTC
I live under impression that Q-builds for r35 are stopped now and we
wait for beta build. I'm not going to do any merges now unless anyone
convince me that we really have to promote this build.
Comment 16 Jan Becicka 2003-04-02 08:40:08 UTC
We have to promote this qbuild, because we already started 
QBuild process for the build 200303252350 and we should 
finish it.
I will wait for the merge unless anyone convince me, that 
qbuild process for the 200303252350 was started by mistake.
Comment 17 Jan Becicka 2003-04-02 08:40:27 UTC
We have to promote this qbuild, because we already started 
QBuild process for the build 200303252350 and we should 
finish it.
I will wait for the merge unless anyone convince me, that 
qbuild process for the 200303252350 was started by mistake.
Comment 18 Jason Rush 2003-04-02 23:52:46 UTC
Verified in Nevada build 030401.
Comment 19 _ rkubacki 2003-04-03 11:21:33 UTC
merged to QBuild