title: replaced jackson with gson in spring MVC Application( not using spring boot ) but still getting error for jackson dependency
body: <p><strong>I  have created a POC to support gson instead of jackson with Spring MVC 5 and Java 8  but not using Spring Boot .</strong> 
  <br> 
  <a href="https://www.leveluplunch.com/java/tutorials/023-configure-integrate-gson-spring-boot/" rel="nofollow noreferrer">Reference tutorial</a></p>
  
  <p><em>Even after removing jackson binding support from pom.xml and using gson, gives error:</em></p>
  
  <pre><code>org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'requestMappingHandlerAdapter' defined in class path resource [org/springframework/web/servlet/config/annotation/DelegatingWebMvcConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter]: Factory method 'requestMappingHandlerAdapter' threw exception; nested exception is java.lang.NoClassDefFoundError: com/fasterxml/jackson/databind/exc/InvalidDefinitionException
      Caused by: java.lang.RuntimeException: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'requestMappingHandlerAdapter' defined in class path resource [org/springframework/web/servlet/config/annotation/DelegatingWebMvcConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter]: Factory method 'requestMappingHandlerAdapter' threw exception; nested exception is java.lang.NoClassDefFoundError: com/fasterxml/jackson/databind/exc/InvalidDefinitionException
      Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'requestMappingHandlerAdapter' defined in class path resource [org/springframework/web/servlet/config/annotation/DelegatingWebMvcConfiguration.class]: 
  </code></pre>
  
  <p>Pom.xml entry : </p>
  
  <pre><code>&lt;dependency&gt;
      &lt;groupId&gt;com.google.code.gson&lt;/groupId&gt;
      &lt;artifactId&gt;gson&lt;/artifactId&gt;
      &lt;version&gt;2.8.4&lt;/version&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p>@Configuration
  public class CustomConfiguration {</p>
  
  <pre><code>@Bean
  public AbstractJsonHttpMessageConverter customConverters() {
  
      Collection&lt;HttpMessageConverter&lt;?&gt;&gt; messageConverters = new ArrayList&lt;&gt;();
  
      GsonHttpMessageConverter gsonHttpMessageConverter = new GsonHttpMessageConverter();
      messageConverters.add(gsonHttpMessageConverter);
  
      return gsonHttpMessageConverter;
  }
  </code></pre>
  
  <p>}</p>
  
  <pre><code>Dependency Graph 
  [INFO] +- com.oracle:ojdbc6:jar:11.2.0.3:compile
  [INFO] +- com.google.code.gson:gson:jar:2.8.4:compile
  [INFO] +- org.springframework:spring-core:jar:5.0.7.RELEASE:compile
  [INFO] |  \- org.springframework:spring-jcl:jar:5.0.7.RELEASE:compile
  [INFO] +- org.hibernate:hibernate-core:jar:5.2.11.Final:compile
  [INFO] |  +- org.jboss.logging:jboss-logging:jar:3.3.0.Final:compile
  [INFO] |  +- org.hibernate.javax.persistence:hibernate-jpa-2.1-api:jar:1.0.0.Final:compile
  [INFO] |  +- org.javassist:javassist:jar:3.20.0-GA:compile
  [INFO] |  +- antlr:antlr:jar:2.7.7:compile
  [INFO] |  +- org.jboss.spec.javax.transaction:jboss-transaction-api_1.2_spec:jar:1.0.1.Final:compile
  [INFO] |  +- org.jboss:jandex:jar:2.0.3.Final:compile
  [INFO] |  +- com.fasterxml:classmate:jar:1.3.0:compile
  [INFO] |  +- dom4j:dom4j:jar:1.6.1:compile
  [INFO] |  \- org.hibernate.common:hibernate-commons-annotations:jar:5.0.1.Final:compile
  [INFO] +- org.springframework:spring-web:jar:5.0.7.RELEASE:compile
  [INFO] |  \- org.springframework:spring-beans:jar:5.0.7.RELEASE:compile
  [INFO] +- org.springframework:spring-jdbc:jar:5.0.7.RELEASE:compile
  [INFO] +- org.springframework:spring-tx:jar:5.0.7.RELEASE:compile
  [INFO] +- org.springframework:spring-webmvc:jar:5.0.7.RELEASE:compile
  [INFO] |  +- org.springframework:spring-aop:jar:5.0.7.RELEASE:compile
  [INFO] |  +- org.springframework:spring-context:jar:5.0.7.RELEASE:compile
  [INFO] |  \- org.springframework:spring-expression:jar:5.0.7.RELEASE:compile
  [INFO] +- org.springframework:spring-orm:jar:5.0.7.RELEASE:compile
  [INFO] +- org.springframework:spring-test:jar:5.0.7.RELEASE:test
  [INFO] +- org.springframework.data:spring-data-jpa:jar:2.0.8.RELEASE:compile
  [INFO] |  +- org.springframework.data:spring-data-commons:jar:2.0.8.RELEASE:compile
  [INFO] |  \- org.aspectj:aspectjrt:jar:1.8.13:compile
  [INFO] +- javax.servlet:javax.servlet-api:jar:3.1.0:compile
  [INFO] +- log4j:log4j:jar:1.2.17:compile
  [INFO] +- org.slf4j:slf4j-log4j12:jar:1.7.5:test
  [INFO] +- org.slf4j:slf4j-api:jar:1.7.5:compile
  [INFO] +- org.hibernate:hibernate-validator:jar:4.3.2.Final:compile
  [INFO] +- javax.validation:validation-api:jar:1.1.0.Final:provided
  [INFO] +- org.apache.commons:commons-lang3:jar:3.7:compile
  [INFO] \- junit:junit:jar:4.12:test
  [INFO]    \- org.hamcrest:hamcrest-core:jar:1.3:test
  </code></pre>