This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

disappearing .war file on tomcat 6

 
Scott Miller
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 470
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 18020
47
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Scott Miller
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 18020
47
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 18020
47
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tim Holloway wrote:
Or its context definition is.


Where should I start to investigate this?
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18020
47
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You'll usually see an error message or 3 in the catalina.out when you attempt to start the offending webapp.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic