Home  >  Forum  >  JSF
Post New Query

Error: Could not find backup for factory javax.faces.context.FacesContextFactory


joined on
March 27,2014
Asked on January 14,2015
I am learning JSF with Tomcat. I have created a sample JSF application. While deploying, I am getting error. How to resolve it.

java.lang.IllegalStateException: Could not find backup for factory javax.faces.context.FacesContextFactory. 
at javax.faces.FactoryFinderInstance.getFactory(Unknown Source)
at javax.faces.FactoryFinder.getFactory(Unknown Source)
at javax.faces.webapp.FacesServlet.init(Unknown Source)
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1284)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1197)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1087)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5229)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5516)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1083)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1880)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
joined on
June 15,2014
Replied on January 14,2015

It seems that you have not included jsf-ipml jar.
To resolve the JSF dependency, you should included JAR dependency as below. 

For gradle use 
    compile 'com.sun.faces:jsf-api:2.2.9'
    compile 'com.sun.faces:jsf-impl:2.2.9'

and Maven use 
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-api</artifactId>
<version>2.2.9</version>
</dependency>


<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-impl</artifactId>
<version>2.2.9</version>
</dependency>


Write Answer









Copyright ©2017 concretepage.com, all rights reserved |Privacy Policy | Contact Us