4 Replies Latest reply on Jun 29, 2016 9:21 AM by Tomaz Cerar

    Can you run a JSF 2.1 app in Wildfly 10?

    Chris Baumgartner Newbie

      I have an older application built on JSF 2.1 and IceFaces 3.3.0. We are currently trying to upgrade from an old version of JBoss to Wildfly 10.

       

      The eventual goal is to upgrade to JSF 2.2 and IceFaces 4.1, but we'd like to do this in steps. The first step being get the current application running in Wildfly 10.

       

      I know that Wildfly 10 ships with JSF 2.2 support. Is it possible to roll it back to JSF 2.1? Currently, I have modified the file jboss-deployment-structure.xml to exclude the JSF subsystem and use my installed version (Mojarra 2.1.29).  I am able to deploy and run the application, but none of my ajax tags are working. I don't get any errors, they simply don't work. So, I'm assuming there is some other dependency that I need to change as well.

       

      Has anyone else tried to run a JSF 2.1 app in Wildfly 10? Is it even possible, or am I wasting my time?

       

      Any help is greatly appreciated.

       

      Thanks.

       

      - Chris

        • 1. Re: Can you run a JSF 2.1 app in Wildfly 10?
          Chris Baumgartner Newbie

          In response to my own question, it would appear that there are problems running a JSF 2.1 app in Wildfly 10. In particular, I get the following error:

           

          SEVERE: Unable to process annotations for url, vfs:/C:/evercore/wildfly/jboss/standalone/deployments/ui.war/WEB-INF/lib/icefaces-3.3.8.jar/META-INF/faces-config.xml.  Reason: java.util.zip.ZipException: zip file is empty

          Jun 27, 2016 11:26:54 AM com.sun.faces.config.JavaClassScanningAnnotationScanner processClasspath

          SEVERE:

          java.util.zip.ZipException: zip file is empty

            at java.util.zip.ZipFile.open(Native Method)

            at java.util.zip.ZipFile.<init>(ZipFile.java:219)

            at java.util.zip.ZipFile.<init>(ZipFile.java:149)

            at java.util.jar.JarFile.<init>(JarFile.java:166)

            at sun.net.www.protocol.jar.URLJarFile.<init>(URLJarFile.java:88)

            at sun.net.www.protocol.jar.URLJarFile$1.run(URLJarFile.java:221)

            at sun.net.www.protocol.jar.URLJarFile$1.run(URLJarFile.java:216)

            at java.security.AccessController.doPrivileged(Native Method)

            at sun.net.www.protocol.jar.URLJarFile.retrieve(URLJarFile.java:215)

            at sun.net.www.protocol.jar.URLJarFile.getJarFile(URLJarFile.java:71)

            at sun.net.www.protocol.jar.JarFileFactory.get(JarFileFactory.java:109)

            at sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:122)

            at sun.net.www.protocol.jar.JarURLConnection.getJarFile(JarURLConnection.java:89)

            at com.sun.faces.config.JavaClassScanningAnnotationScanner.processClasspath(JavaClassScanningAnnotationScanner.java:166)

            at com.sun.faces.config.JavaClassScanningAnnotationScanner.getAnnotatedClasses(JavaClassScanningAnnotationScanner.java:125)

            at com.sun.faces.config.DelegatingAnnotationProvider.getAnnotatedClasses(DelegatingAnnotationProvider.java:85)

            at com.sun.faces.config.ConfigManager$AnnotationScanTask.call(ConfigManager.java:841)

            at com.sun.faces.config.ConfigManager$AnnotationScanTask.call(ConfigManager.java:793)

            at java.util.concurrent.FutureTask.run(FutureTask.java:266)

            at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:351)

            at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:216)

            at io.undertow.servlet.core.ApplicationListeners.contextInitialized(ApplicationListeners.java:187)

            at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:198)

            at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:100)

            at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:82)

            at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)

            at java.util.concurrent.FutureTask.run(FutureTask.java:266)

            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

            at java.lang.Thread.run(Thread.java:745)

            at org.jboss.threads.JBossThread.run(JBossThread.java:320)

            Suppressed: java.nio.file.NoSuchFileException: C:\Users\CBAUMG~1\AppData\Local\Temp\jar_cache6654702243630262449.tmp

            at sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:79)

            at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:97)

            at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:102)

            at sun.nio.fs.WindowsFileSystemProvider.implDelete(WindowsFileSystemProvider.java:269)

            at sun.nio.fs.AbstractFileSystemProvider.delete(AbstractFileSystemProvider.java:103)

            at java.nio.file.Files.delete(Files.java:1126)

            at sun.net.www.protocol.jar.URLJarFile$1.run(URLJarFile.java:226)

            ... 25 more

           

          This seems to be a problem that was in older versions of JBoss, but was fixed:

          • 2. Re: Can you run a JSF 2.1 app in Wildfly 10?
            Tomaz Cerar Master

            This error just indicate that there is something wrong with some jar file, noting more.

             

            how does your deployment look like?

            can you post output of jar -tf <name-of-your-deployment>

            • 3. Re: Can you run a JSF 2.1 app in Wildfly 10?
              Chris Baumgartner Newbie

              Hi Tomaz,

               

              Thanks for your reply. I have attached the output of jar for my war file.

               

              - Chris

              • 4. Re: Can you run a JSF 2.1 app in Wildfly 10?
                Tomaz Cerar Master

                Wau, your lib is a mess. Good thing anything works at all.

                 

                You will need to clean it up

                 

                WEB-INF/lib/javax.inject-1.jar <-- remove, provided by server

                WEB-INF/lib/slf4j-api-1.6.6.jar <-- remove, provided by server

                WEB-INF/lib/log4j-1.2.17.jar <-- remove, provided by server

                WEB-INF/lib/icefaces-3.3.8.jar

                WEB-INF/lib/icefaces-ace-3.3.8.jar

                WEB-INF/lib/tm-businessLogic.jar

                WEB-INF/lib/tm-util.jar

                WEB-INF/lib/AtlasServiceModule-6.2-SNAPSHOT.jar

                WEB-INF/lib/commons-fileupload-1.3.jar

                WEB-INF/lib/httpclient-4.3.6.jar

                WEB-INF/lib/spring-web-3.1.2.RELEASE.jar

                WEB-INF/lib/myfaces-orchestra-core-1.5.jar

                WEB-INF/lib/sqljdbc4-1.0.jar <-- remove, jdbc driver, if anything it belongs to server config not deployment

                WEB-INF/lib/ojdbc6-11.2.0.1.jar <-- remove, jdbc driver, if anything it belongs to server config not deployment

                WEB-INF/lib/jcl-over-slf4j-1.6.6.jar <-- remove, provided by server

                WEB-INF/lib/slf4j-log4j12-1.6.6.jar <-- remove, provided by server

                WEB-INF/lib/icefaces-compat-3.3.8.jar

                WEB-INF/lib/icepush-3.3.8.jar

                WEB-INF/lib/commons-beanutils-1.8.3.jar

                WEB-INF/lib/jxl-2.6.12.jar

                WEB-INF/lib/krysalis-jCharts-1.0.0-alpha-1.jar

                WEB-INF/lib/jul-to-slf4j-1.6.6.jar <-- remove, provided by server

                WEB-INF/lib/spring-context-support-3.1.2.RELEASE.jar

                WEB-INF/lib/spring-webmvc-3.1.2.RELEASE.jar

                WEB-INF/lib/jackson-mapper-asl-1.9.12.jar <-- probably should be removed

                WEB-INF/lib/hibernate-validator-4.2.0.Final.jar <-- remove

                WEB-INF/lib/dcm4che-1.4.19.jar

                WEB-INF/lib/bcprov-jdk15-1.38.jar

                WEB-INF/lib/cglib-2.2.2.jar <-- remove, part of hibernate

                WEB-INF/lib/jstl-1.2.jar <-- remove, provided by server

                WEB-INF/lib/castor-1.0.jar

                WEB-INF/lib/fplibrary-1.0.jar

                WEB-INF/lib/truezip-6.8.2.jar

                WEB-INF/lib/FastInfoset-1.2.12.jar

                WEB-INF/lib/jsx-2.2.7.1.jar

                WEB-INF/lib/jboss-ejb3x-4.2.3.GA.jar <-- remove, that should never be in a deployment

                WEB-INF/lib/gson-2.2.2.jar

                WEB-INF/lib/commons-lang-2.1.jar

                WEB-INF/lib/commons-exec-1.3.jar

                WEB-INF/lib/AtlasDataModel-6.2-SNAPSHOT.jar

                WEB-INF/lib/tm-io.jar

                WEB-INF/lib/tm-storageSystem.jar

                WEB-INF/lib/jboss-seam-no-jsf-2.1.2.jar

                WEB-INF/lib/tm-dtk.jar

                WEB-INF/lib/jai_imageio-1.1.jar

                WEB-INF/lib/jai_core-1.1.3.jar

                WEB-INF/lib/commons-io-2.4.jar

                WEB-INF/lib/jtidy-r938.jar

                WEB-INF/lib/commons-httpclient-3.1.jar

                WEB-INF/lib/httpcore-4.3.3.jar

                WEB-INF/lib/commons-logging-1.1.3.jar

                WEB-INF/lib/aopalliance-1.0.jar

                WEB-INF/lib/spring-beans-3.1.2.RELEASE.jar

                WEB-INF/lib/spring-context-3.1.2.RELEASE.jar

                WEB-INF/lib/spring-core-3.1.2.RELEASE.jar

                WEB-INF/lib/spring-asm-3.1.2.RELEASE.jar

                WEB-INF/lib/spring-expression-3.1.2.RELEASE.jar

                WEB-INF/lib/jackson-core-asl-1.9.12.jar

                WEB-INF/lib/asm-3.3.1.jar

                WEB-INF/lib/spring-tx-3.1.2.RELEASE.jar

                WEB-INF/lib/eclipselink-2.4.0.jar <-- are you using eclipse link as JPA provided? if not remove it.

                WEB-INF/lib/commons-dbcp-1.2.2.jar

                WEB-INF/lib/commons-collections-3.2.1.jar

                WEB-INF/lib/spring-orm-3.1.2.RELEASE.jar

                WEB-INF/lib/c3p0-0.9.1.2.jar

                WEB-INF/lib/javatar-2.5.jar

                WEB-INF/lib/dcm4che-core-2.0.28.jar

                WEB-INF/lib/jibx-run-1.2.2.jar

                WEB-INF/lib/mint-1.2.0.jar

                WEB-INF/lib/jpoller-1.5.jar

                WEB-INF/lib/util-1.5.jar

                WEB-INF/lib/dom4j-1.6.1.jar <-- probably save to remove, also provided by server if needed

                WEB-INF/lib/jcodec-639ea05.jar

                WEB-INF/lib/spring-aop-3.1.2.RELEASE.jar

                WEB-INF/lib/javax.persistence-2.0.4.v201112161009.jar <-- remove, provided by server

                WEB-INF/lib/commonj.sdo-2.1.1.v201112051852.jar

                WEB-INF/lib/commons-pool-1.3.jar

                WEB-INF/lib/spring-jdbc-3.1.2.RELEASE.jar

                WEB-INF/lib/wstx-asl-3.2.1.jar <-- probably should be removed, that is woodstox xml parser, if not needed directly, remove

                WEB-INF/lib/xml-apis-1.0.b2.jar <-- remove, provided by jvm

                WEB-INF/lib/stax-api-1.0.1.jar  <-- remove, provided by jvm

                WEB-INF/lib/javax.faces-2.1.29.jar

                WEB-INF/lib/commons-codec-1.6.jar

                WEB-INF/lib/mail-1.4.1.jar <-- remove, provided by server

                WEB-INF/lib/activation-1.1.jar <-- remove, provided by jvm