This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Tomcat and the fly likes Error deploying a .war -- strange Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Error deploying a .war -- strange" Watch "Error deploying a .war -- strange" New topic

Error deploying a .war -- strange

Max Rahder
Ranch Hand

Joined: Nov 06, 2000
Posts: 177
When launching Tomcat 4.0.3 I get get the message "Error deploying web application" followed by a FileNotFoundException citing a .class file in my WEB-INF\classes directory. (I don't know why it's even looking for a .class file from the Web app.)
If I *manually* unzip the .war and start Tomcat I do *not* get the error.
If I re-zip the unzipped Web app (renaming it as a .war file) and delete the unzipped version, then restart Tomcat, I do *not* get the error. In other words, Tomcat can deploy *my* version of the .war that was simply a re-zipping of the original .war.
The original .war was created from Eclipse, and upon inspection looks fine. It's obviously all there because I can do the manual unzipping, etc.
Max Rahder
Ranch Hand

Joined: Nov 06, 2000
Posts: 177
Ahh. The Eclipse-generated .war has a leading "\" in front of all file paths. Sun's "jar" utility does not have the leading "\". I'm not sure *why* Eclipse includes the leading backslash...
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
That was a good find!
I agree. Here's the link:
subject: Error deploying a .war -- strange
Similar Threads
Problem with connection pooling
tomcat quit expanding war files
JSP not reshreshing
error delploying ear file on JBOSS 3.0.8
class file is not loading while running JSP file