3 Replies Latest reply on Jul 12, 2006 12:48 PM by Peter Johnson

    java.util.zip.ZipException: error in opening zip file

    mehboob alam Newbie

      Hi

      i am using the tomcat that is bundled with JBOSS and for client side

      I have my folder greeterapp as follows
      C:\jboss-4.0.3\server\default\deploy\greeterapp

      which contains the WEB-INF,greetServlet.html and web-app.xml
      WEB-INF contains the classes(containing greetServlet.class) and lib(containg the .jars including the greet.jar file which consists of greetHome,greetRemote etc.....) folder

      But when i start the server i get the following log:

      11:55:22,314 INFO [EJBDeployer] Deployed: file:/C:/jboss-4.0.3/server/default/d
      eploy/greeterapp/WEB-INF/lib/greet.jar
      11:55:22,939 INFO [TomcatDeployer] deploy, ctxPath=/jmx-console, warUrl=.../dep
      loy/jmx-console.war/
      11:55:23,423 WARN [JARDeployer] Failed to add deployable jar: file:/C:/jboss-4.
      0.3/server/default/tmp/deploy/tmp46702greetServlet.class
      java.util.zip.ZipException: error in opening zip file
      at java.util.zip.ZipFile.open(Native Method)
      at java.util.zip.ZipFile.(ZipFile.java:112)
      at java.util.jar.JarFile.(JarFile.java:117)
      at java.util.jar.JarFile.(JarFile.java:55)
      at org.jboss.deployment.SubDeployerSupport.processNestedDeployments(SubD
      eployerSupport.java:362)
      at org.jboss.deployment.SubDeployerSupport.init(SubDeployerSupport.java:
      269)
      at org.jboss.deployment.MainDeployer.init(MainDeployer.java:843)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:780)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:753)
      at sun.reflect.GeneratedMethodAccessor27.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
      er.java:141)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
      at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractIntercept
      or.java:118)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
      at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelM
      BeanOperationInterceptor.java:127)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
      java:245)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
      at $Proxy9.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymen
      tScanner.java:319)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentS
      canner.java:507)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
      doScan(AbstractDeploymentScanner.java:192)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(A
      bstractDeploymentScanner.java:265)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanS
      upport.java:274)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMB
      eanSupport.java:230)
      at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
      er.java:141)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
      java:245)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceControl
      ler.java:943)
      at $Proxy0.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:428)
      at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
      er.java:141)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
      java:245)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
      at $Proxy4.start(Unknown Source)
      at org.jboss.deployment.SARDeployer.start(SARDeployer.java:285)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:989)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:790)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:753)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:737)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
      java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
      er.java:141)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
      at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractIntercept
      or.java:118)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
      at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelM
      BeanOperationInterceptor.java:127)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
      java:245)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
      at $Proxy5.deploy(Unknown Source)
      at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:453)
      at org.jboss.system.server.ServerImpl.start(ServerImpl.java:330)
      at org.jboss.Main.boot(Main.java:187)
      at org.jboss.Main$1.run(Main.java:438)
      at java.lang.Thread.run(Thread.java:536)
      11:55:23,532 WARN [JARDeployer] Failed to add deployable jar: file:/C:/jboss-4.
      0.3/server/default/tmp/deploy/tmp46703greetServlet.html
      java.util.zip.ZipException: error in opening zip file
      at java.util.zip.ZipFile.open(Native Method)
      at java.util.zip.ZipFile.(ZipFile.java:112)
      at java.util.jar.JarFile.(JarFile.java:117)
      at java.util.jar.JarFile.(JarFile.java:55)
      at org.jboss.deployment.SubDeployerSupport.processNestedDeployments(SubD
      eployerSupport.java:362)
      at org.jboss.deployment.SubDeployerSupport.init(SubDeployerSupport.java:
      269)
      at org.jboss.deployment.MainDeployer.init(MainDeployer.java:843)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:780)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:753)
      at sun.reflect.GeneratedMethodAccessor27.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
      er.java:141)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
      at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractIntercept
      or.java:118)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
      at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelM
      BeanOperationInterceptor.java:127)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
      java:245)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
      at $Proxy9.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymen
      tScanner.java:319)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentS
      canner.java:507)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
      doScan(AbstractDeploymentScanner.java:192)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(A
      bstractDeploymentScanner.java:265)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanS
      upport.java:274)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMB
      eanSupport.java:230)
      at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
      er.java:141)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
      java:245)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceControl
      ler.java:943)
      at $Proxy0.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:428)
      at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
      er.java:141)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
      java:245)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
      at $Proxy4.start(Unknown Source)
      at org.jboss.deployment.SARDeployer.start(SARDeployer.java:285)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:989)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:790)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:753)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:737)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
      java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
      er.java:141)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
      at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractIntercept
      or.java:118)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
      at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelM
      BeanOperationInterceptor.java:127)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
      java:245)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
      at $Proxy5.deploy(Unknown Source)
      at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:453)
      at org.jboss.system.server.ServerImpl.start(ServerImpl.java:330)
      at org.jboss.Main.boot(Main.java:187)
      at org.jboss.Main$1.run(Main.java:438)
      at java.lang.Thread.run(Thread.java:536)
      11:55:23,642 ERROR [URLDeploymentScanner] Incomplete Deployment listing:

      --- Packages waiting for a deployer ---
      org.jboss.deployment.DeploymentInfo@f973a0e9 { url=file:/C:/jboss-4.0.3/server/d
      efault/deploy/greeterapp/web-app.xml }
      deployer: null
      status: null
      state: INIT_WAITING_DEPLOYER
      watch: file:/C:/jboss-4.0.3/server/default/deploy/greeterapp/web-app.xml
      altDD: null
      lastDeployed: 1152512723642
      lastModified: 1152512723642
      mbeans:

      --- Incompletely deployed packages ---
      org.jboss.deployment.DeploymentInfo@f973a0e9 { url=file:/C:/jboss-4.0.3/server/d
      efault/deploy/greeterapp/web-app.xml }
      deployer: null
      status: null
      state: INIT_WAITING_DEPLOYER
      watch: file:/C:/jboss-4.0.3/server/default/deploy/greeterapp/web-app.xml
      altDD: null
      lastDeployed: 1152512723642
      lastModified: 1152512723642
      mbeans:

        • 1. Re: java.util.zip.ZipException: error in opening zip file
          Peter Johnson Master

          Try changing the folder name to C:\jboss-4.0.3\server\default\deploy\greeterapp.war.

          In Tomcat, all archives are war files, so you don't have to say that they are. In JBoss, you can deploy many different types of archives (war, ear, sar, etc) so you must identify them by their extension.

          • 2. Re: java.util.zip.ZipException: error in opening zip file
            mehboob alam Newbie

            Thanx Peter

            The issue is resolved but now when i start the jboss

            i get following log which says:

            [ContextConfig] Missing application web.xml, using....... though i hav web.xml in greeterapp.war folder. Next the following url: http://localhost:8080/greeterapp/greetServlet.html does display the html page but when the submit button is pressed the Tomcat throws 404 error
            though the "classes" and "lib" folder inside WEB-INF contain the files.
            ------------------tomcat msg--------------------
            type Status report

            message /greeterapp/servlet/greetServlet

            description The requested resource (/greeterapp/servlet/greetServlet) is not available.
            --------------------------------------------------------------

            ---------------------------jboss startup msg------------------------
            20:41:21,638 INFO [DLQ] Bound to JNDI name: queue/DLQ
            20:41:21,810 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jb
            oss.jca:name=JmsXA,service=ConnectionFactoryBinding' to JNDI name 'java:JmsXA'
            20:41:21,841 INFO [TomcatDeployer] deploy, ctxPath=/greeterapp, warUrl=.../depl
            oy/greeterapp.war/
            20:41:21,966 INFO [ContextConfig] Missing application web.xml, using defaults o
            nly StandardEngine[jboss.web].StandardHost[localhost].StandardContext[/greeterap
            p]
            20:41:22,013 INFO [TomcatDeployer] deploy, ctxPath=/jmx-console, warUrl=.../dep
            loy/jmx-console.war/
            20:41:22,982 INFO [EjbModule] Deploying greetBean
            20:41:23,435 INFO [ProxyFactory] Bound EJB Home 'greetBean' to jndi 'greetJndi>
            '
            20:41:23,435 INFO [EJBDeployer] Deployed: file:/C:/jboss-4.0.3/server/default/t
            mp/deploy/tmp61984greeterapp.zip-contents/greeterapp/WEB-INF/lib/greet.jar
            20:41:23,575 INFO [Http11Protocol] Starting Coyote HTTP/1.1 on http-0.0.0.0-808
            0
            20:41:23,685 INFO [ChannelSocket] JK: ajp13 listening on /0.0.0.0:8009
            20:41:23,700 INFO [JkMain] Jk running ID=0 time=0/62 config=null
            20:41:23,700 INFO [Server] JBoss (MX MicroKernel) [4.0.3 (build: CVSTag=JBoss_4
            _0_3 date=200510042324)] Started in 15s:187ms

            • 3. Re: java.util.zip.ZipException: error in opening zip file
              Peter Johnson Master

              web.app should be in the greeterapp.war/WEB-INF folder. So that I can make sure all of your files are in the correct location, enter the following command at a command prompt (from the deploy directory) and post the results:

              dir /b /s greeterapp.war


              The error message you got is related to the missing web.xml problem.