facebook

Undeployment failure on Tomcat 5…

  1. MyEclipse IDE
  2.  > 
  3. Feature Requests
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #216715 Reply

    Paul Baker
    Member

    Newbee question.. again..
    I must stop and restart Tomcat each time I make a deployment. Is this normal. The project deployment window contains the error but since the “Development Status” area is not scrollable only the first few lines are displayed and there is no ability to copy the text.

    The text starts off with:
    QUOTE
    Undeployment failure on Tomcat 5. File C:\Apache\Tomcat 5.5\webapp\Contacts\WEB-INF\lib\jsf-impl.jar unable to be deleted. If a file is locked, you can wait until the lock times out to redeploy, or stop…
    UNQUOTE

    The rest of the message is unreadable because the text area is not scrollable.

    Any suggestions? Thanks again for the help…. Paul

    #216728 Reply

    Riyad Kalla
    Member

    Paul,
    Yes this is normal IF:

    1) You are running on Windows (file read locks are the cause and NTFS doesn’t allow delete operations on locked files)
    2) You are deploying a packaged deployment (WAR)

    What is happening is Tomcat locks the WAR file for reading, then unzips it, then locks the JAR files in the project for reading while it loads the classes and such… when you try and ‘redeploy’ while TOmcat is running, its not possible to erase the existing WAR/JAR files because sometimes they are locked.

    Tomcat 5.5 has tried to correct this by avoiding read locks all together, but I don’t know that our Tomcat 5 connector supports 5.5 yet.

    What you CAN do to totally fix this situation is use an exploded deployment, then AS you are making changes, they are immediately copied out to Tomcat, make sure to have TOmcat’s ‘reload’ feature for your webapp turned on, then all your changes will be reloaded on the fly, very handy.

    #217466 Reply

    Henry Lyons
    Participant

    Actually, I am getting the same error with exploded deployment.

    Henry

    #217467 Reply

    Riyad Kalla
    Member

    Henry,
    If you are attempting to do a full redeploy even with an exploded deployment, yes you will run into the same problem. Read my notes except this time instead of Tomcat locking the WAR file to unzip it, it will lock the JAR files (libraries) for class loading… I should have clarified that when I said “To totally fix this situation”, what I really meant is “to mostly avoid the need for full redeploys, use exploded deployment”, when you get the popup warning you about not being able to load hotsynced classes is when you should shut down the app server, and do a manual redeploy. Doing a full redeploy to a running app server usually doesn’t work (Except on *nix where the file system allows it).

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: Undeployment failure on Tomcat 5…

You must be logged in to post in the forum log in