wood burning stoves 2.0*
The moose likes Tomcat and the fly likes disappearing .war file on tomcat 6 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Products » Tomcat
Bookmark "disappearing .war file on tomcat 6" Watch "disappearing .war file on tomcat 6" New topic
Author

disappearing .war file on tomcat 6

Scott Miller
Greenhorn

Joined: Jan 19, 2010
Posts: 5
Hi, I am trying to deploy app from app.war by coping it to wabapps folder, and that part works fine.
But after I open app.xml and edit it, and go to its URL, the tomcat is removing my app.war and content of app folder from webapps.
The logs says:

Misha Ver
Ranch Hand

Joined: Mar 03, 2008
Posts: 470
Scott Miller wrote:Hi, I am trying to deploy app from app.war by coping it to wabapps folder, and that part works fine.


How about accessing the application after deployment?

Scott Miller wrote:
But after I open app.xml and edit it, and go to its URL, the tomcat is removing my app.war and content of app folder from webapps.


What is app.xml and why do you need to edit this file?

Scott Miller
Greenhorn

Joined: Jan 19, 2010
Posts: 5
Misha Ver wrote:
How about accessing the application after deployment?

I can not, it is not there, the app directoryin webapps is empty and app.war is removed by tomcat I assume.

Misha Ver wrote:
What is app.xml and why do you need to edit this file?


It comes with app into:

and has some conntent:

Where I need to set up Oracle connection.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16093
    
  21

Yes, Tomcat will delete WARs. it's done this since Tomcat 4, I think, and it's virtually undocumented and very annoying. It also will delete contexts from the TOMCAT_HOME/conf/Catalina/localhost directory.

If Tomcat doesn't like a deployment, it removes it (silently) from the configuration. If "removing" means deleting files/directories, it will do so with impunity.


Customer surveys are for companies who didn't pay proper attention to begin with.
Scott Miller
Greenhorn

Joined: Jan 19, 2010
Posts: 5
Tim Holloway wrote:Yes, Tomcat will delete WARs. ...
If Tomcat doesn't like a deployment, it removes it (silently) from the configuration. If "removing" means deleting files/directories, it will do so with impunity.


But why? How can I prevent from this?
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16093
    
  21

Scott Miller wrote:
Tim Holloway wrote:Yes, Tomcat will delete WARs. ...
If Tomcat doesn't like a deployment, it removes it (silently) from the configuration. If "removing" means deleting files/directories, it will do so with impunity.


But why? How can I prevent from this?


You can only prevent it by not deploying a defective WAR. Or by shutting down Tomcat before you install the WAR. I don't think it does this except when doing a hot redeploy.
Scott Miller
Greenhorn

Joined: Jan 19, 2010
Posts: 5
Tim Holloway wrote:
You can only prevent it by not deploying a defective WAR. Or by shutting down Tomcat before you install the WAR. I don't think it does this except when doing a hot redeploy.


So it means my WAR file is broken?
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16093
    
  21

Scott Miller wrote:
Tim Holloway wrote:
You can only prevent it by not deploying a defective WAR. Or by shutting down Tomcat before you install the WAR. I don't think it does this except when doing a hot redeploy.


So it means my WAR file is broken?


Or its context definition is.
Scott Miller
Greenhorn

Joined: Jan 19, 2010
Posts: 5
Tim Holloway wrote:
Or its context definition is.


Where should I start to investigate this?
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16093
    
  21

You'll usually see an error message or 3 in the catalina.out when you attempt to start the offending webapp.
 
GeeCON Prague 2014
 
subject: disappearing .war file on tomcat 6