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.
[Boston1152] [main trunk] steps to reproduce: 1) create jar in some already mounted filesystem 2) mount it as separate filesystem 3) try to delete jar - org.openide.filesystems.FSException occurs (see attach.) 4) unmount filesystem 5) try again to delete the jar - the same exception i thrown - the only workaround is to restart IDE (note: format of this exception's dialog window is strongly depending on previous conditions - if you close exception showing detailed information, next exception will have blank meassage in dialog window - if you close it in 'compressed' format, next exception's window will contain text)
Created attachment 314 [details] org.openide.filesystems.FSException
--- Using Pilsen build 10402, FJEE, the same exception is thrown when trying to delete a jar file. Steps: 1) Create a new jar content file 2) Compile the jar content file 3) Delete the jar content file 4) The jar file appears 5) Try to delete the jar file from the Explorer Result: Mon Apr 02 22:14:58 GMT+01:00 2001: org.openide.filesystems.FSException: Cannot delete file t2.jar in C:\WINNT_2\Profiles\Administrator\m2. org.openide.filesystems.FSException: Cannot delete file t2.jar in C:\WINNT_2\Pro files\Administrator\m2. at org.openide.filesystems.FSException.io(FSException.java:78) at org.openide.filesystems.LocalFileSystem.delete(LocalFileSystem.java:2 78) at org.netbeans.core.ExLocalFileSystem.delete(ExLocalFileSystem.java:74) at org.openide.filesystems.LocalFileSystem$Impl.delete(LocalFileSystem.j ava:597) at org.openide.filesystems.AbstractFileObject.delete(AbstractFileObject. java:439) at org.openide.loaders.FileEntry.delete(FileEntry.java:93) at org.openide.loaders.MultiDataObject.handleDelete(MultiDataObject.java :371) at org.openide.loaders.DataObject$3.run(DataObject.java:494) at org.openide.filesystems.FileSystem.runAtomicAction(FileSystem.java:37 1) at org.openide.loaders.DataObject.delete(DataObject.java:492) at org.openide.loaders.DataNode.destroy(DataNode.java:210) at org.openide.nodes.FilterNode.destroy(FilterNode.java:315) at org.openide.explorer.ExplorerActions$1.run(ExplorerActions.java:460) at org.openide.filesystems.FileSystem.runAtomicAction(FileSystem.java:37 1) at org.openide.explorer.ExplorerActions$DeleteActionPerformer.performAct ion(ExplorerActions.java:456) at org.openide.util.actions.CallbackSystemAction.performAction(CallbackS ystemAction.java:78) at org.openide.util.actions.CallableSystemAction.actionPerformed(Callabl eSystemAction.java:66) at org.netbeans.core.ModuleActions$1.run(ModuleActions.java:76) at org.openide.util.Task.run(Task.java:124) [catch] at org.openide.util.RequestProcessor$ProcessorThread.run(RequestProcesso r.java:584)
I see the delete being allowed after the jar is unmounted. The original message does leave something to be desired -- it isn't clear why the deletion isn't allowed.
In some mounted dir - create jar recipe for some subdir with some class - compile the recipe - popup menu -> Mount Jar - explore mounted jar to the class mentioned above - unmount it - popup menu on the recipe -> Delete Will fail with exception below (in windows explorer the jar file also can't be deleted): Wed May 22 20:38:48 PDT 2002: org.openide.filesystems.FSException: Cannot delete file j2.jar in G:\tmp\wds\wd3. Annotation: There was an error deleting the jar file G:\tmp\wds\wd3\j2.jar. org.openide.filesystems.FSException: Cannot delete file j2.jar in G:\tmp\wds\wd3. at org.openide.filesystems.FSException.io(FSException.java:78) at org.openide.filesystems.LocalFileSystem.delete(LocalFileSystem.java:321) at org.netbeans.core.ExLocalFileSystem.delete(ExLocalFileSystem.java:75) at org.openide.filesystems.LocalFileSystem$Impl.delete(LocalFileSystem.java:659) at org.openide.filesystems.AbstractFileObject.delete(AbstractFileObject.java:480) at org.openide.loaders.FileEntry.delete(FileEntry.java:100) at org.netbeans.modules.jarpackager.JarDataLoader$JarFileEntry.delete(JarDataLoader.java:374) at org.openide.loaders.MultiDataObject.handleDelete(MultiDataObject.java:413) at org.netbeans.modules.jarpackager.JarDataObject.handleDelete(JarDataObject.java:202) at org.openide.loaders.DataObject$2.run(DataObject.java:524) at org.openide.filesystems.EventControl.runAtomicAction(EventControl.java:89) at org.openide.filesystems.FileSystem.runAtomicAction(FileSystem.java:388) at org.openide.loaders.DataObject.delete(DataObject.java:522) at org.openide.loaders.DataNode.destroy(DataNode.java:219) at org.openide.nodes.FilterNode.destroy(FilterNode.java:399) at org.openide.explorer.ExplorerActions$DeleteActionPerformer$DestroyAtomic.invoke(ExplorerActions.java:527) at $Proxy3.run(Unknown Source) at org.openide.filesystems.EventControl.runAtomicAction(EventControl.java:89) at org.openide.filesystems.FileSystem.runAtomicAction(FileSystem.java:388) at org.openide.explorer.ExplorerActions$DestroyInvoker.run(ExplorerActions.java:568) at org.openide.explorer.ExplorerActions$DeleteActionPerformer.doDestroy(ExplorerActions.java:494) at org.openide.explorer.ExplorerActions$DeleteActionPerformer.performAction(ExplorerActions.java:463) at org.openide.util.actions.CallbackSystemAction.performAction(CallbackSystemAction.java:109) at org.openide.util.actions.CallableSystemAction.actionPerformed(CallableSystemAction.java:69) at org.netbeans.core.ModuleActions$1.run(ModuleActions.java:105) at org.openide.util.Task.run(Task.java:152) [catch] at org.openide.util.RequestProcessor$ProcessorThread.run(RequestProcessor.java:622)
in ffj40 and netbeans 4.0 the message is replaced by the text: "the file <name> is currently mounted as filesystem." I believe it sufficient as to point out what is the problem when deleting the file and hints that unmouning the filesystem helps. Once the filesystem is unmounted then a wrong, old fail message is printed when reattempting. it seems that the jarFilesystem didn't release the lock? (I've tried on win2000 platform) - restarting the IDE helps and next time the file is successfully deleted. Moving to openide for evaluation if the jarfilesystem releases the lock on the jar file when it gets unmounted.
Duplicate of #20743 *** This issue has been marked as a duplicate of 20743 ***
Resolved for 3.4.x or earlier, no new info since then -> verified
Resolved for 3.4.x or earlier, no new info since then -> closing.