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 20986 - Could not mount jar file error when delete/copy/paste jar to web-inf/lib directory
Summary: Could not mount jar file error when delete/copy/paste jar to web-inf/lib dire...
Status: CLOSED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: Code (show other bugs)
Version: -FFJ-
Hardware: PC Windows ME/2000
: P2 blocker (vote)
Assignee: Petr Jiricka
URL:
Keywords:
Depends on: 22438
Blocks:
  Show dependency tree
 
Reported: 2002-02-28 02:58 UTC by _ hlu
Modified: 2003-07-02 08:27 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDE log file (15.49 KB, patch)
2002-02-28 16:41 UTC, Petr Jiricka
Details | Diff
first time:ide.log (28.36 KB, text/plain)
2002-02-28 18:43 UTC, _ hlu
Details
second time: ide.log (15.81 KB, text/plain)
2002-02-28 18:44 UTC, _ hlu
Details

Note You need to log in before you can comment on or make changes to this bug.
Description _ hlu 2002-02-28 02:58:16 UTC
Build 020225:
To reproduce:
1. create a new web module.
2. mount a directory and create a java package.
3. add a java class to the package.
4. create jar recipe and add the package to the jar.
5. create jar file.
6. copy the jar file(ONLY JAR file) to web-inf/lib directory.
7. add another java class to the package.
8. re-create the jar file.
9. delete the jar file in web-inf/lib directory.
10.copy the new jar file(ONLY JAR file) to web-inf/lib.
There will be an error about could not mount jar file.
Try to dismount/mount the web module. The error will appear again.
Comment 1 Petr Jiricka 2002-02-28 16:41:54 UTC
Created attachment 4865 [details]
IDE log file
Comment 2 Petr Jiricka 2002-02-28 18:06:41 UTC
The workaround is not to do step 9.

When the new file is just pasted over the old one, the jar file and 
the corresponding mounted filesystem will be refreshed succesfully.
Comment 3 _ hlu 2002-02-28 18:43:23 UTC
Created attachment 4873 [details]
first time:ide.log
Comment 4 _ hlu 2002-02-28 18:44:19 UTC
Created attachment 4874 [details]
second time: ide.log
Comment 5 _ hlu 2002-02-28 19:14:02 UTC
After I tried the workaround, I deleted the jar file. I got the 
following error:
Thu Feb 28 10:18:58 PST 2002: org.openide.filesystems.FSException:  
Cannot delete file WEB-INF/lib/test1.jar in 
C:\workbase\f4j_all\f4jbuild\firststart\test\sampledir\wm.
org.openide.filesystems.FSException: Cannot delete file WEB-
INF/lib/test1.jar in 
C:\workbase\f4j_all\f4jbuild\firststart\test\sampledir\wm.
        at org.openide.filesystems.FSException.io(FSException.java:78)
        at org.openide.filesystems.LocalFileSystem.delete
(LocalFileSystem.java:321)
        at org.openide.filesystems.LocalFileSystem$Impl.delete
(LocalFileSystem.java:659)
        at org.openide.filesystems.AbstractFileObject.delete
(AbstractFileObject.java:480)
        at 
org.netbeans.modules.web.context.DefaultDataObject.handleDelete
(LibJarObject.java:152)
        at org.netbeans.modules.web.context.LibJarObject.handleDelete
(LibJarObject.java:72)
        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$DestroyAtom
ic.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.performActi
on(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)

After that I could not copy/paste the jar file to new created web 
module. I exited the ide and then restart the ide with new userdir 
and do the steps 1-6 only and got could not mount jar error. There is 
another exception in the console:

URL: file:/C:/workbase/f4j_all/f4jbuild/firststart/iPlanet/ias_ffj.jar
org.openide.filesystems.FileAlreadyLockedException
        at org.openide.filesystems.AbstractFileObject.lock
(AbstractFileObject.ja
va:199)
        at 
org.netbeans.modules.jarpackager.JarChildren$GeneratedJarNode$Generat
edJarPasteType.paste(JarChildren.java:283)
        at org.openide.actions.PasteAction.performAction
