1 Reply Latest reply on Aug 26, 2016 11:15 AM by willg1835

    Migrate JBoss EAP from 5.1 to 6.4 and JSF won't work any more

    yjin01

      My Jboss application uses JSF in Presentation tier. It included myfaces-api-1.2.2.jar & myfaces-impl-1.2.2.jar in pt.war file. After migrate JBoss EAP from 5.1 to 6.4. I got the following error when start app:

       

      11:26:37,076 ERROR [org.apache.myfaces.webapp.AbstractFacesInitializer] (ServerService Thread Pool -- 84) An error occured while initializing MyFaces: Class org.jboss.as.weld.webtier.jsf.WeldApplicationFactory is no javax.faces.application. ApplicationFactory: java.lang.IllegalArgumentException: Class org.jboss.as.weld.webtier.jsf.WeldApplicationFactory is no javax.faces.application.ApplicationFactory

       

              at javax.faces.FactoryFinder.newFactoryInstance(FactoryFinder.java:128) [myfaces-api-1.2.2.jar:1.2.2]

       

              at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:107) [myfaces-api-1.2.2.jar:1.2.2]

       

              at org.apache.myfaces.config.FacesConfigurator.configureApplication(FacesConfigurator.java:598) [myfaces-impl-1.2.2.jar:1.2.2]

       

       

      After I include  <module name="javax.faces.api" /> in jboss-deployment-structure.xml for pt, I can bring the application up, but got the following error when I access web login page:

       

       

      09:53:54,353 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/rts-pt].[Faces Servlet]] (http-/127.0.0.1:8081-1) JBWEB000236: Servlet.service() for servlet Faces Servlet threw exception: java.lang.UnsupportedOperationException

      at javax.faces.application.Application.getResourceHandler(Application.java:287) [jboss-jsf-api_2.1_spec-2.1.28.Final-redhat-1.jar:2.1.28.Final-redhat-1]

      at org.jboss.as.weld.webtier.jsf.ForwardingApplication.getResourceHandler(ForwardingApplication.java:256) [jboss-as-weld-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]

      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:588) [jboss-jsf-api_2.1_spec-2.1.28.Final-redhat-1.jar:2.1.28.Final-redhat-1]

      at org.apache.myfaces.webapp.MyFacesServlet.service(MyFacesServlet.java:100) [myfaces-impl-1.2.2.jar:1.2.2]

      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]

       

      My question is "Does myfaces has conflict with jboss-jsf-api_2.1_spec-2.1.28.Final-redhat-1.jar? How can I configure JSF in my application?"

       

      Thanks