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 20743 - Mounted JAR files locked
Summary: Mounted JAR files locked
Status: VERIFIED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Filesystems (show other bugs)
Version: 3.x
Hardware: PC Windows ME/2000
: P3 blocker (vote)
Assignee: rmatous
URL:
Keywords:
: 8434 20952 21803 24473 25852 26866 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-02-21 06:45 UTC by Alexander Klyubin
Modified: 2008-12-23 14:22 UTC (History)
5 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 Alexander Klyubin 2002-02-21 06:45:48 UTC
I have several JAR files mounted in Filesystems tab of Explorer panel. As soon 
as I open/expand one of those nodes (browse classes inside) the JAR file 
becomes locked and cannot be deleted afterwards until I either open a different 
project or close NetBeans. This even happens if one collapses all children of 
the node corresponding to the JAR file.
Comment 1 rmatous 2002-03-21 17:42:28 UTC
*** Issue 20952 has been marked as a duplicate of this issue. ***
Comment 2 rmatous 2002-03-22 14:12:15 UTC
*** Issue 21803 has been marked as a duplicate of this issue. ***
Comment 3 Svata Dedic 2002-03-25 08:55:08 UTC
Java module is searching all JARs with COMPILE capability, when it
collects contents of a package during parsing. It keeps ZipEntries for
some period of time, so the FileObject from the JAR is alive and the
JAR file is, presumably, open.
Radek, do you have any idea how to handle this ?
Comment 4 Jesse Glick 2002-05-06 16:45:47 UTC
I'm not sure this is a bug. If the JAR is not deletable after
*unmounting* the JAR filesystem, that is probably a bug. But if it is
not deleted while the JAR is mounted, surely that is as designed
(WONTFIX): Windows has mandatory file locks, there is not much to be done.
Comment 5 rmatous 2002-06-04 12:21:22 UTC
*** Issue 8434 has been marked as a duplicate of this issue. ***
Comment 6 rmatous 2002-06-19 08:29:44 UTC
*** Issue 24473 has been marked as a duplicate of this issue. ***
Comment 7 Marek Grummich 2002-07-22 11:14:55 UTC
Set target milestone to TBD
Comment 8 Marek Grummich 2002-07-22 11:18:08 UTC
Set target milestone to TBD
Comment 9 rmatous 2002-07-23 09:38:11 UTC
*** Issue 25852 has been marked as a duplicate of this issue. ***
Comment 10 Sergey Soldatov 2002-08-05 13:58:55 UTC
I've exactly the same problem. I was unable to delete WEB-
INF node even then jar files was unmounted. How to 
reproduce:
mount a directory with CDShopCart example.
Unmount all jar files from the root filesystems.
Now try to delete WEB-INF node. Following exception will be 
thrown:
Annotation: Cannot delete file WEB-INF/lib/standard.jar in 
C:\Test.
org.openide.filesystems.FSException: Cannot delete file WEB-
INF/lib/standard.jar in C:\Test.
        at org.openide.filesystems.FSException.io
(FSException.java:91)
        at org.openide.filesystems.LocalFileSystem.delete
(LocalFileSystem.java:299)
        at org.netbeans.core.ExLocalFileSystem.delete
(ExLocalFileSystem.java:77)
        at 
org.openide.filesystems.LocalFileSystem$Impl.delete
(LocalFileSystem.java:651)
        at org.openide.filesystems.AbstractFileObject.delete
(AbstractFileObject.java:490)
        at org.openide.loaders.FileEntry.delete
(FileEntry.java:100)
        at org.openide.loaders.MultiDataObject.handleDelete
(MultiDataObject.java:422)
        at org.openide.loaders.DataObject$3.run
(DataObject.java:536)
        at 
org.openide.filesystems.EventControl.runAtomicAction
(EventControl.java:89)
        at 
org.openide.filesystems.FileSystem.runAtomicAction
(FileSystem.java:416)
        at org.openide.loaders.DataObject.delete
