我正在运行我的动态Web应用程序Web应用程序
我收到以下错误
16:42:14,111 SEVERE [javax.faces] (ServerService Thread Pool -- 123) Unable to obtain InjectionProvider from init time FacesContext. Does this container implement the Mojarra Injection SPI?
16:42:14,112 SEVERE [javax.faces] (ServerService Thread Pool -- 123) Application was not properly initialized at startup, could not find Factory: javax.faces.application.ApplicationFactory. Attempting to find backup.
16:42:14,114 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 123) MSC000001: Failed to start service jboss.undertow.deployment.default-server.default-host./RGExtranet: org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./RGExtranet: java.lang.RuntimeException: java.lang.IllegalStateException: Could not find backup for factory javax.faces.application.ApplicationFactory.
at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:85)
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)
Caused by: java.lang.RuntimeException: java.lang.IllegalStateException: Could not find backup for factory javax.faces.application.ApplicationFactory.
at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:236)
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.IllegalStateException: Could not find backup for factory javax.faces.application.ApplicationFactory.
at javax.faces.FactoryFinderInstance.getFactory(FactoryFinderInstance.java:555)
at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:283)
at org.apache.myfaces.context.servlet.FacesContextImplBase.getApplication(FacesContextImplBase.java:169)
at org.apache.myfaces.context.servlet.FacesContextImplBase.getELContext(FacesContextImplBase.java:231)
at javax.faces.component.UIViewRoot.setLocale(UIViewRoot.java:1488)
at org.apache.myfaces.webapp.AbstractFacesInitializer._createFacesContext(AbstractFacesInitializer.java:529)
at org.apache.myfaces.webapp.AbstractFacesInitializer.initStartupFacesContext(AbstractFacesInitializer.java:501)
at org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:115)
at io.undertow.servlet.core.ApplicationListeners.contextInitialized(ApplicationListeners.java:187)
at io.undertow.servlet.core.DeploymentManagerImpl$1.call(DeploymentManagerImpl.java:200)
at io.undertow.servlet.core.DeploymentManagerImpl$1.call(DeploymentManagerImpl.java:171)
at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:42)
at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:234)
... 8 more
我只有我的面孔2.2.11 api和impl jar在我的类路径中我从web-inf文件夹中删除了jsf api,我尝试过这个解决方案,就像在web.xml中更改监听器类一样,如下所示:
<listener>
<listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
到
<listener>
<listener-class>com.sun.faces.config.ConfigureListener</listener-class>
但它是jsf jar的psrt
我也尝试了jsf jars上面的变化,但错误仍然存在
我尝试了所有可用的解决方案但在我的情况下没有人可用
答案 0 :(得分:0)
这个错误正在发生,因为我在一起使用myfaces和jsf jar。使用my faces或jsf库