tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Freitag <tho...@freit.ag>
Subject Re: Error in Tomcat when redeploying the Web application
Date Thu, 03 Mar 2011 14:34:59 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Keshav,

On 02.03.11 um 14:39, Keshav Arora wrote:
> Hi All,
> 
> We have been using Tomcat version 6.0.29 to deploy our webapp and everything
> works great. In our development environment we can deploy/undeploy our web
> app multiple times without getting any errors in Tomcat.
> 
> Recently we switched to Tomcat 7.0.8 and every time we redeploy our
> application in Tomcat, we get the the following error in the
> tomcat7-stderr.log file
> 
> SEVERE: Parse error in context.xml for /webapp
> java.util.zip.ZipException: invalid block type
>     at java.util.zip.InflaterInputStream.read(Unknown Source)
>     at java.util.zip.InflaterInputStream.read(Unknown Source)
>     at java.io.FilterInputStream.read(Unknown Source)
[...] 
> To make our application work, we need to stop the Tomcat service and start
> it again.
> 
> Can anyone suggest whats causing this problem?

You did not tell anything about your redeployment process. I assume
your just putting a new version of your war file to webapps/ (or
whatever appBase is configured to). Tomcat redeploys your app after
the timestamp of the war file is updated. It seems that this happens
before the war file is written completely.

You can avoid this by using a context descriptor file (usually in 
the conf/Catalina/localhost/ directory (see [1]) pointing to the war
file (attribute docBase) somewhere on the system. For a redeployment
you just have to change the docBase attribute to point to the new war
file. 
Another option is to copy the war file somewhere on the same
filesystem your tomcat is installed and move it to your webapps/
directory. 

[1] http://tomcat.apache.org/tomcat-7.0-doc/config/context.html

Regards,
- -- 
Thomas Freitag
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAk1vpxMACgkQGE5pHr3PKuW94ACfckbYJ+hz7kXdcJgWDer84jAG
wC8AniiKMp/BknbBr3e31R1Fs74+w+L1
=OA/n
-----END PGP SIGNATURE-----

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


Mime
View raw message