title: Application was not properly initialized at startup, could not find Factory: javax.faces.context.FacesContextFactory
body: <p>Hi I have a spring richfaces project run with myfaces 2.1.10, but I want to change to Mojarra 2.1.19 , but the application give me the error:</p>
  
  <pre><code>SEVERE [javax.faces] (MSC service thread 1-4) Application was not properly initialized at startup, could not find Factory: javax.faces.context.FacesContextFactory. Attempting to find backup.
  ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/projvehimerc]] (MSC service thread 1-4) StandardWrapper.Throwable: java.lang.IllegalStateException: Could not find backup for factory javax.faces.context.FacesContextFactory. 
  </code></pre>
  
  <p>I want to use jboss-jsf-api_2.1_spec, my pom.xml:</p>
  
  <pre><code>&lt;properties&gt;
      &lt;!-- [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent! --&gt;
      &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
      &lt;spring.version&gt;3.1.3.RELEASE&lt;/spring.version&gt;
      &lt;hibernate.version&gt;4.1.8.Final&lt;/hibernate.version&gt;
      &lt;org.richfaces.bom.version&gt;4.3.0.Final&lt;/org.richfaces.bom.version&gt;
      &lt;spring.security.version&gt;3.1.3.RELEASE&lt;/spring.security.version&gt;
  &lt;/properties&gt;
  &lt;dependencyManagement&gt;
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.richfaces&lt;/groupId&gt;
              &lt;artifactId&gt;richfaces-bom&lt;/artifactId&gt;
              &lt;version&gt;${org.richfaces.bom.version}&lt;/version&gt;
              &lt;scope&gt;import&lt;/scope&gt;
              &lt;type&gt;pom&lt;/type&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.jboss.spec.javax.faces&lt;/groupId&gt;
              &lt;artifactId&gt;jboss-jsf-api_2.1_spec&lt;/artifactId&gt;
              &lt;version&gt;2.1.19.Final&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.jboss.spec.javax.servlet&lt;/groupId&gt;
              &lt;artifactId&gt;jboss-servlet-api_3.0_spec&lt;/artifactId&gt;
              &lt;version&gt;1.0.2.Final&lt;/version&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  </code></pre>
  
  <p></p>
  
  <p>my web.xml, version 3.0 :</p>
  
  <pre><code> &lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" 
   xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0"&gt;
  
  &lt;display-name&gt;richfaces-application&lt;/display-name&gt;
  &lt;!-- Listener para crear el Spring Container compartido por todos los 
  Servlets y Filters (WebApplication Context)--&gt;
  &lt;context-param&gt;
      &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt;
      &lt;param-value&gt;
          classpath*:META-INF/spring/spring-master.xml
          WEB-INF/spring/spring-security.xml
      &lt;/param-value&gt;
  &lt;/context-param&gt;
  
      &lt;listener&gt;
          &lt;listener-class&gt;org.springframework.web.context.ContextLoaderListener&lt;/listener-class&gt;
      &lt;/listener&gt;
  &lt;!-- For JSF --&gt;
      &lt;listener&gt;
          &lt;listener-class&gt;org.springframework.web.context.request.RequestContextListener&lt;/listener-class&gt;
      &lt;/listener&gt;
  
  &lt;!-- Jboss not use it bundle integrated JSF --&gt;
      &lt;context-param&gt;
          &lt;param-name&gt;org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL&lt;/param-name&gt;
          &lt;param-value&gt;true&lt;/param-value&gt;
      &lt;/context-param&gt;
  
  &lt;!-- Spring JavaServiceFaces framework ApacheMyfaces  
      &lt;listener&gt;
          &lt;listener-class&gt;org.apache.myfaces.webapp.StartupServletContextListener&lt;/listener-class&gt;
      &lt;/listener&gt;
  
  --&gt;
  &lt;!-- Spring Security, for all --&gt;
      &lt;filter&gt;
          &lt;filter-name&gt;springSecurityFilterChain&lt;/filter-name&gt;
          &lt;filter-class&gt;org.springframework.web.filter.DelegatingFilterProxy&lt;/filter-class&gt;
      &lt;/filter&gt;
      &lt;filter-mapping&gt;
          &lt;filter-name&gt;springSecurityFilterChain&lt;/filter-name&gt;
          &lt;url-pattern&gt;/*&lt;/url-pattern&gt;
      &lt;/filter-mapping&gt;
  
  &lt;!-- RichFaces Framework --&gt;
      &lt;!-- For control of skins --&gt;
      &lt;context-param&gt;
          &lt;param-name&gt;org.richfaces.enableControlSkinning&lt;/param-name&gt;
          &lt;param-value&gt;true&lt;/param-value&gt;
      &lt;/context-param&gt;
  
       &lt;context-param&gt;
           &lt;param-name&gt;org.richfaces.skin&lt;/param-name&gt;
           &lt;param-value&gt;blueSky&lt;/param-value&gt;
       &lt;/context-param&gt;
  
  &lt;!-- Servlet for Dispatcher of flows --&gt;
  &lt;servlet&gt;
      &lt;servlet-name&gt;transportes&lt;/servlet-name&gt;
      &lt;servlet-class&gt;org.springframework.web.servlet.DispatcherServlet&lt;/servlet-class&gt;
      &lt;init-param&gt;
          &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt;
          &lt;param-value&gt;WEB-INF/spring/transportes-servlet.xml&lt;/param-value&gt;
      &lt;/init-param&gt;
       &lt;load-on-startup&gt;1&lt;/load-on-startup&gt; 
  &lt;/servlet&gt;
  &lt;servlet-mapping&gt;
          &lt;servlet-name&gt;transportes&lt;/servlet-name&gt;
          &lt;url-pattern&gt;/flows/*&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;
  
  &lt;!-- Servlets for JSF--&gt;
      &lt;servlet&gt;
          &lt;servlet-name&gt;faces&lt;/servlet-name&gt;
          &lt;servlet-class&gt;javax.faces.webapp.FacesServlet&lt;/servlet-class&gt;
          &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
      &lt;/servlet&gt;
      &lt;servlet-mapping&gt;
          &lt;servlet-name&gt;faces&lt;/servlet-name&gt;
          &lt;!--  &lt;url-pattern&gt;*.xhtml&lt;/url-pattern&gt; --&gt;
          &lt;url-pattern&gt;/faces/*&lt;/url-pattern&gt;
      &lt;/servlet-mapping&gt;
      &lt;!-- Use JSF view templates saved as *.xhtml, for use with Facelets --&gt;
      &lt;context-param&gt;
          &lt;param-name&gt;javax.faces.DEFAULT_SUFFIX&lt;/param-name&gt;
          &lt;param-value&gt;.xhtml&lt;/param-value&gt;
      &lt;/context-param&gt;
  
  &lt;!-- Set the PROJECT_STAGE to 'Development' to receive constructive error messages during development.
  Change the PROJECT_STAGE to 'Production' when putting the application into production --&gt;
      &lt;context-param&gt;
          &lt;param-name&gt;javax.faces.PROJECT_STAGE&lt;/param-name&gt;
          &lt;param-value&gt;Development&lt;/param-value&gt;
      &lt;/context-param&gt;
  &lt;!-- Page That control SpringWeb --&gt;
      &lt;welcome-file-list&gt;
          &lt;welcome-file&gt;index.jsf&lt;/welcome-file&gt;
      &lt;/welcome-file-list&gt;
  &lt;/web-app&gt;
  </code></pre>
  
  <p>What is missing?, thnks.</p>