title: Jackson throwing nosuchmethod error while
body: <p>I have following class which i am returning from spring rest server</p>
  
  <pre><code>public class Message {
      private String name;
      private String text;
  
      public Message(String name, String text) {
          this.name = name;
          this.text = text;
      }
  
      public String getName() {
          return name;
      }
  
      public String getText() {
          return text;
      }
  }
  </code></pre>
  
  <p>And I am getting following error when i try to access the api</p>
  
  <pre><code>g.springframework.web.util.NestedServletException: Handler processing failed; nested exception is java.lang.NoSuchMethodError: com.fasterxml.jackson.databind.type.TypeFactory.constructType(Ljava/lang/reflect/Type;Ljava/lang/Class;)Lcom/fasterxml/jackson/databind/JavaType;
      org.springframework.web.servlet.DispatcherServlet.triggerAfterCompletionWithError(DispatcherServlet.java:1302)
      org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:977)
      org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893)
      org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:969)
      org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:860)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
      org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:845)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
      org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
  </code></pre>
  
  <p>here is my jackson mapping tree via <code>mvn dependency:tree | grep jackson</code></p>
  
  <pre><code>[INFO] +- org.codehaus.jackson:jackson-mapper-asl:jar:1.9.9:compile
  [INFO] |  \- org.codehaus.jackson:jackson-core-asl:jar:1.9.9:compile
  [INFO] \- com.fasterxml.jackson.core:jackson-databind:jar:2.7.0:compile
  [INFO]    +- com.fasterxml.jackson.core:jackson-annotations:jar:2.7.0:compile
  [INFO]    \- com.fasterxml.jackson.core:jackson-core:jar:2.7.0:compile
  </code></pre>
  
  <p>and here is my actual jackson dependency in pom.xml</p>
  
  <pre><code>&lt;dependency&gt;
      &lt;groupId&gt;org.codehaus.jackson&lt;/groupId&gt;
      &lt;artifactId&gt;jackson-mapper-asl&lt;/artifactId&gt;
      &lt;version&gt;1.9.9&lt;/version&gt;
  &lt;/dependency&gt;
  &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.7.0&lt;/version&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p>I have tried including latest version of both libraries. I am not sure what i am missing here. </p>