You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Alexander Diedler <ad...@tecracer.de> on 2011/07/20 08:58:47 UTC

Redeployment of war File stopps suddenly

Hello,

We have a big problem with deployment over war in a Tomcat 6.0.32. If there
is no application yet, the initial upload through the manger works. If we
redeploy the running application again, the undeploy process fails and we
have a half installation, in the Manager the application name is empty. To
get free out of this situation, we have to click three times to "undeploy"
and then all files are deleted and the Context Descriptor will be deleted.

 

War File named ROOT.war resists in D:/tecracer/apps/apps1

 

The deployed file in /conf/Catalina/app1/ROOT.xml contains:

<?xml version="1.0" encoding="UTF-8"?>

<Context path="" docBase="D:/tecracer/apps/app1/" privileged="true"
reloadable="true" unpackWAR="true" antiJARLocking="true">

[.]

 

In the Server.xml we have inside the Engine:

<Host name="app1 " appBase="D:/tecracer/apps/app1" unpackWARs="true"
deployOnStartup="true">        

                                  <Valve
className="org.apache.catalina.valves.AccessLogValve" directory="logs"

               prefix="app1_access_log." suffix=".txt" pattern="common"
resolveHosts="false"/>

</Host>

 

Do we make a thinking mistake in the understanding of automatical
deployment?

 

Greetings

Alexander Diedler

 

 


AW: Redeployment of war File stopps suddenly

Posted by Alexander Diedler <ad...@tecracer.de>.
Additionally the information from Tomcat doc:

"When using automatic deployment, the docBase defined by an XML
<http://tomcat.apache.org/tomcat-6.0-doc/config/context.html> Context file
should be outside of the appBase directory. If this is not the case,
difficulties may be experienced deploying the web application or the
application may be deployed twice. The deployIgnore attribute can be used to
avoid this situation."

 

 

Von: Alexander Diedler [mailto:adiedler@tecracer.de] 
Gesendet: Mittwoch, 20. Juli 2011 08:59
An: users@tomcat.apache.org
Betreff: Redeployment of war File stopps suddenly

 

Hello,

We have a big problem with deployment over war in a Tomcat 6.0.32. If there
is no application yet, the initial upload through the manger works. If we
redeploy the running application again, the undeploy process fails and we
have a half installation, in the Manager the application name is empty. To
get free out of this situation, we have to click three times to "undeploy"
and then all files are deleted and the Context Descriptor will be deleted.

 

War File named ROOT.war resists in D:/tecracer/apps/apps1

 

The deployed file in /conf/Catalina/app1/ROOT.xml contains:

<?xml version="1.0" encoding="UTF-8"?>

<Context path="" docBase="D:/tecracer/apps/app1/" privileged="true"
reloadable="true" unpackWAR="true" antiJARLocking="true">

[.]

 

In the Server.xml we have inside the Engine:

<Host name="app1 " appBase="D:/tecracer/apps/app1" unpackWARs="true"
deployOnStartup="true">        

                                  <Valve
className="org.apache.catalina.valves.AccessLogValve" directory="logs"

               prefix="app1_access_log." suffix=".txt" pattern="common"
resolveHosts="false"/>

</Host>

 

Do we make a thinking mistake in the understanding of automatical
deployment?

 

Greetings

Alexander Diedler

 

 


Re: Redeployment of war File stopps suddenly

Posted by Pid <pi...@pidster.com>.
On 20/07/2011 07:58, Alexander Diedler wrote:
> Hello,
> 
> We have a big problem with deployment over war in a Tomcat 6.0.32. If
> there is no application yet, the initial upload through the manger
> works. If we redeploy the running application again, the undeploy
> process fails and we have a half installation, in the Manager the
> application name is empty. To get free out of this situation, we have to
> click three times to “undeploy” and then all files are deleted and the
> Context Descriptor will be deleted.


> War File named ROOT.war resists in D:/tecracer/apps/apps1
> 
> The deployed file in /conf/Catalina/app1/ROOT.xml contains:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> 
> <Context path="" docBase="D:/tecracer/apps/app1/" privileged="true"
> reloadable="true" unpackWAR="true" antiJARLocking="true">

If the app is named ROOT.war, you don't need path & docBase in context.xml.


> In the Server.xml we have inside the Engine:
> 
> <Host name="app1 " appBase="D:/tecracer/apps/app1" unpackWARs="true"
> deployOnStartup="true">       

You can't set docBase and appBase to the same value.

There shouldn't be a space in the Host name attribute.


p


>                                   <Valve
> className="org.apache.catalina.valves.AccessLogValve" directory="logs"
> 
>                prefix="app1_access_log." suffix=".txt" pattern="common"
> resolveHosts="false"/>
> 
> </Host>
> 
>  
> 
> Do we make a thinking mistake in the understanding of automatical
> deployment?
> 
>  
> 
> Greetings
> 
> Alexander Diedler
> 
>  
> 
>  
> 



Re: Redeployment of war File stopps suddenly

Posted by André Warnier <aw...@ice-sa.com>.
Alexander Diedler wrote:
...

> 
> <Context path="" docBase="D:/tecracer/apps/app1/" privileged="true"
> reloadable="true" unpackWAR="true" antiJARLocking="true">
> 
...

> 
> In the Server.xml we have inside the Engine:
> 
> <Host name="app1 " appBase="D:/tecracer/apps/app1" unpackWARs="true"
> deployOnStartup="true">        
> 

Without knowing if that /is/ your problem, I think one problem may exist above anyway : 
you are deploying this application within the Host's appBase, but are specifying a docBase 
in its context.xml (even if they both point to the same place).

If I had to risk a guess, I would say that Tomcat may be trying to deploy/undeploy your 
app several times, with concurrent threads, and they step on eachother and get confused.

See : http://tomcat.apache.org/tomcat-7.0-doc/config/context.html#Introduction
Section : "Locate the WAR and/or directory outside of the Host's appBase and use a 
context.xml file with a docBase attribute to define it."

The operative word is *outside*

No ?



Also, in your Host tag, there is a space in the name.  Is that a typo ?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org