title: java.lang.NoClassDefFoundError: javax/faces/context/FacesContextFactory
body: <p>All similar questions didn't help me, so I'm creating my own:</p>
  
  <p>I'm creating a JSF Webapp with Maven in Eclipse. To test it, I run it as a Maven build with the war:war goal, this works without errors. However, when I deploy the war-file to my local tomcat to test it, I get the following error message during startup:</p>
  
  <pre><code>SCHWERWIEGEND: Critical error during deployment:
  java.lang.NoClassDefFoundError: javax/faces/context/FacesContextFactory
          at java.lang.ClassLoader.defineClass1(Native Method)
          at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
          at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
          at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
          at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
          at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
          at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
          at java.security.AccessController.doPrivileged(Native Method)
          at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
          at java.lang.Class.forName0(Native Method)
          at java.lang.Class.forName(Class.java:270)
          at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1701)
          at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
          at java.lang.Class.forName0(Native Method)
          at java.lang.Class.forName(Class.java:270)
          at javax.faces.FactoryFinder.getImplGivenPreviousImpl(FactoryFinder.java:618)
          at javax.faces.FactoryFinder.getImplementationInstance(FactoryFinder.java:509)
          at javax.faces.FactoryFinder.access$400(FactoryFinder.java:139)
          at javax.faces.FactoryFinder$FactoryManager.getFactory(FactoryFinder.java:993)
          at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:343)
          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:4939)
          at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5434)
          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:633)
  
          at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:976)
  
          at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1653)
          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
          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)
  Caused by: java.lang.ClassNotFoundException: javax.faces.context.FacesContextFactory
          at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
          at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
          at java.security.AccessController.doPrivileged(Native Method)
          at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
          ... 39 more
  </code></pre>
  
  <p>I have the following dependencies... </p>
  
  <pre><code>&lt;dependencies&gt;
    &lt;dependency&gt;
      &lt;groupId&gt;com.sun.faces&lt;/groupId&gt;
      &lt;artifactId&gt;jsf-api&lt;/artifactId&gt;
      &lt;version&gt;2.1.7&lt;/version&gt;
    &lt;/dependency&gt;
    &lt;dependency&gt;
      &lt;groupId&gt;com.sun.faces&lt;/groupId&gt;
      &lt;artifactId&gt;jsf-impl&lt;/artifactId&gt;
      &lt;version&gt;2.1.7&lt;/version&gt;
    &lt;/dependency&gt;
  &lt;/dependencies&gt;
  </code></pre>
  
  <p>and plugins:</p>
  
  <pre><code>&lt;plugins&gt;
      &lt;plugin&gt;
          &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
          &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
          &lt;version&gt;2.3.1&lt;/version&gt;
          &lt;configuration&gt;
              &lt;source&gt;1.6&lt;/source&gt;
              &lt;target&gt;1.6&lt;/target&gt;
          &lt;/configuration&gt;
      &lt;/plugin&gt;
      &lt;plugin&gt;
          &lt;artifactId&gt;maven-war-plugin&lt;/artifactId&gt;
          &lt;version&gt;2.3&lt;/version&gt;
      &lt;/plugin&gt;
  &lt;/plugins&gt;
  </code></pre>
  
  <p>If you need further information, let me know. Thanks!</p>