(DataObject.java:534)
        at org.openide.loaders.DataFolder.handleDelete
(DataFolder.java:596)
        at org.openide.loaders.DataObject$3.run
(DataObject.java:536)
        at 
org.openide.filesystems.EventControl.runAtomicAction
(EventControl.java:89)
        at 
org.openide.filesystems.FileSystem.runAtomicAction
(FileSystem.java:416)
        at org.openide.loaders.DataObject.delete
(DataObject.java:534)
        at org.openide.loaders.DataFolder.handleDelete
(DataFolder.java:596)
        at 
org.netbeans.modules.web.context.WebInfObject.handleDelete
(WebInfObject.java:150)
        at org.openide.loaders.DataObject$3.run
(DataObject.java:536)
        at 
org.openide.filesystems.EventControl.runAtomicAction
(EventControl.java:89)
        at 
org.openide.filesystems.FileSystem.runAtomicAction
(FileSystem.java:416)
        at org.openide.loaders.DataObject.delete
(DataObject.java:534)
        at org.openide.loaders.DataNode.destroy
(DataNode.java:221)
        at org.openide.nodes.FilterNode.destroy
(FilterNode.java:399)
        at org.openide.nodes.FilterNode.destroy
(FilterNode.java:399)
        at 
org.openide.explorer.ExplorerActions$DeleteActionPerformer$D
estroyAtomic.invoke(ExplorerActions.java:531)
        at $Proxy4.run(Unknown Source)
        at 
org.openide.filesystems.EventControl.runAtomicAction
(EventControl.java:89)
        at 
org.openide.filesystems.FileSystem.runAtomicAction
(FileSystem.java:416)
        at 
org.openide.explorer.ExplorerActions$DestroyInvoker.run
(ExplorerActions.java:565)
        at 
org.openide.explorer.ExplorerActions$DeleteActionPerformer.d
oDestroy(ExplorerActions.java:506)
        at 
org.openide.explorer.ExplorerActions$DeleteActionPerformer.p
erformAction(ExplorerActions.java:476)
        at 
org.openide.util.actions.CallbackSystemAction.performAction
(CallbackSystemAction.java:108)
        at 
org.openide.util.actions.CallableSystemAction.actionPerforme
d(CallableSystemAction.java:69)
        at org.netbeans.core.ModuleActions$1.run
(ModuleActions.java:100)
        at org.openide.util.Task.run(Task.java:136)
Comment 11 Lars Oppermann 2002-08-19 09:01:13 UTC
Occures for unmounted jar files in win2000 and winXP. This 
is especially anyoing when you need to mount jars that are 
build by a process outside of netbeans since you simply 
cannot rebiuld them once you have touched them in 
netbeans. Workaround: restarting netbeans or switching 
projects.
Comment 12 schram 2002-10-31 19:23:18 UTC
*** Issue 26866 has been marked as a duplicate of this issue. ***
Comment 13 rmatous 2003-02-20 15:50:39 UTC
Definitely won't be fixed in 3.5.
Comment 14 Jesse Glick 2003-02-20 18:03:17 UTC
See org.netbeans.JarClassLoader for some unpleasant workarounds used
by the module system that may be useful. I have filed Java bugs where
appropriate, but we cannot rely on them being fixed any time soon.
Comment 15 rmatous 2003-03-21 12:15:30 UTC
Fixed in trunk. JarFile is closed as quickly as possible. Streams are
firts copied and then returned.

/cvs/openide/src/org/openide/filesystems/JarFileSystem.java,v  <-- 
JarFileSystem.java
new revision: 1.79; previous revision: 1.78

Comment 16 pzajac 2003-08-18 18:04:32 UTC
The solotion seems be fine. 
Comment 17 Quality Engineering 2008-12-23 14:22:10 UTC
This issue had *1 votes* before move to platform component