title: java.lang.ClassNotFoundException: org.codehaus.jackson.map.ObjectMapper on Spring 3 project
body: <p>I am trying to set up a Spring project without Maven. My project has to serve jsp pages and json streams via Spring MVC framework. Jsp pages' section works well, but when I try to set up json streaming (in order to make ajax GETs) I get</p>
  
  <pre><code>java.lang.ClassNotFoundException: org.codehaus.jackson.map.ObjectMapper
  </code></pre>
  
  <p>My servletname-servlet.xml is the following:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;beans xmlns="http://www.springframework.org/schema/beans"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
  xmlns:context="http://www.springframework.org/schema/context"
  xmlns:mvc="http://www.springframework.org/schema/mvc"
  xsi:schemaLocation="
       http://www.springframework.org/schema/beans
       http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
       http://www.springframework.org/schema/context
       http://www.springframework.org/schema/context/spring-context-3.0.xsd
       http://www.springframework.org/schema/mvc
       http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd
       "&gt;
  &lt;mvc:annotation-driven /&gt;
  &lt;context:component-scan base-package="org.package.servletname" /&gt;
  
  &lt;bean
      class="org.springframework.web.servlet.view.ContentNegotiatingViewResolver"&gt;
      &lt;property name="mediaTypes"&gt;
          &lt;map&gt;
              &lt;entry key="atom" value="application/atom+xml" /&gt;
              &lt;entry key="html" value="text/html" /&gt;
              &lt;entry key="json" value="application/json" /&gt;
          &lt;/map&gt;
      &lt;/property&gt;
      &lt;property name="viewResolvers"&gt;
          &lt;list&gt;
              &lt;bean class="org.springframework.web.servlet.view.BeanNameViewResolver" /&gt;
              &lt;bean
                  class="org.springframework.web.servlet.view.InternalResourceViewResolver"&gt;
                  &lt;property name="prefix" value="/WEB-INF/jsp/" /&gt;
                  &lt;property name="suffix" value=".jsp" /&gt;
              &lt;/bean&gt;
          &lt;/list&gt;
      &lt;/property&gt;
      &lt;property name="defaultViews"&gt;
          &lt;list&gt;
              &lt;bean
                  class="org.springframework.web.servlet.view.json.MappingJacksonJsonView" /&gt;
          &lt;/list&gt;
      &lt;/property&gt;
  &lt;/bean&gt;
  
  &lt;mvc:resources mapping="/css/**" location="/css/" /&gt;
  &lt;mvc:resources mapping="/img/**" location="/img/" /&gt;
  &lt;mvc:resources mapping="/js/**" location="/js/" /&gt;
  
  &lt;/beans&gt;
  </code></pre>
  
  <p>My controller is the following</p>
  
  <pre><code>package org.package.servletname;
  
  import java.util.LinkedList;
  import java.util.List;
  
  import org.package.servletname.orm.*;
  
  import org.springframework.stereotype.Controller;
  import org.springframework.web.bind.annotation.RequestMapping;
  import org.springframework.web.bind.annotation.RequestMethod;
  import org.springframework.web.bind.annotation.ResponseBody;
  
  @Controller
  @RequestMapping("/ajax")
  public class JSONGetController
  {
  @RequestMapping(value = "/getproducts", method = RequestMethod.GET)
  public @ResponseBody
  List&lt;Product&gt; JSONGetProducts()
  {
      List&lt;Product&gt; productList = null;
      Product p = new Product();
      p.setName("ProductName");
      productList = new LinkedList&lt;Product&gt;();
      productList.add(p);
      return productList;
  }
  }
  </code></pre>
  
  <p>Thanks</p>