QuickTip: java.lang.RuntimeException: java.util.zip.ZipException

Posted on Sunday, May 25, 2008

0


Recently we were trying to deploy a EJB3 .ear to the Jboss 4.3GA application server when we started getting this exception.

org.jboss.deployment.DeploymentException: exception in init of file:/D:/jboss-4.3.0.GA/server/default/deploy/esl_dist.ear/conf.jar
; - nested throwable: (java.lang.RuntimeException: java.util.zip.ZipException: error in opening zip file)
        at org.jboss.deployment.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:53)
        at org.jboss.deployment.MainDeployer.init(MainDeployer.java:901)
        at org.jboss.deployment.MainDeployer.init(MainDeployer.java:895)
        at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:809)
        at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
        at sun.reflect.GeneratedMethodAccessor24.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)

Luckily for us we did not have to spend too much time trying to sort it out. This exception occurs when the app server is not able to open the archive that you have created. In our case we had created the archive with winrar and the size of the archive was 95KB. When we created the archive again with Winzip the size war 107KB and this time deployment to the app server worked like a dream!

Posted in: Java