Using another JSF implementation in JBoss AS 7.0.1
gastaldi Aug 22, 2011 5:20 PMHello !
I am trying to bundle a different JSF implementation in AS 7.0.1. I tried using the org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL context param, but it didn´t work very well. The following stack trace is shown if I try to load MyFaces 2.0.7, with this param enabled:
18:16:13,323 GRAVE [org.apache.myfaces.webapp.AbstractFacesInitializer] (MSC service thread 1-7) 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:307) [myfaces-api-2.0.7.jar:] at javax.faces.FactoryFinder._getFactory(FactoryFinder.java:273) [myfaces-api-2.0.7.jar:] at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:191) [myfaces-api-2.0.7.jar:] at org.apache.myfaces.config.FacesConfigurator.configureApplication(FacesConfigurator.java:484) [myfaces-impl-2.0.7.jar:] at org.apache.myfaces.config.FacesConfigurator.configure(FacesConfigurator.java:398) [myfaces-impl-2.0.7.jar:] at org.apache.myfaces.webapp.AbstractFacesInitializer.buildConfiguration(AbstractFacesInitializer.java:309) [myfaces-impl-2.0.7.jar:] at org.apache.myfaces.webapp.Jsp21FacesInitializer.initContainerIntegration(Jsp21FacesInitializer.java:73) [myfaces-impl-2.0.7.jar:] at org.apache.myfaces.webapp.AbstractFacesInitializer.initFaces(AbstractFacesInitializer.java:125) [myfaces-impl-2.0.7.jar:] at org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:111) [myfaces-impl-2.0.7.jar:] at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3368) [jbossweb-7.0.1.Final.jar:7.0.1.Final] at org.apache.catalina.core.StandardContext.start(StandardContext.java:3821) [jbossweb-7.0.1.Final.jar:7.0.1.Final] at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:70) [jboss-as-web-7.0.1.Final.jar:7.0.1.Final] at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1765) at org.jboss.msc.service.ServiceControllerImpl$ClearTCCLTask.run(ServiceControllerImpl.java:2291) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_24] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_24] at java.lang.Thread.run(Thread.java:662) [:1.6.0_24]
If I add Dependencies: javax.faces.api to my MANIFEST.MF, I get:
18:22:36,105 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/exemplo]] (MSC service thread 1-6) Exception sending context initialized event to listener instance of class org.apache.myfaces.webapp.StartupServletContextListener: java.lang.IllegalStateException: O aplicativo não foi iniciado corretamente na inicialização. Não foi possível encontrar Fábrica: javax.faces.application.ApplicationFactory at javax.faces.FactoryFinder$FactoryManager.getFactory(FactoryFinder.java:804) [jboss-jsf-api_2.0_spec-1.0.0.Final.jar:1.0.0.Final] at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:306) [jboss-jsf-api_2.0_spec-1.0.0.Final.jar:1.0.0.Final] at org.apache.myfaces.context.servlet.FacesContextImplBase.getApplication(FacesContextImplBase.java:131) [myfaces-impl-2.0.7.jar:] at org.apache.myfaces.context.servlet.FacesContextImplBase.getELContext(FacesContextImplBase.java:180) [myfaces-impl-2.0.7.jar:] at javax.faces.component.UIViewRoot.setLocale(UIViewRoot.java:1456) [jboss-jsf-api_2.0_spec-1.0.0.Final.jar:1.0.0.Final] at org.apache.myfaces.webapp.AbstractFacesInitializer._createFacesContext(AbstractFacesInitializer.java:404) [myfaces-impl-2.0.7.jar:] at org.apache.myfaces.webapp.AbstractFacesInitializer.initStartupFacesContext(AbstractFacesInitializer.java:376) [myfaces-impl-2.0.7.jar:] at org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:105) [myfaces-impl-2.0.7.jar:] at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3368) [jbossweb-7.0.1.Final.jar:7.0.1.Final] at org.apache.catalina.core.StandardContext.start(StandardContext.java:3821) [jbossweb-7.0.1.Final.jar:7.0.1.Final] at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:70) [jboss-as-web-7.0.1.Final.jar:7.0.1.Final] at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1765) at org.jboss.msc.service.ServiceControllerImpl$ClearTCCLTask.run(ServiceControllerImpl.java:2291) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_24] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_24] at java.lang.Thread.run(Thread.java:662) [:1.6.0_24]
Is this parameter supposed to work on 7.0.1 ? Any help appreciated.
Regards,
George Gastaldi