title: java.lang.ClassNotFoundException: com.fasterxml.jackson.dataformat.xml.XmlMapper
body: <p>Am using Spring boot 2.1.1 am getting below error while using 
  org.springframework.web.client.RestTemplate</p>
  
  <pre class="lang-none prettyprint-override"><code>java.lang.ClassNotFoundException: com.fasterxml.jackson.dataformat.xml.XmlMapper
      at java.net.URLClassLoader.findClass(Unknown Source) ~[na:1.8.0_191]
      at java.lang.ClassLoader.loadClass(Unknown Source) ~[na:1.8.0_191]
      at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) ~[na:1.8.0_191]
      at java.lang.ClassLoader.loadClass(Unknown Source) ~[na:1.8.0_191]
      at 
      org.springframework.http.converter.json
      .Jackson2ObjectMapperBuilder.build(Jackson2ObjectMapperBuilder.java:617) ~[spring-web- 
      5.1.3.RELEASE.jar:5.1.3.RELEASE]
      at org.springframework.http.converter.xml.MappingJackson2XmlHttpMessageConverter.&lt;init&gt; 
      (MappingJackson2XmlHttpMessageConverter.java:50) ~[spring-web-5.1.3.RELEASE.jar:5.1.3.RELEASE]
      at 
  </code></pre>
  
  <p>From my pom:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;parent&gt;
      &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
      &lt;artifactId&gt;spring-boot-starter-parent&lt;/artifactId&gt;
      &lt;version&gt;2.1.1.RELEASE&lt;/version&gt;
      &lt;relativePath/&gt; &lt;!-- lookup parent from repository --&gt;
  &lt;/parent&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;com.fasterxml.jackson.core&lt;/groupId&gt;
      &lt;artifactId&gt;jackson-databind&lt;/artifactId&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p>While creating the org.springframework.web.client.RestTemplate object I am getting this exception</p>
  
  <p>How do I fix this?</p>