(PasteAction.java:100)
        at 
org.openide.util.actions.CallableSystemAction.actionPerformed(Callabl
eSystemAction.java:69)
        at org.netbeans.core.ModuleActions$1.run
(ModuleActions.java:105)
        at org.openide.util.Task.run(Task.java:152)
        at org.openide.util.RequestProcessor$ProcessorThread.run
(RequestProcesso
r.java:622)
org.openide.filesystems.FileAlreadyLockedException
        at org.openide.filesystems.AbstractFileObject.lock
(AbstractFileObject.ja
va:199)
        at 
org.netbeans.modules.jarpackager.JarChildren$GeneratedJarNode$Generat
edJarPasteType.paste(JarChildren.java:283)
        at org.openide.actions.PasteAction.performAction
(PasteAction.java:100)
        at 
org.openide.util.actions.CallableSystemAction.actionPerformed(Callabl
eSystemAction.java:69)
        at org.netbeans.core.ModuleActions$1.run
(ModuleActions.java:105)
        at org.openide.util.Task.run(Task.java:152)
        at org.openide.util.RequestProcessor$ProcessorThread.run
(RequestProcesso
r.java:622)

Note: When I restart the ide, I used new userdir and new directory to 
create web module and jar file.


Comment 6 _ hlu 2002-03-04 19:37:18 UTC
I checked it in EA RC1 build(020301_1):
The bug is still there on windows2000. It seems fine with solaris8.
I found another workaround and something else:
After the bug happened:
Rename the jar recipe, which will rename the jar too.
copy the renamed jar file to the WEB-INF/lib.
I got exception:Can not delete jar, when checking the bug, but it is 
consistent. The exception is list below:
Mon Mar 04 11:34:33 PST 2002: org.openide.filesystems.FSException:  
Cannot delete file WEB-INF/lib/jar1.jar in 
C:\workbase\f4j_all\f4jbuild\firststart\test1\sampledir\wmtest.
org.openide.filesystems.FSException: Cannot delete file WEB-
INF/lib/jar1.jar in C:\workbase\f4j_all\f4jbuild\firststart\test1
\sampledir\wmtest.
        at org.openide.filesystems.FSException.io(FSException.java:78)
        at org.openide.filesystems.LocalFileSystem.delete
(LocalFileSystem.java:321)
        at org.openide.filesystems.LocalFileSystem$Impl.delete
(LocalFileSystem.java:659)
        at org.openide.filesystems.AbstractFileObject.delete
(AbstractFileObject.java:480)
        at 
org.netbeans.modules.web.context.DefaultDataObject.handleDelete
(LibJarObject.java:152)
        at org.netbeans.modules.web.context.LibJarObject.handleDelete
(LibJarObject.java:72)
        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$DestroyAtom
ic.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.performActi
on(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)

Comment 7 Petr Jiricka 2002-03-05 03:25:08 UTC
I can not reproduce this in FFJ 4.0 EA RC1 (March 5, 2002).

This appears to have been fixed by the recent fix in core automount.
Comment 8 _ hlu 2002-03-05 18:40:59 UTC
I checked the bug with build020301_1(EA RC1) again and the bug is 
still there. Futhermore, I got "jar error" after I restart ide with 
new userdir. I need to re-install the ide to get rid of it.
Comment 9 Petr Jiricka 2002-03-06 23:51:57 UTC
Lowering priority per i-team discussion. This does not need to be 
fixed for Orion EA.
Comment 10 Petr Jiricka 2002-04-16 10:50:50 UTC
Fixed by the fix of issue 22438, IN=6702.
Comment 11 Petr Jiricka 2002-04-23 10:02:10 UTC
Changing target milestone to FFJ 4.0
Comment 12 Petr Jiricka 2002-04-23 10:12:45 UTC
Changing target milestone to FFJ 4.0
Comment 13 _ hlu 2002-04-27 01:05:26 UTC
verified the fix in build 020417_1.
Comment 14 Quality Engineering 2003-07-02 08:27:44 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.