title: java.lang.ClassNotFoundException: org.apache.poi.ss.usermodel.Workbook
body: <p>I'm trying to access an excel file the Apache Workbook module. The code runs perfectly sometimes, but mostly I get an error saying:</p>
  
  <blockquote>
    <p><strong>exception</strong> </p>
    
    <p>javax.servlet.ServletException: Servlet execution threw an exception
        org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)</p>
    
    <p><strong>root cause</strong> </p>
    
    <p>java.lang.NoClassDefFoundError: org/apache/poi/ss/usermodel/Workbook</p>
    
    <p><strong>root cause</strong> </p>
    
    <p>java.lang.ClassNotFoundException: org.apache.poi.ss.usermodel.Workbook</p>
  </blockquote>
  
  <p>I looked it up and read that it is a jar file problem. Tried to fix it from my side but I'm still getting the same error.</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/maven-v4_0_0.xsd"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
      &lt;groupId&gt;XYZ&lt;/groupId&gt;
      &lt;artifactId&gt;ABC&lt;/artifactId&gt;
      &lt;packaging&gt;war&lt;/packaging&gt;
      &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
      &lt;name&gt;ScriptsGenerator Maven Webapp&lt;/name&gt;
      &lt;url&gt;http://maven.apache.org&lt;/url&gt;
    &lt;dependencies&gt;
        &lt;dependency&gt;
          &lt;groupId&gt;junit&lt;/groupId&gt;
          &lt;artifactId&gt;junit&lt;/artifactId&gt;
          &lt;version&gt;3.8.1&lt;/version&gt;
          &lt;scope&gt;test&lt;/scope&gt;
        &lt;/dependency&gt;
        &lt;!-- https://mvnrepository.com/artifact/org.apache.poi/poi --&gt;
        &lt;dependency&gt;
          &lt;groupId&gt;org.apache.poi&lt;/groupId&gt;
          &lt;artifactId&gt;poi&lt;/artifactId&gt;
          &lt;version&gt;3.15&lt;/version&gt;
        &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.lucee&lt;/groupId&gt;
          &lt;artifactId&gt;poi-ooxml-schemas&lt;/artifactId&gt;
          &lt;version&gt;3.15.0&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;!-- https://mvnrepository.com/artifact/org.apache.poi/poi-ooxml --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.poi&lt;/groupId&gt;
          &lt;artifactId&gt;poi-ooxml&lt;/artifactId&gt;
              &lt;version&gt;3.15&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;!-- https://mvnrepository.com/artifact/javax.servlet/javax.servlet-api --&gt;
      &lt;dependency&gt;
              &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
          &lt;artifactId&gt;javax.servlet-api&lt;/artifactId&gt;
          &lt;version&gt;3.1.0&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;!-- https://mvnrepository.com/artifact/com.googlecode.json-simple/json-simple --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.googlecode.json-simple&lt;/groupId&gt;
          &lt;artifactId&gt;json-simple&lt;/artifactId&gt;
          &lt;version&gt;1.1.1&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;commons-logging&lt;/groupId&gt;
          &lt;artifactId&gt;commons-logging&lt;/artifactId&gt;
          &lt;version&gt;1.2&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;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;org.apache.struts&lt;/groupId&gt;
          &lt;artifactId&gt;struts2-core&lt;/artifactId&gt;
          &lt;version&gt;2.5.8&lt;/version&gt;
        &lt;/dependency&gt;
        &lt;!-- https://mvnrepository.com/artifact/org.apache.xmlbeans/xmlbeans --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.xmlbeans&lt;/groupId&gt;
          &lt;artifactId&gt;xmlbeans&lt;/artifactId&gt;
          &lt;version&gt;2.6.0&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;!-- https://mvnrepository.com/artifact/dom4j/dom4j --&gt;
      &lt;dependency&gt;
              &lt;groupId&gt;dom4j&lt;/groupId&gt;
              &lt;artifactId&gt;dom4j&lt;/artifactId&gt;
              &lt;version&gt;1.6.1&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;!-- https://mvnrepository.com/artifact/org.apache.commons/commons-collections4 --&gt;
      &lt;dependency&gt;
         &lt;groupId&gt;org.apache.commons&lt;/groupId&gt;
         &lt;artifactId&gt;commons-collections4&lt;/artifactId&gt;
         &lt;version&gt;4.1&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.2&lt;/version&gt;
    &lt;/dependency&gt;
  
      &lt;/dependencies&gt;
      &lt;build&gt;
        &lt;finalName&gt;AAAA&lt;/finalName&gt;
      &lt;/build&gt;
    &lt;/project&gt;
  </code></pre>
  
  <p>Where am I going wrong?</p>