File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Tomcat and the fly likes FileNotFoundException during deploy Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "FileNotFoundException during deploy" Watch "FileNotFoundException during deploy" New topic

FileNotFoundException during deploy

William Stafford
Ranch Hand

Joined: Dec 13, 2004
Posts: 109
I am trying to deploy an web app to a new server we just set up. I generate a war file from Eclipse and place it in the web apps dir. A directory for the war appears when I restart Tomcat but the following message is logged and the war is not deployed.

HostConfig[localhost]: Expanding web application archive OBISWEB2.war
HostConfig[localhost] Exception while expanding web application archive OBISWEB2.war C:\Program Files\Apache Software Foundation\Tomcat 4.1\webapps\OBISWEB2.war (The process cannot access the file because it is being used by another process)
at Method)

The message seems clear, ".. being used by another process", but I can not believe this is the case. I use the same procedure on four other machines with no problem.

I seem to remember seeing the same message when a java command has a type in a jar file name, ex. java -jar typo.jar shoud have been java -jar Typo.jar but I don't see how it fits in this case.

Any help or pointers or even wild guesses would be appreciated.

Ben Souther

Joined: Dec 11, 2004
Posts: 13410

Are you sure that no other apps have a lock on the war file (are you viewing it's contents with Winzip or Explorer)?

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
It is sorta covered in the JavaRanch Style Guide.
subject: FileNotFoundException during deploy
It's not a secret anymore!