Jboss war redeployment Zipexception

Issue

Server: jboss-5.1.0
Java Version: jdk1.6.0_14
Deployment Method: ant v1.7
Error: 08:40:04,260 WARN [ZipEntryContext] IGNORING: Failed to reinitialize context: vfszip:/home/username/jboss-5.1.0.GA/server/default/deploy/deployment.war
java.util.zip.ZipException: error in opening zip file

Error occurs if the server is running and I run an ant deploy on my src code. This is all being done via VI on our server.

I have searched our JBOSS settings but I can’t seem to find the correct one to get rid of this error. Ideas?

Update

Here is our deployment method:

 <target name="deploy" depends="war" description="--> The deploy target (initially empty)">
    <copy file="scripts/xmlscript.groovy" todir="${jboss.bin.dir}" overwrite="true"/>
    <copy file="grails-app/views/xmlService/current.xml" todir="${jboss.bin.dir}" overwrite="true"/>
    <copy file="${war.file}" todir="${jboss.deploy.dir}" overwrite="true"/>
</target>

Solution

Not sure but, according to JBAS-6612:

This is an issue due to the fact that the copy is not atomic. To work around this issue temporarily, use the move command instead as it is atomic.

Could you try to use the Ant move task instead of copy?

Answered By – Pascal Thivent

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published