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 30736 - TAGLIB REPOS: Selection of all tags displays an error message.
Summary: TAGLIB REPOS: Selection of all tags displays an error message.
Status: CLOSED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: Code (show other bugs)
Version: -FFJ-
Hardware: All All
: P4 blocker (vote)
Assignee: sgleason
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-02-06 03:44 UTC by Jason Rush
Modified: 2003-07-02 08:27 UTC (History)
0 users

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 Jason Rush 2003-02-06 03:44:30 UTC
Description: 
The reappearance method of a bug. 

1.Create the JSP file.
2.Open a menu on an icon and choose New -> JSP&Servlet -> WebModule. 
3.Click the project default tab of Explorer. 
4.Choose an addition for Tools -> Add JSP Tag Library -> Find in Tag Library 
  Repository.
5.Choose all tags and push a "OK" button. (Image1.gif)
6.An error message is displayed.(Image2.gif,Image3.txt,ide.log)

*Build:010925_ce_ja
*OS:Solaris 8
*JDK:JDK1.3.1
*JSP_taglib

Suggested Fix: 
In TaglibSupport, implement a filecopy that wait and retries for the filelock
and then copies the data.  ( fix it in TaglibSupport method addTagLibrary() )


schikkala 2001-10-16

Evaluation: 
Since the WebInfObject listening to the filechange events for any libraries that
is added to the WEB-INF/lib folder, the file is getting locked by this object as
soon as it is created before a file copy gets the lock in adding the taglib in
TaglibSupport and hence the copying of the taglib fails and throws the
exception. 

This is typically happening when user selects multiple taglibs at a time to add
to the web module.

This race condition can be avoided if we implement filecopy that tries multiple
times to get file lock before copy. or remove the fileevent listeners from the
webinf object and handle the code diffrenetly.


schikkala 2001-10-16

Printing the exception here too: 

Fri Oct 05 17:06:04 JST 2001: org.openide.filesystems.FileAlreadyLockedException
: null
org.openide.filesystems.FileAlreadyLockedException
        at org.openide.filesystems.AbstractFileObject.lock(AbstractFileObject.ja
va:193)
        at org.openide.filesystems.FileUtil.copyFileImpl(FileUtil.java:64)
        at org.openide.filesystems.FileObject.copy(FileObject.java:74)
        at org.openide.filesystems.AbstractFileObject.copy(AbstractFileObject.ja
va:505)
        at org.openide.filesystems.MultiFileObject.copy(MultiFileObject.java:999
)
        at org.openide.filesystems.MultiFileObject.copy(MultiFileObject.java:999
)
        at org.netbeans.modules.web.taglib.TagLibSupport.addTagLibrary(TagLibSup
port.java:524)
        at org.netbeans.modules.web.taglib.TagLibSupport.useLibrary(TagLibSuppor
t.java:126)
        at org.netbeans.modules.web.taglib.TagLibSupport.useSystemLibrary(TagLib
Support.java:116)
        at org.netbeans.modules.web.taglib.TagLibFinder.addTagLibsFromTagLibRepo
sitoryToWebModule(TagLibFinder.java:209)
        at org.netbeans.modules.web.taglib.actions.AddTagLibFromTagLibRepository
Action.performAction(AddTagLibFromTagLibRepositoryAction.java:57)
        at org.openide.util.actions.NodeAction.performAction(NodeAction.java:92)
        at org.openide.util.actions.NodeAction.actionPerformed(NodeAction.java:8
3)
        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:626)
lillamy$ more Image3.txt
Fri Oct 05 17:06:04 JST 2001: org.openide.filesystems.FileAlreadyLockedException
: null
org.openide.filesystems.FileAlreadyLockedException
        at org.openide.filesystems.AbstractFileObject.lock(AbstractFileObject.ja
va:193)
        at org.openide.filesystems.FileUtil.copyFileImpl(FileUtil.java:64)
        at org.openide.filesystems.FileObject.copy(FileObject.java:74)
        at org.openide.filesystems.AbstractFileObject.copy(AbstractFileObject.ja
va:505)
        at org.openide.filesystems.MultiFileObject.copy(MultiFileObject.java:999
)
        at org.openide.filesystems.MultiFileObject.copy(MultiFileObject.java:999
)
        at org.netbeans.modules.web.taglib.TagLibSupport.addTagLibrary(TagLibSup
port.java:524)
        at org.netbeans.modules.web.taglib.TagLibSupport.useLibrary(TagLibSuppor
t.java:126)
        at org.netbeans.modules.web.taglib.TagLibSupport.useSystemLibrary(TagLib
Support.java:116)
        at org.netbeans.modules.web.taglib.TagLibFinder.addTagLibsFromTagLibRepo
sitoryToWebModule(TagLibFinder.java:209)
        at org.netbeans.modules.web.taglib.actions.AddTagLibFromTagLibRepository
Action.performAction(AddTagLibFromTagLibRepositoryAction.java:57)
        at org.openide.util.actions.NodeAction.performAction(NodeAction.java:92)
        at org.openide.util.actions.NodeAction.actionPerformed(NodeAction.java:8
3)
        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:626)


A comment.
Comment 1 Jason Rush 2003-02-06 03:45:28 UTC
Transferred from BugTraq 4388425.
Comment 2 Jason Rush 2003-02-06 03:46:23 UTC
Sorry.  The correct BugTraq ID is 4511285.
Comment 3 sgleason 2003-03-01 00:10:45 UTC
I remember fixing this awhile ago. In any case, it doesn't
seem to be happening in 3.5 
Comment 4 Quality Engineering 2003-07-02 08:24:57 UTC
Resolved for 3.4.x or earlier, no new info since then -> verify.

Comment 5 Quality Engineering 2003-07-02 08:27:15 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.