title: java.lang.ClassNotFoundException: javax.faces.application.ApplicationFactory
body: <p>I am writing a web application using JSF 2. I have downloaded mojarra-2.1.3-FCS-binary.zip and myfaces-core-assembly-2.1.3-bin.zip, and with each library, I'm getting the following exception:</p>
  
  <pre><code>java.lang.NoClassDefFoundError: javax/faces/application/ApplicationFactory
      at java.lang.ClassLoader.defineClass1(Native Method)
      at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
      at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
      at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
      at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
      at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
      at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Class.java:247)
      at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1663)
      at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1521)
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Class.java:247)
      at javax.faces.FactoryFinder.getImplGivenPreviousImpl(FactoryFinder.java:591)
      at javax.faces.FactoryFinder.getImplementationInstance(FactoryFinder.java:482)
      at javax.faces.FactoryFinder.access$400(FactoryFinder.java:138)
      at javax.faces.FactoryFinder$FactoryManager.getFactory(FactoryFinder.java:959)
      at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:316)
      at com.sun.faces.config.processor.FactoryConfigProcessor.verifyFactoriesExist(FactoryConfigProcessor.java:303)
      at com.sun.faces.config.processor.FactoryConfigProcessor.process(FactoryConfigProcessor.java:219)
      at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:360)
      at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:225)
      at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4723)
      at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5226)
      at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5221)
      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
      at java.util.concurrent.FutureTask.run(FutureTask.java:138)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      at java.lang.Thread.run(Thread.java:662)
  Caused by: java.lang.ClassNotFoundException: javax.faces.application.ApplicationFactory
      at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
      ... 34 more
  </code></pre>
  
  <p>For Mojarra, I included <code>javax.faces.jar</code> in <code>WEB-INF/lib</code> folder, and for MyFaces, I replace the jar with the following: myfaces-api-2.1.3.jar, myfaces-bundle-2.1.3.jar, myfaces-impl-2.1.3.jar.</p>
  
  <p>I've included jstl-api-1.2.jar as well as jstl-impl-1.2.jar. </p>
  
  <p>And <code>ApplicationFactory</code> is found in those jars. What is the issue with JSF in these instances?</p>
  
  <p>I'm using Tomcat 7 to run my web application.</p>