title: ClassNotFoundException: org.springframework.http.converter.json.MappingJacksonHttpMessageConverter
body: <p>I am completely a beginner at Spring (you can see that in my code :) ). I just wanted to test the class RestTemplate but I got a <code>ClassNotFoundException</code>.<br>
  So the code is:</p>
  
  <pre><code>import org.springframework.context.ApplicationContext;
  import org.springframework.context.support.ClassPathXmlApplicationContext;
  import org.springframework.web.client.RestTemplate;
  public class RestClient {
      private RestTemplate restTemplate;
      public String getJiraIssueAsJson(){
          Object o = restTemplate.getForObject(..., Object.class);
          System.out.println("..."+o.getClass());
          return null;
      }
      public void setRestTemplate(RestTemplate restTemplate) {
          this.restTemplate = restTemplate;
      }
      public static void main(String[] args) {
          ApplicationContext context = new ClassPathXmlApplicationContext("rest-client-context.xml");
          RestClient restClient = context.getBean("restClient", RestClient.class);
          restClient.getJiraIssueAsJson();
      }
  }
  </code></pre>
  
  <p>context.xml</p>
  
  <pre><code>&lt;beans ...&gt;
      &lt;bean id="restTemplate" class="org.springframework.web.client.RestTemplate"&gt;
          &lt;property name="messageConverters"&gt;
              &lt;list&gt;
                  &lt;bean class="org.springframework.http.converter.json.MappingJacksonHttpMessageConverte‌​‌​r"/&gt;
              &lt;/list&gt;
          &lt;/property&gt;
      &lt;/bean&gt;
      &lt;bean id="restClient" class="org.googlecode.happymarvin.jiraexplorer.RestClient"&gt;
          &lt;property name="restTemplate" ref="restTemplate"/&gt;
      &lt;/bean&gt;
  &lt;/beans&gt;
  </code></pre>
  
  <p>pom.xml</p>
  
  <pre><code>&lt;project ...&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
      &lt;parent&gt;
          &lt;groupId&gt;com.googlecode.happymarvin&lt;/groupId&gt;
          &lt;artifactId&gt;parent&lt;/artifactId&gt;
          &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
      &lt;/parent&gt;
      &lt;artifactId&gt;jiraminer&lt;/artifactId&gt;
      &lt;name&gt;Happy Marvin JIRA Miner&lt;/name&gt;
      &lt;packaging&gt;jar&lt;/packaging&gt;
      &lt;url&gt;http://maven.apache.org&lt;/url&gt;
      &lt;properties&gt;
          &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
          &lt;jackson-version&gt;1.9.13&lt;/jackson-version&gt;
      &lt;/properties&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>parent pom.xml</p>
  
  <pre><code>&lt;project ...&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
      &lt;groupId&gt;com.googlecode.happymarvin&lt;/groupId&gt;
      &lt;artifactId&gt;parent&lt;/artifactId&gt;
      &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
      &lt;packaging&gt;pom&lt;/packaging&gt;
      &lt;name&gt;Happy Marvin parent project&lt;/name&gt;
      &lt;url&gt;http://maven.apache.org&lt;/url&gt;
      &lt;properties&gt;
          &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
          &lt;org.springframework.version&gt;4.0.0.RELEASE&lt;/org.springframework.version&gt;
      &lt;/properties&gt;
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring-core&lt;/artifactId&gt;
              &lt;version&gt;${org.springframework.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring-web&lt;/artifactId&gt;
              &lt;version&gt;${org.springframework.version}&lt;/version&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>Exception</p>
  
  <pre><code>Jan 07, 2014 10:18:24 AM org.springframework.context.support.AbstractApplicationContext prepareRefresh
  INFO: Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@730eb2f0: startup date [Tue Jan 07 10:18:24 GMT 2014]; root of context hierarchy
  Jan 07, 2014 10:18:24 AM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
  INFO: Loading XML bean definitions from class path resource [rest-client-context.xml]
  Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'restTemplate' defined in class path resource [rest-client-context.xml]: Cannot create inner bean 'org.springframework.http.converter.json.MappingJacksonHttpMessageConverte‌​‌​r#77624896' of type [org.springframework.http.converter.json.MappingJacksonHttpMessageConverte‌​‌​r] while setting bean property 'messageConverters' with key [0]; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.springframework.http.converter.json.MappingJacksonHttpMessageConverte‌​‌​r] for bean with name 'org.springframework.http.converter.json.MappingJacksonHttpMessageConverte‌​‌​r#77624896' defined in class path resource [rest-client-context.xml]; nested exception is java.lang.ClassNotFoundException: org.springframework.http.converter.json.MappingJacksonHttpMessageConverte‌​‌​r
  ...
  Caused by: java.lang.ClassNotFoundException: org.springframework.http.converter.json.MappingJacksonHttpMessageConverte‌​‌​r
  </code></pre>
  
  <p>I have this exception when I try to run the main method from eclipse.<br>
  I can think of something like the spring jars cannot be seen but I don't know why...
  Can you please help me?</p>