title: org.apache.cxf.interceptor.Fault: com/itextpdf/text/Document NoClassDefFoundError
body: <p>I keep getting the following error trying to use a PDF lib and not having any luck. I am using spring and maven. I have tried pdfbox and itextpdf.</p>
  
  <p>I get the Following error with either one ( obv the class part is different )
  org.apache.cxf.interceptor.Fault: com/itextpdf/text/Document
  Caused by: java.lang.NoClassDefFoundError: com/itextpdf/text/Document</p>
  
  <p>pom</p>
  
  <pre><code>        &lt;dependency&gt;
              &lt;groupId&gt;org.apache.pdfbox&lt;/groupId&gt;
              &lt;artifactId&gt;pdfbox&lt;/artifactId&gt;
              &lt;version&gt;2.0.14&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;!-- https://mvnrepository.com/artifact/com.itextpdf/itextpdf --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.itextpdf&lt;/groupId&gt;
              &lt;artifactId&gt;itextpdf&lt;/artifactId&gt;
              &lt;version&gt;5.5.13&lt;/version&gt;
          &lt;/dependency&gt;
  </code></pre>
  
  <p>Class</p>
  
  <pre><code>import com.itextpdf.text.Document;
  
  public enum PDFController {
  
      INSTANCE;
  
      PDFController() {
      }
  
      public void testPDF() {
  
          // Error happens here
          Document doc = new Document();
      }
  
  }
  </code></pre>
  
  <p>It appears Maven is adding the correct jars. So why can it not find the class?</p>