6 Replies Latest reply on Oct 18, 2013 12:42 PM by emanuele colonnelli

    Multiple JSF versions on Wildfly-8.0.0.Beta2-SNAPSHOT

    emanuele colonnelli Newbie

      Hello,

       

      I'm testing wildfly-8.0.0.Beta2-SNAPSHOT on Windows 7.

       

      In particular I'm interested on adding JSF-2.1 to my server, keeping the "main" preinstalled version.

       

      To do so I did these steps:

      • Instlled mojarra-2.1.25 using CLI installer
      • Changed the jboss-deployment-structure.xml and I see that now ALL modules are using JSF-2.1 instead of the "main" one. So, I modified the xml to restore the situation I need.
        My xml file below:

      <?xml version="1.0" encoding="UTF-8"?>

          <jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.1">

       

              <!-- This is the module where I'm using JSF 2.1 + Primefaces -->

              <sub-deployment name="motoincontro-admin-web.war">
                  <exclusions>
                      <module name="javax.faces.api" slot="main" />

                      <module name="com.sun.jsf-impl" slot="main" />

                  </exclusions>

                  <dependencies>

                      <module name="javax.faces.api" slot="mojarra-2.1.25" />

                      <module name="com.sun.jsf-impl" slot="mojarra-2.1.25" />

                  </dependencies>

             </sub-deployment>

             <!-- This is the module where I need JSF 2.2.3 (main) -->

             <sub-deployment name="motoincontro-web2.war">

                 <exclusions>

                     <module name="javax.faces.api" slot="mojarra-2.1.25" />

                     <module name="com.sun.jsf-impl" slot="mojarra-2.1.25" />

                 </exclusions>

                 <dependencies>

                     <module name="javax.faces.api" slot="main" />

                     <module name="com.sun.jsf-impl" slot="main" />

                 </dependencies>
          </sub-deployment>

      </jboss-deployment-structure>


      • Added the context param to web.xml:

         <context-param>

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

             <param-value>mojarra-2.1.25</param-value>

         </context-param>

       

       

      I try to start Wildfly but I get the following log messages, and the the application doesn't start:

       

      14:57:46,691 WARNING [javax.enterprise.resource.webcontainer.jsf.application] (MSC service thread 1-3) A @FacesConverter is using both value and forClass, only value will be applied.

      14:57:46,692 WARNING [javax.enterprise.resource.webcontainer.jsf.application] (MSC service thread 1-3) A @FacesConverter is using both value and forClass, only value will be applied.

      14:57:46,692 WARNING [javax.enterprise.resource.webcontainer.jsf.application] (MSC service thread 1-3) A @FacesConverter is using both value and forClass, only value will be applied.

      14:57:46,778 SEVERE [javax.enterprise.resource.webcontainer.jsf.application] (MSC service thread 1-5) JSF1051: Service entry 'org.jboss.as.jsf.injection.JSFInjectionProvider' does not extend DiscoverableInjectionProvider.  Entry will be ignored.

      14:57:46,779 INFO  [javax.enterprise.resource.webcontainer.jsf.application] (MSC service thread 1-5) JSF1048: PostConstruct/PreDestroy annotations present.  ManagedBeans methods marked with these annotations will have said annotations processed.

      14:57:46,890 WARNING [javax.enterprise.resource.webcontainer.jsf.application] (MSC service thread 1-8) A @FacesConverter is using both value and forClass, only value will be applied.

      14:57:46,947 SEVERE [javax.enterprise.resource.webcontainer.jsf.config] (MSC service thread 1-5) Critical error during deployment: : com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! Class org.jboss.as.jsf.injection.JandexAnnotationProvider is not an instance of com.sun.faces.spi.AnnotationProvider

        at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:449) [jsf-impl-2.2.3-jbossorg-1.jar:]

        at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:214) [jsf-impl-2.2.3-jbossorg-1.jar:]

        at io.undertow.servlet.core.ApplicationListeners.contextInitialized(ApplicationListeners.java:173) [undertow-servlet-1.0.0.Beta18.jar:1.0.0.Beta18]

        at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:166) [undertow-servlet-1.0.0.Beta18.jar:1.0.0.Beta18]

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

        at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.start(UndertowDeploymentService.java:71)

        at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1944)

        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1877)

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_45]

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_45]

        at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_45]

      Caused by: javax.faces.FacesException: Class org.jboss.as.jsf.injection.JandexAnnotationProvider is not an instance of com.sun.faces.spi.AnnotationProvider

        at com.sun.faces.spi.AnnotationProviderFactory.createAnnotationProvider(AnnotationProviderFactory.java:78) [jsf-impl-2.2.3-jbossorg-1.jar:]

        at com.sun.faces.config.ConfigManager$AnnotationScanTask.<init>(ConfigManager.java:895) [jsf-impl-2.2.3-jbossorg-1.jar:]

        at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:381) [jsf-impl-2.2.3-jbossorg-1.jar:]

        ... 10 more

       

       

      14:57:46,952 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-5) MSC000001: Failed to start service jboss.undertow.deployment.default-host./motoincontro-web2: org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-host./motoincontro-web2: Failed to start service

        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1900) [jboss-msc-1.2.0.Beta2.jar:1.2.0.Beta2]

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_45]

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_45]

        at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_45]

      Caused by: java.lang.RuntimeException: java.lang.RuntimeException: com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! Class org.jboss.as.jsf.injection.JandexAnnotationProvider is not an instance of com.sun.faces.spi.AnnotationProvider

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

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

        at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.start(UndertowDeploymentService.java:71)

        at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1944) [jboss-msc-1.2.0.Beta2.jar:1.2.0.Beta2]

        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1877) [jboss-msc-1.2.0.Beta2.jar:1.2.0.Beta2]

        ... 3 more

      Caused by: java.lang.RuntimeException: com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! Class org.jboss.as.jsf.injection.JandexAnnotationProvider is not an instance of com.sun.faces.spi.AnnotationProvider

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

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

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

        ... 7 more

      Caused by: com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! Class org.jboss.as.jsf.injection.JandexAnnotationProvider is not an instance of com.sun.faces.spi.AnnotationProvider

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

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

        ... 9 more

      Caused by: javax.faces.FacesException: Class org.jboss.as.jsf.injection.JandexAnnotationProvider is not an instance of com.sun.faces.spi.AnnotationProvider

        at com.sun.faces.spi.AnnotationProviderFactory.createAnnotationProvider(AnnotationProviderFactory.java:78)

        at com.sun.faces.config.ConfigManager$AnnotationScanTask.<init>(ConfigManager.java:895)

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

        ... 10 more

       

       

      Could you help me, please?

       

      Thanks in advance!

       

      E.