title: Jackson error: java.lang.NoClassDefFoundError: com/fasterxml/jackson/core/Versioned
body: <p>I am working on Maven-EJB and want to convert a java object to JSON, I use Jackson jars lib but I got:</p>
  
  <blockquote>
    <p>java.lang.ClassNotFoundException: com.fasterxml.jackson.core.Versioned</p>
  </blockquote>
  
  <p>I added these dependencies in pom.xml file:</p>
  
  <blockquote>
  <pre><code>    &lt;dependency&gt;
          &lt;groupId&gt;com.fasterxml.jackson.core&lt;/groupId&gt;
          &lt;artifactId&gt;jackson-databind&lt;/artifactId&gt;
          &lt;version&gt;2.4.0&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;com.fasterxml.jackson.core&lt;/groupId&gt;
          &lt;artifactId&gt;jackson-core&lt;/artifactId&gt;
          &lt;version&gt;2.4.0&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;com.fasterxml.jackson.core&lt;/groupId&gt;
          &lt;artifactId&gt;jackson-annotations&lt;/artifactId&gt;
          &lt;version&gt;2.4.0&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;com.fasterxml.jackson.jaxrs&lt;/groupId&gt;
          &lt;artifactId&gt;jackson-jaxrs-json-provider&lt;/artifactId&gt;
          &lt;version&gt;2.4.0&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;com.fasterxml.jackson.module&lt;/groupId&gt;
          &lt;artifactId&gt;jackson-module-jaxb-annotations&lt;/artifactId&gt;
          &lt;version&gt;2.4.0&lt;/version&gt;
      &lt;/dependency&gt;        
  &lt;/dependencies&gt;
  </code></pre>
  </blockquote>
  
  <p>in Java Facade I write this lines to convert:</p>
  
  <blockquote>
    <p>String json = "";</p>
  
  <pre><code>    try {
           ObjectWriter ow = new ObjectMapper().writer().withDefaultPrettyPrinter();
           json = ow.writeValueAsString(userlist);
      } catch (JsonProcessingException e) {
          throw new BusinessException("error_json");
      }
  </code></pre>
  </blockquote>
  
  <p>and here is the imports:</p>
  
  <blockquote>
    <p>import com.fasterxml.jackson.core.JsonProcessingException; import
    com.fasterxml.jackson.databind.ObjectMapper; import
    com.fasterxml.jackson.databind.ObjectWriter;</p>
  </blockquote>
  
  <p>I checked the classpath and make a lot of clean and build but no way,,,the same exception appear!!</p>
  
  <p>I am working on NetBeans8 and Java 1.7 </p>
  
  <p>Thanks in advance
  Mariam</p>