title: How can I force tomEE to use mojarra?
body: <p>Is there any good way to ask TomEE to use mojarra instead of myfaces? I have tried to add the following in my pom.xml. </p>
  
  <pre><code>&lt;dependency&gt;
  &lt;groupId&gt;org.glassfish&lt;/groupId&gt;
  &lt;artifactId&gt;javax.faces&lt;/artifactId&gt;
  &lt;version&gt;${mojarra-version}&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
  &lt;groupId&gt;org.apache.openejb&lt;/groupId&gt;
  &lt;artifactId&gt;tomee-mojarra&lt;/artifactId&gt;
  &lt;version&gt;1.6.0.2&lt;/version&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p>However, I still get the following error when start TomEE.</p>
  
  <pre><code>SEVERE: StandardWrapper.Throwable
  java.lang.IllegalStateException: Could not find backup for factory javax.faces.context.FacesContextFactory. 
      at javax.faces.FactoryFinder$FactoryManager.getFactory(FactoryFinder.java:1135)
      at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:379)
      at javax.faces.webapp.FacesServlet.init(FacesServlet.java:350)
      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:5210)
      at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5493)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
      at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
      at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
      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)
  
  Jul 22, 2014 6:30:29 PM org.apache.catalina.core.StandardContext loadOnStartup
  SEVERE: Servlet /war.upms.online threw load() exception
  java.lang.IllegalStateException: Could not find backup for factory     javax.faces.context.FacesContextFactory. 
      at javax.faces.FactoryFinder$FactoryManager.getFactory(FactoryFinder.java:1135)
      at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:379)
      at javax.faces.webapp.FacesServlet.init(FacesServlet.java:350)
      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:5210)
      at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5493)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
      at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
      at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
      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)
  </code></pre>
  
  <p>I have checked and confirmed that the javax.faces-2.2.6.jar is in the WEB-INF/lib of my deployed war. </p>
  
  <p>My application can started if I remove the above mojarra dependency from pom.xml and use the following instead.</p>
  
  <pre><code>&lt;dependency&gt;
  &lt;groupId&gt;org.apache.myfaces.core&lt;/groupId&gt;
  &lt;artifactId&gt;myfaces-api&lt;/artifactId&gt;
  &lt;version&gt;${myfaces-version}&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
  &lt;groupId&gt;org.apache.myfaces.core&lt;/groupId&gt;
  &lt;artifactId&gt;myfaces-impl&lt;/artifactId&gt;
  &lt;version&gt;${myfaces-version}&lt;/version&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p>Thanks for your help.</p>