0

i am running my dynamic web application web application

i am getting following error

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

i have only my faces 2.2.11 api and impl jars in my class path i removed jsf api's from web-inf folder and i have tried this solution also like changing listener class in web.xml as follow :

 <listener>
<listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>

to

<listener>
<listener-class>com.sun.faces.config.ConfigureListener</listener-class>

but it is psrt of jsf jar

i tried also jsf jars with above change but error still remains

i tried all the solutions available but no one is usable in my case

Devil Decoder
  • 966
  • 1
  • 10
  • 26

1 Answers1

0

this error is happening because i am using myfaces and jsf jars together.use either my faces or jsf libraries

Devil Decoder
  • 966
  • 1
  • 10
  • 26