title: Unable to start embedded tomcat
body: <p>Our Spring boot application is throwing the following error when I try to run it as a Spring Boot Application. (Right Click -> Run As -> Spring Boot Application)</p>
  
  <pre><code>Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is org.springframework.boot.context.embedded.EmbeddedServletContainerException: Unable to start embedded Tomcat
          at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:133)
          at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:474)
          at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118)
          at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:686)
          at org.springframework.boot.SpringApplication.run(SpringApplication.java:320)
          at org.springframework.boot.SpringApplication.run(SpringApplication.java:957)
          at org.springframework.boot.SpringApplication.run(SpringApplication.java:946)
          at com.dhboa.trex.TRexApplication.main(TRexApplication.java:14)
      Caused by: org.springframework.boot.context.embedded.EmbeddedServletContainerException: Unable to start embedded Tomcat
          at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.initialize(TomcatEmbeddedServletContainer.java:98)
          at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.&lt;init&gt;(TomcatEmbeddedServletContainer.java:75)
          at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainerFactory.getTomcatEmbeddedServletContainer(TomcatEmbeddedServletContainerFactory.java:378)
          at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainerFactory.getEmbeddedServletContainer(TomcatEmbeddedServletContainerFactory.java:155)
          at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.createEmbeddedServletContainer(EmbeddedWebApplicationContext.java:157)
          at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:130)
          ... 7 more
    ..........
      Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.http.converter.xml.MappingJackson2XmlHttpMessageConverter]: Factory method 'mappingJackson2XmlHttpMessageConverter' threw exception; nested exception is java.lang.NoSuchMethodError: com.fasterxml.jackson.databind.SerializationConfig.withDefaultPrettyPrinter(Lcom/fasterxml/jackson/core/PrettyPrinter;)Lcom/fasterxml/jackson/databind/SerializationConfig;
          at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:189)
          at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588)
          ... 145 more
      Caused by: java.lang.NoSuchMethodError: com.fasterxml.jackson.databind.SerializationConfig.withDefaultPrettyPrinter(Lcom/fasterxml/jackson/core/PrettyPrinter;)Lcom/fasterxml/jackson/databind/SerializationConfig;
          at com.fasterxml.jackson.dataformat.xml.XmlMapper.&lt;init&gt;(XmlMapper.java:82)
          at com.fasterxml.jackson.dataformat.xml.XmlMapper.&lt;init&gt;(XmlMapper.java:63)
          at com.fasterxml.jackson.dataformat.xml.XmlMapper.&lt;init&gt;(XmlMapper.java:49)
          at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
          at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
          at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
          at java.lang.reflect.Constructor.newInstance(Unknown Source)
          at java.lang.Class.newInstance(Unknown Source)
          at org.springframework.beans.BeanUtils.instantiate(BeanUtils.java:78)
          at org.springframework.http.converter.json.Jackson2ObjectMapperBuilder.build(Jackson2ObjectMapperBuilder.java:514)
          at org.springframework.http.converter.xml.MappingJackson2XmlHttpMessageConverter.&lt;init&gt;(MappingJackson2XmlHttpMessageConverter.java:49)
          at org.springframework.boot.autoconfigure.web.JacksonHttpMessageConvertersConfiguration$MappingJackson2XmlHttpMessageConverterConfiguration.mappingJackson2XmlHttpMessageConverter(JacksonHttpMessageConvertersConfiguration.java:84)
          at org.springframework.boot.autoconfigure.web.JacksonHttpMessageConvertersConfiguration$MappingJackson2XmlHttpMessageConverterConfiguration$$EnhancerBySpringCGLIB$$f2b9ded.CGLIB$mappingJackson2XmlHttpMessageConverter$0(&lt;generated&gt;)
          at org.springframework.boot.autoconfigure.web.JacksonHttpMessageConvertersConfiguration$MappingJackson2XmlHttpMessageConverterConfiguration$$EnhancerBySpringCGLIB$$f2b9ded$$FastClassBySpringCGLIB$$911122bf.invoke(&lt;generated&gt;)
          at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
          at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:309)
          at org.springframework.boot.autoconfigure.web.JacksonHttpMessageConvertersConfiguration$MappingJackson2XmlHttpMessageConverterConfiguration$$EnhancerBySpringCGLIB$$f2b9ded.mappingJackson2XmlHttpMessageConverter(&lt;generated&gt;)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
          at java.lang.reflect.Method.invoke(Unknown Source)
          at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162)
          ... 146 more
  </code></pre>
  
  <p>The same source is working on a different machine. I tried Force updating the maven dependencies once again but didn't result in anything. Also, war file is being built properly when I do maven install.</p>
  
  <p><strong>Update</strong>
  <a href="https://i.stack.imgur.com/osAFg.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/osAFg.png" alt="Dependency heirarchy"></a></p>
  
  <p><strong>Extract of POM</strong></p>
  
  <pre><code>&lt;project&gt;
  &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;1.2.3.RELEASE&lt;/version&gt;
      &lt;relativePath/&gt;
      &lt;!-- lookup parent from repository --&gt;
  &lt;/parent&gt;
  &lt;properties&gt;
      &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;        
      &lt;java.version&gt;1.7&lt;/java.version&gt;
      &lt;activiti.version&gt;5.17.0&lt;/activiti.version&gt;
      &lt;tomcat.version&gt;7.0.64&lt;/tomcat.version&gt;
  &lt;/properties&gt;
  &lt;dependencies&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-data-jpa&lt;/artifactId&gt;
          &lt;exclusions&gt;
              &lt;exclusion&gt;
                  &lt;artifactId&gt;jcl-over-slf4j&lt;/artifactId&gt;
                  &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
              &lt;/exclusion&gt;
              &lt;exclusion&gt;
                  &lt;artifactId&gt;jul-to-slf4j&lt;/artifactId&gt;
                  &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
              &lt;/exclusion&gt;
              &lt;exclusion&gt;
                  &lt;artifactId&gt;slf4j-api&lt;/artifactId&gt;
                  &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
              &lt;/exclusion&gt;
              &lt;exclusion&gt;
                  &lt;artifactId&gt;log4j-over-slf4j&lt;/artifactId&gt;
                  &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
              &lt;/exclusion&gt;
          &lt;/exclusions&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-mail&lt;/artifactId&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-security&lt;/artifactId&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-web&lt;/artifactId&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;mysql&lt;/groupId&gt;
          &lt;artifactId&gt;mysql-connector-java&lt;/artifactId&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-tomcat&lt;/artifactId&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-test&lt;/artifactId&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
          &lt;artifactId&gt;slf4j-log4j12&lt;/artifactId&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
          &lt;artifactId&gt;jcl-over-slf4j&lt;/artifactId&gt;
          &lt;exclusions&gt;
              &lt;exclusion&gt;
                  &lt;artifactId&gt;slf4j-api&lt;/artifactId&gt;
                  &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
              &lt;/exclusion&gt;
          &lt;/exclusions&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.tomcat.embed&lt;/groupId&gt;
          &lt;artifactId&gt;tomcat-embed-jasper&lt;/artifactId&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;taglibs&lt;/groupId&gt;
          &lt;artifactId&gt;standard&lt;/artifactId&gt;
          &lt;version&gt;1.1.2&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
          &lt;artifactId&gt;jstl&lt;/artifactId&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;commons-lang&lt;/groupId&gt;
          &lt;artifactId&gt;commons-lang&lt;/artifactId&gt;
          &lt;version&gt;2.4&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.querydsl&lt;/groupId&gt;
          &lt;artifactId&gt;querydsl-apt&lt;/artifactId&gt;
          &lt;version&gt;4.0.3&lt;/version&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.querydsl&lt;/groupId&gt;
          &lt;artifactId&gt;querydsl-jpa&lt;/artifactId&gt;
          &lt;version&gt;4.0.3&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.mysema.querydsl&lt;/groupId&gt;
          &lt;artifactId&gt;querydsl-core&lt;/artifactId&gt;
          &lt;version&gt;3.6.6&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.mysema.querydsl&lt;/groupId&gt;
          &lt;artifactId&gt;querydsl-jpa&lt;/artifactId&gt;
          &lt;version&gt;3.6.6&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.codehaus.groovy&lt;/groupId&gt;
          &lt;artifactId&gt;groovy&lt;/artifactId&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.activiti&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-basic&lt;/artifactId&gt;
          &lt;version&gt;${activiti.version}&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.icegreen&lt;/groupId&gt;
          &lt;artifactId&gt;greenmail&lt;/artifactId&gt;
          &lt;version&gt;1.4.1&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;!--Email Dependencies --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.sun.mail&lt;/groupId&gt;
          &lt;artifactId&gt;javax.mail&lt;/artifactId&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;junit&lt;/groupId&gt;
          &lt;artifactId&gt;junit&lt;/artifactId&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-websocket&lt;/artifactId&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.integration&lt;/groupId&gt;
          &lt;artifactId&gt;spring-integration-core&lt;/artifactId&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.dhboa.commons&lt;/groupId&gt;
          &lt;artifactId&gt;data-utils&lt;/artifactId&gt;
          &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
      &lt;/dependency&gt;
  &lt;/dependencies&gt;
  &lt;build&gt;
      &lt;plugins&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;com.mysema.maven&lt;/groupId&gt;
              &lt;artifactId&gt;apt-maven-plugin&lt;/artifactId&gt;
              &lt;version&gt;1.1.3&lt;/version&gt;
              &lt;executions&gt;
                  &lt;execution&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;process&lt;/goal&gt;
                      &lt;/goals&gt;
                      &lt;configuration&gt;
                          &lt;outputDirectory&gt;target/generated-sources/java&lt;/outputDirectory&gt;
                          &lt;processor&gt;com.mysema.query.apt.jpa.JPAAnnotationProcessor&lt;/processor&gt;
                      &lt;/configuration&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
              &lt;dependencies&gt;
                  &lt;dependency&gt;
                      &lt;groupId&gt;com.mysema.querydsl&lt;/groupId&gt;
                      &lt;artifactId&gt;querydsl-apt&lt;/artifactId&gt;
                      &lt;version&gt;3.6.6&lt;/version&gt;
                  &lt;/dependency&gt;
                  &lt;dependency&gt;
                      &lt;groupId&gt;com.mysema.querydsl&lt;/groupId&gt;
                      &lt;artifactId&gt;querydsl-jpa&lt;/artifactId&gt;
                      &lt;classifier&gt;apt&lt;/classifier&gt;
                      &lt;version&gt;3.6.6&lt;/version&gt;
                  &lt;/dependency&gt;
              &lt;/dependencies&gt;
          &lt;/plugin&gt;
      &lt;/plugins&gt;
  &lt;/build&gt;
  </code></pre>
  
  <p></p>