9 Replies Latest reply on Sep 24, 2019 11:03 AM by vbalasub

    ZipException with JBoss 7.1.3 (EAP 6.0.1) and RichFaces 4.3.0

    rodrigo.uchoa

      I'm getting a weird exception and my application is being deployed:

       

      11:23:36,467 INFO  [javax.enterprise.resource.webcontainer.jsf.config] (MSC service thread 1-4) Initializing Mojarra 2.1.13-jbossorg-1 20121010-0442 for context '/siasp'
      11:23:38,862 INFO  [javax.enterprise.resource.webcontainer.jsf.application] (MSC service thread 1-4) JSF1048: PostConstruct/PreDestroy annotations present.  ManagedBeans methods marked with these annotations will have said annotations processed.
      11:23:38,977 SEVERE [javax.enterprise.resource.webcontainer.jsf.config] (MSC service thread 1-4) Unable to process annotations for url, vfs:/Users/rodrigouchoa/Java/jboss-eap-6.0/standalone/deployments/siasp.war/WEB-INF/lib/richfaces-components-ui-4.3.0.Final.jar/META-INF/faces-config.xml.  Reason: java.util.zip.ZipException: zip file is empty
      11:23:38,977 SEVERE [javax.enterprise.resource.webcontainer.jsf.config] (MSC service thread 1-4) : java.util.zip.ZipException: zip file is empty
          at java.util.zip.ZipFile.open(Native Method) [rt.jar:1.7.0_17]
          at java.util.zip.ZipFile.<init>(ZipFile.java:214) [rt.jar:1.7.0_17]
          at java.util.zip.ZipFile.<init>(ZipFile.java:144) [rt.jar:1.7.0_17]
          at java.util.jar.JarFile.<init>(JarFile.java:153) [rt.jar:1.7.0_17]
          at sun.net.www.protocol.jar.URLJarFile.<init>(URLJarFile.java:88) [rt.jar:1.7.0_17]
          at sun.net.www.protocol.jar.URLJarFile$1.run(URLJarFile.java:221) [rt.jar:1.7.0_17]
          at sun.net.www.protocol.jar.URLJarFile$1.run(URLJarFile.java:216) [rt.jar:1.7.0_17]
          at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.7.0_17]
          at sun.net.www.protocol.jar.URLJarFile.retrieve(URLJarFile.java:215) [rt.jar:1.7.0_17]
          at sun.net.www.protocol.jar.URLJarFile.getJarFile(URLJarFile.java:71) [rt.jar:1.7.0_17]
          at sun.net.www.protocol.jar.JarFileFactory.get(JarFileFactory.java:73) [rt.jar:1.7.0_17]
          at sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:122) [rt.jar:1.7.0_17]
          at sun.net.www.protocol.jar.JarURLConnection.getJarFile(JarURLConnection.java:89) [rt.jar:1.7.0_17]
          at com.sun.faces.config.JavaClassScanningAnnotationScanner.processClasspath(JavaClassScanningAnnotationScanner.java:166) [jsf-impl-2.1.13-redhat-1.jar:2.1.13-redhat-1]
          at com.sun.faces.config.JavaClassScanningAnnotationScanner.getAnnotatedClasses(JavaClassScanningAnnotationScanner.java:125) [jsf-impl-2.1.13-redhat-1.jar:2.1.13-redhat-1]
          at com.sun.faces.config.DelegatingAnnotationProvider.getAnnotatedClasses(DelegatingAnnotationProvider.java:85) [jsf-impl-2.1.13-redhat-1.jar:2.1.13-redhat-1]
          at com.sun.faces.config.ConfigManager$AnnotationScanTask.call(ConfigManager.java:845) [jsf-impl-2.1.13-redhat-1.jar:2.1.13-redhat-1]
          at com.sun.faces.config.ConfigManager$AnnotationScanTask.call(ConfigManager.java:797) [jsf-impl-2.1.13-redhat-1.jar:2.1.13-redhat-1]
          at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) [rt.jar:1.7.0_17]
          at java.util.concurrent.FutureTask.run(FutureTask.java:166) [rt.jar:1.7.0_17]
          at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:352) [jsf-impl-2.1.13-redhat-1.jar:2.1.13-redhat-1]
          at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:223) [jsf-impl-2.1.13-redhat-1.jar:2.1.13-redhat-1]
          at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3392) [jbossweb-7.0.17.Final-redhat-1.jar:]
          at org.apache.catalina.core.StandardContext.start(StandardContext.java:3850) [jbossweb-7.0.17.Final-redhat-1.jar:]
          at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:89) [jboss-as-web-7.1.3.Final-redhat-4.jar:7.1.3.Final-redhat-4]
          at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
          at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_17]
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_17]
          at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_17]
      

       

      Does anyone have a clue?

        • 1. Re: ZipException with JBoss 7.1.3 (EAP 6.0.1) and RichFaces 4.3.0
          sfcoy

          Is there any chance that the richfaces-components-ui-4.3.0.Final.jar is exploded inside the WEB-INF/lib directory?

          • 2. Re: ZipException with JBoss 7.1.3 (EAP 6.0.1) and RichFaces 4.3.0
            rodrigo.uchoa

            No, it's a perfectly normal .jar file. I even uncompressed it myself to make sure it wasn't corrupted or anything.

            • 3. Re: ZipException with JBoss 7.1.3 (EAP 6.0.1) and RichFaces 4.3.0
              jaikiran

              It's trying to read from a vfs URL which it doesn't understand:

               

              vfs:/Users/rodrigouchoa/Java/jboss-eap-6.0/standalone/deployments/siasp.war/WEB-INF/lib/richfaces-components-ui-4.3.0.Final.jar/META-INF/faces-config.xml

              • 4. Re: ZipException with JBoss 7.1.3 (EAP 6.0.1) and RichFaces 4.3.0
                jaikiran

                How have you configured JSF for this application?

                • 5. Re: ZipException with JBoss 7.1.3 (EAP 6.0.1) and RichFaces 4.3.0
                  rodrigo.uchoa

                  jaikiran pai wrote:

                   

                  It's trying to read from a vfs URL which it doesn't understand:

                   

                  vfs:/Users/rodrigouchoa/Java/jboss-eap-6.0/standalone/deployments/siasp.war/WEB-INF/lib/richfaces-components-ui-4.3.0.Final.jar/META-INF/faces-config.xml

                   

                  Why wouldn't it? Is it possible that the URL is just too long? The URL is right by the way. I can navigate to it pasting the exact same URL in the command line.

                  • 6. Re: ZipException with JBoss 7.1.3 (EAP 6.0.1) and RichFaces 4.3.0
                    rodrigo.uchoa

                    jaikiran pai wrote:

                     

                    How have you configured JSF for this application?

                     

                    What do you mean? It's a normal JSF 2 application. I should point out that even with this exception the application is working fine. Richfaces is working fine too. But getting a severe exception starting up really bugs me.

                    • 7. Re: ZipException with JBoss 7.1.3 (EAP 6.0.1) and RichFaces 4.3.0
                      michael-s

                      We get the same ZipException with a bundled jsf-Version but the vfs path is different:

                      SEVERE [javax.enterprise.resource.webcontainer.jsf.config] (MSC service thread 1-3) Unable to process annotations for url, vfs:/C:/jboss-eap-6.0.1/bin/content/STD-SNAPSHOT-jboss7.war/WEB-INF/lib/presentation-4.2.3.jar/META-INF/faces-config.xml.  Reason: java.util.zip.ZipException: zip file is empty

                       

                      We use org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL with jsf-impl-2.0.9.jar.

                      Despite the SEVERE log message the application is working.

                      • 8. Re: ZipException with JBoss 7.1.3 (EAP 6.0.1) and RichFaces 4.3.0
                        steelhand900

                        Hello,

                         

                        I found an alternative to this error that can help you.

                        I found the same problem using this below architecture:

                         

                        Shiro 1.2.3

                        JSF (API / IMPL) 2.2.8-2

                        Primefaces 5.2 or 5.0 Primefaces

                        JBoss EAP 6.4

                         

                        I decided to change the version of the JSF (2.2.8-2) for version 2.2.8-10. it's ok!

                         

                        <context-param>

                          <param-name>org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL</param-name>

                          <param-value>true</param-value>

                        </context-param>

                         

                        14: 08: 54.679 INFO [javax.enterprise.resource.webcontainer.jsf.config] (ServerService Thread Pool - 54) Starting Mojarra 2.2.8-10 (20150625-1224 https://svn.java.net/svn/ mojarra~svn/tags/2.2.8-10@14818) to the context '/software'

                        14: 08: 57.296 INFO [javax.enterprise.resource.webcontainer.jsf.application] (ServerService Thread Pool - 54) JSF1048: Notes PostConstruct / PreDestroy present. The ManagedBeans methods marked with these annotations inform the processed notes.

                        14: 08: 58.793 INFO [javax.enterprise.resource.webcontainer.jsf.config] (ServerService Thread Pool - 54) Monitoring jndi: /default-host/ecom_adimistration/WEB-INF/faces-config.xml for modifications

                        14: 08: 58.818 INFO [org.primefaces.webapp.PostConstructApplicationEventListener] ServerService Thread Pool - 54) Running on PrimeFaces 5.2

                        • 9. Re: ZipException with JBoss 7.1.3 (EAP 6.0.1) and RichFaces 4.3.0
                          vbalasub

                          Faced this same zipException at a customer using multiJSF feature and JSF 2.0.6 and Richfaces 4.2.0.Final.  Setup jsf as a module in EAP 6/7 in a separate slot.

                           

                          Added  following config in web app, web.xml, to get rid of this harmless but annoying error. Don't forget to update the slot name appropriately.

                          SEVERE [javax.enterprise.resource.webcontainer.jsf.config] (MSC service thread 1-4) : java.util.zip.ZipException: zip file is empty

                          Root cause was java.nio.file.NoSuchFileException: /AppData/Local/Temp/jar_cache****.tmp

                          <context-param>
                            <param-name>org.jboss.jbossfaces.JSF_CONFIG_NAME</param-name>
                            <param-value>jsf206</param-value>
                           </context-param>