title: NoClassDefFoundError: javax/faces/component/UIViewAction on TomEE startup
body: <p>I'm trying to migrate a web project (all JARs in <code>WEB-INF/lib</code>) to a maven web project (all JARs in <code>pom.xml</code>). </p>
  
  <p>This project uses following libraries: </p>
  
  <ul>
  <li>JSF 2.2</li>
  <li>PrimeFaces</li>
  <li>BootsFaces</li>
  <li>OmniFaces</li>
  </ul>
  
  <p>It runs on TomEE.</p>
  
  <p>The following error appears on TomEE startup:</p>
  
  <blockquote>
    <p>NoClassDefFoundError: javax/faces/component/UIViewAction </p>
  </blockquote>
  
  <p>But JSF2 library is provided by TomEE on classpath.</p>
  
  <p>Here is my <code>pom.xml</code>.</p>
  
  <pre><code>&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
  &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  &lt;groupId&gt;com.lb&lt;/groupId&gt;
  &lt;artifactId&gt;XXX&lt;/artifactId&gt;
  &lt;version&gt;0.0.1&lt;/version&gt;
  &lt;packaging&gt;war&lt;/packaging&gt;
  &lt;name&gt;XXX&lt;/name&gt;
  &lt;description&gt;Application XXX&lt;/description&gt;
  
  &lt;url&gt;http://XXX.fr&lt;/url&gt;
  &lt;organization&gt;
      &lt;name&gt;XXX&lt;/name&gt;
      &lt;url&gt;http://XXX.fr&lt;/url&gt;
  &lt;/organization&gt;
  &lt;inceptionYear&gt;2016&lt;/inceptionYear&gt;
  
  
  &lt;properties&gt;
      &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
      &lt;project.reporting.outputEncoding&gt;UTF-8&lt;/project.reporting.outputEncoding&gt;
      &lt;javase.version&gt;1.7&lt;/javase.version&gt;
      &lt;javaee.version&gt;7.0&lt;/javaee.version&gt;
  &lt;/properties&gt;
  
  &lt;developers&gt;
      &lt;developer&gt;
          &lt;id&gt;XXX&lt;/id&gt;
          &lt;name&gt;YYY&lt;/name&gt;
          &lt;email&gt;ZZZ@gmail.com&lt;/email&gt;
      &lt;/developer&gt;
  &lt;/developers&gt;
  
  &lt;build&gt;
      &lt;directory&gt;${basedir}/target/${project.artifactId}-${project.version}&lt;/directory&gt;
      &lt;finalName&gt;XXX&lt;/finalName&gt;
  
      &lt;resources&gt;
          &lt;resource&gt;
              &lt;directory&gt;src/main/java&lt;/directory&gt;
              &lt;includes&gt;
                  &lt;include&gt;**/*.java&lt;/include&gt;
              &lt;/includes&gt;
          &lt;/resource&gt;
          &lt;resource&gt;
              &lt;directory&gt;src/main/resources&lt;/directory&gt;
          &lt;/resource&gt;
      &lt;/resources&gt;
  
      &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;3.1&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;source&gt;${javase.version}&lt;/source&gt;
                  &lt;target&gt;${javase.version}&lt;/target&gt;
                  &lt;encoding&gt;UTF-8&lt;/encoding&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
          &lt;plugin&gt;
              &lt;artifactId&gt;maven-war-plugin&lt;/artifactId&gt;
              &lt;version&gt;2.6&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;webResources&gt;
                      &lt;resource&gt;
                          &lt;directory&gt;${basedir}/src/main/webapp/WEB-INF&lt;/directory&gt;
                          &lt;filtering&gt;true&lt;/filtering&gt;
                          &lt;targetPath&gt;WEB-INF&lt;/targetPath&gt;
                      &lt;/resource&gt;
                      &lt;resource&gt;
                          &lt;directory&gt;${basedir}/src/main/resources&lt;/directory&gt;
                          &lt;filtering&gt;true&lt;/filtering&gt;
                          &lt;targetPath&gt;WEB-INF/resources&lt;/targetPath&gt;
                      &lt;/resource&gt;
                  &lt;/webResources&gt;
                  &lt;webXml&gt;${basedir}/src/main/webapp/WEB-INF/web.xml&lt;/webXml&gt;
                  &lt;warSourceDirectory&gt;${basedir}/src/main/webapp&lt;/warSourceDirectory&gt;
                  &lt;packagingExcludes&gt;
                      **/*.java,
                  &lt;/packagingExcludes&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
      &lt;/plugins&gt;
  &lt;/build&gt;
  &lt;dependencies&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;log4j&lt;/groupId&gt;
          &lt;artifactId&gt;log4j&lt;/artifactId&gt;
          &lt;version&gt;1.2.17&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;mysql&lt;/groupId&gt;
          &lt;artifactId&gt;mysql-connector-java&lt;/artifactId&gt;
          &lt;version&gt;5.1.6&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.primefaces&lt;/groupId&gt;
          &lt;artifactId&gt;primefaces&lt;/artifactId&gt;
          &lt;version&gt;5.3&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;commons-codec&lt;/groupId&gt;
          &lt;artifactId&gt;commons-codec&lt;/artifactId&gt;
          &lt;version&gt;1.10&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;commons-io&lt;/groupId&gt;
          &lt;artifactId&gt;commons-io&lt;/artifactId&gt;
          &lt;version&gt;2.4&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;commons-fileupload&lt;/groupId&gt;
          &lt;artifactId&gt;commons-fileupload&lt;/artifactId&gt;
          &lt;version&gt;1.3.1&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.primefaces.themes&lt;/groupId&gt;
          &lt;artifactId&gt;bootstrap&lt;/artifactId&gt;
          &lt;version&gt;1.0.10&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;net.bootsfaces&lt;/groupId&gt;
          &lt;artifactId&gt;bootsfaces&lt;/artifactId&gt;
          &lt;version&gt;0.8.1&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.omnifaces&lt;/groupId&gt;
          &lt;artifactId&gt;omnifaces&lt;/artifactId&gt;
          &lt;version&gt;2.2&lt;/version&gt;
      &lt;/dependency&gt;
  &lt;/dependencies&gt;
  &lt;repositories&gt;
      &lt;repository&gt;
          &lt;id&gt;prime-repo&lt;/id&gt;
          &lt;name&gt;PrimeFaces Maven Repository&lt;/name&gt;
          &lt;url&gt;http://repository.primefaces.org&lt;/url&gt;
          &lt;layout&gt;default&lt;/layout&gt;
      &lt;/repository&gt;
  &lt;/repositories&gt;
  </code></pre>
  
  <p></p>
  
  <p>Thanks for your help. </p>