我在最新的Wildfly 9.0.1.Final(JBoss)上运行我的代码。 在部署期间,我遇到了很多问题,部署被标记为faild。 下面是我的server.log
ERROR [org.apache.myfaces.webapp.StartupServletContextListener] (ServerService Thread Pool -- 262) Error initializing ServletContext: java.lang.UnsupportedOperationException
at javax.faces.application.Application.addELContextListener(Application.java:1427)
at org.jboss.as.jsf.injection.weld.WeldApplication.<init>(WeldApplication.java:56)
at org.jboss.as.jsf.injection.weld.WeldApplicationFactory.getApplication(WeldApplicationFactory.java:52)
at org.apache.myfaces.config.FacesConfigurator.configureApplication(FacesConfigurator.java:568)
at org.apache.myfaces.config.FacesConfigurator.configure(FacesConfigurator.java:148)
at org.apache.myfaces.webapp.StartupServletContextListener.initFaces(StartupServletContextListener.java:68)
at org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:51)
at io.undertow.servlet.core.ApplicationListeners.contextInitialized(ApplicationListeners.java:173)
at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:195)
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:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
at org.jboss.threads.JBossThread.run(JBossThread.java:320)
2015-09-04 11:46:13,506 ERROR [stderr] (ServerService Thread Pool -- 262) java.lang.UnsupportedOperationException
2015-09-04 11:46:13,506 ERROR [stderr] (ServerService Thread Pool -- 262) at javax.faces.application.Application.addELContextListener(Application.java:1427)
2015-09-04 11:46:13,506 ERROR [stderr] (ServerService Thread Pool -- 262) at org.jboss.as.jsf.injection.weld.WeldApplication.<init>(WeldApplication.java:56)
2015-09-04 11:46:13,506 ERROR [stderr] (ServerService Thread Pool -- 262) at org.jboss.as.jsf.injection.weld.WeldApplicationFactory.getApplication(WeldApplicationFactory.java:52)
2015-09-04 11:46:13,506 ERROR [stderr] (ServerService Thread Pool -- 262) at org.apache.myfaces.config.FacesConfigurator.configureApplication(FacesConfigurator.java:568)
2015-09-04 11:46:13,506 ERROR [stderr] (ServerService Thread Pool -- 262) at org.apache.myfaces.config.FacesConfigurator.configure(FacesConfigurator.java:148)
2015-09-04 11:46:13,522 ERROR [stderr] (ServerService Thread Pool -- 262) at org.apache.myfaces.webapp.StartupServletContextListener.initFaces(StartupServletContextListener.java:68)
2015-09-04 11:46:13,522 ERROR [stderr] (ServerService Thread Pool -- 262) at org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:51)
2015-09-04 11:46:13,522 ERROR [stderr] (ServerService Thread Pool -- 262) at io.undertow.servlet.core.ApplicationListeners.contextInitialized(ApplicationListeners.java:173)
2015-09-04 11:46:13,522 ERROR [stderr] (ServerService Thread Pool -- 262) at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:195)
2015-09-04 11:46:13,522 ERROR [stderr] (ServerService Thread Pool -- 262) at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:100)
2015-09-04 11:46:13,522 ERROR [stderr] (ServerService Thread Pool -- 262) at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:82)
2015-09-04 11:46:13,522 ERROR [stderr] (ServerService Thread Pool -- 262) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
2015-09-04 11:46:13,522 ERROR [stderr] (ServerService Thread Pool -- 262) at java.util.concurrent.FutureTask.run(FutureTask.java:262)
2015-09-04 11:46:13,522 ERROR [stderr] (ServerService Thread Pool -- 262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
2015-09-04 11:46:13,522 ERROR [stderr] (ServerService Thread Pool -- 262) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
2015-09-04 11:46:13,522 ERROR [stderr] (ServerService Thread Pool -- 262) at java.lang.Thread.run(Thread.java:745)
2015-09-04 11:46:13,522 ERROR [stderr] (ServerService Thread Pool -- 262) at org.jboss.threads.JBossThread.run(JBossThread.java:320)
2015-09-04 11:46:13,522 INFO [org.apache.myfaces.webapp.StartupServletContextListener] (ServerService Thread Pool -- 262) ServletContext 'E:\Mahendra\FDMS\FDMS Software\wildfly-9.0.1.Final\wildfly-9.0.1.Final\standalone\tmp\vfs\deployment\deployment4b98e9eab26d7135\WEBFDMSDashboard.war-490d541171eb43e' initialized.
2015-09-04 11:46:13,537 INFO [javax.enterprise.resource.webcontainer.jsf.config] (ServerService Thread Pool -- 262) Initializing Mojarra 2.2.11-jbossorg-1 20150505-1501 for context '/dashboard'
2015-09-04 11:46:17,438 INFO [org.wildfly.extension.undertow] (ServerService Thread Pool -- 272) WFLYUT0021: Registered web context: /webservicesfdms
2015-09-04 11:46:17,548 INFO [org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean] (MSC service thread 1-1) Creating Service {http://schemas.xmlsoap.org/ws/2004/10/wsat}WSATCoordinator from WSDL: WEB-INF/wsdl/wsat.wsdl
2015-09-04 11:46:18,919 SEVERE [javax.faces] (ServerService Thread Pool -- 262) Unable to call @PreDestroy annotated methods because no InjectionProvider can be found. Does this container implement the Mojarra Injection SPI?
2015-09-04 11:46:18,997 SEVERE [javax.enterprise.resource.webcontainer.jsf.config] (ServerService Thread Pool -- 262) Critical error during deployment: : com.sun.faces.config.ConfigurationException: Factory 'javax.faces.lifecycle.ClientWindowFactory' was not configured properly.
at com.sun.faces.config.processor.FactoryConfigProcessor.verifyFactoriesExist(FactoryConfigProcessor.java:330)
at com.sun.faces.config.processor.FactoryConfigProcessor.process(FactoryConfigProcessor.java:236)
at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:439)
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:227)
at io.undertow.servlet.core.ApplicationListeners.contextInitialized(ApplicationListeners.java:173)
at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:195)
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:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
at org.jboss.threads.JBossThread.run(JBossThread.java:320)
Caused by: javax.faces.FacesException: com.sun.faces.lifecycle.ClientWindowFactoryImpl
at javax.faces.FactoryFinderInstance.getImplGivenPreviousImpl(FactoryFinderInstance.java:404)
at javax.faces.FactoryFinderInstance.getImplementationInstance(FactoryFinderInstance.java:248)
at javax.faces.FactoryFinderInstance.getFactory(FactoryFinderInstance.java:529)
at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:275)
at com.sun.faces.config.processor.FactoryConfigProcessor.verifyFactoriesExist(FactoryConfigProcessor.java:328)
... 13 more
Caused by: java.lang.UnsupportedOperationException
at javax.faces.application.Application.addELContextListener(Application.java:1427)
at org.jboss.as.jsf.injection.weld.WeldApplication.<init>(WeldApplication.java:56)
at org.jboss.as.jsf.injection.weld.WeldApplicationFactory.getApplication(WeldApplicationFactory.java:52)
at com.sun.faces.config.InitFacesContext.getApplication(InitFacesContext.java:144)
at com.sun.faces.lifecycle.ClientWindowFactoryImpl.<init>(ClientWindowFactoryImpl.java:62)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at java.lang.Class.newInstance(Class.java:374)
at javax.faces.FactoryFinderInstance.getImplGivenPreviousImpl(FactoryFinderInstance.java:402)
... 17 more
2015-09-04 11:46:18,997 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 262) MSC000001: Failed to start service jboss.undertow.deployment.default-server.default-host./dashboard: org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./dashboard: java.lang.RuntimeException: java.lang.RuntimeException: com.sun.faces.config.ConfigurationException: Factory 'javax.faces.lifecycle.ClientWindowFactory' was not configured properly.
at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:85)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
at org.jboss.threads.JBossThread.run(JBossThread.java:320)
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: com.sun.faces.config.ConfigurationException: Factory 'javax.faces.lifecycle.ClientWindowFactory' was not configured properly.
at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:224)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:100)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:82)
... 6 more
Caused by: java.lang.RuntimeException: com.sun.faces.config.ConfigurationException: Factory 'javax.faces.lifecycle.ClientWindowFactory' was not configured properly.
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:292)
at io.undertow.servlet.core.ApplicationListeners.contextInitialized(ApplicationListeners.java:173)
at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:195)
... 8 more
Caused by: com.sun.faces.config.ConfigurationException: Factory 'javax.faces.lifecycle.ClientWindowFactory' was not configured properly.
at com.sun.faces.config.processor.FactoryConfigProcessor.verifyFactoriesExist(FactoryConfigProcessor.java:330)
at com.sun.faces.config.processor.FactoryConfigProcessor.process(FactoryConfigProcessor.java:236)
at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:439)
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:227)
... 10 more
Caused by: javax.faces.FacesException: com.sun.faces.lifecycle.ClientWindowFactoryImpl
at javax.faces.FactoryFinderInstance.getImplGivenPreviousImpl(FactoryFinderInstance.java:404)
at javax.faces.FactoryFinderInstance.getImplementationInstance(FactoryFinderInstance.java:248)
at javax.faces.FactoryFinderInstance.getFactory(FactoryFinderInstance.java:529)
at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:275)
at com.sun.faces.config.processor.FactoryConfigProcessor.verifyFactoriesExist(FactoryConfigProcessor.java:328)
... 13 more
Caused by: java.lang.UnsupportedOperationException
at javax.faces.application.Application.addELContextListener(Application.java:1427)
at org.jboss.as.jsf.injection.weld.WeldApplication.<init>(WeldApplication.java:56)
at org.jboss.as.jsf.injection.weld.WeldApplicationFactory.getApplication(WeldApplicationFactory.java:52)
at com.sun.faces.config.InitFacesContext.getApplication(InitFacesContext.java:144)
at com.sun.faces.lifecycle.ClientWindowFactoryImpl.<init>(ClientWindowFactoryImpl.java:62)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at java.lang.Class.newInstance(Class.java:374)
at javax.faces.FactoryFinderInstance.getImplGivenPreviousImpl(FactoryFinderInstance.java:402)
... 17 more
请帮我解决这个问题。 感谢。
答案 0 :(得分:0)
WildFly包含JSF参考实现Mojarra。您似乎正在使用MyFaces,可能是嵌入在您的JAR中。这不是开箱即用的。
有关使用WildFly的其他JSF实现,请参阅this article。