• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Bear Bibeault
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Piet Souris
  • salvin francis
  • Stephan van Hulst
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Jj Roberts

disappearing .war file on tomcat 6

 
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:

 
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.
 
Saloon Keeper
Posts: 22788
153
Android Eclipse IDE Tomcat Server Redhat Java 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
Posts: 22788
153
Android Eclipse IDE Tomcat Server Redhat Java 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
Posts: 22788
153
Android Eclipse IDE Tomcat Server Redhat Java 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
Posts: 22788
153
Android Eclipse IDE Tomcat Server Redhat Java 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.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic