title: Spring boot application not starting on Tomcat 7
body: <p>I am trying to deploy my Spring boot application on a Tomcat 7 server and start it. I am able to deploy, while I am facing problems in starting the server.</p>
  
  <p>What I did ?</p>
  
  <p>1) Created a spring starter project with the initial configurations and dependencies.</p>
  
  <p>2) Edited the 'org.eclipse.wst.common.project.facet.core.xml' file and changed the 'jst.web' version from 3.1 to 3.0. Cleaned the project.</p>
  
  <p>3) Implemented <code>ServletContextInitializer</code> with onStartup method override based on the explicit configuration steps as per <a href="https://github.com/spring-projects/spring-boot/issues/522" rel="nofollow noreferrer">https://github.com/spring-projects/spring-boot/issues/522</a>. Code looks like below</p>
  
  <pre><code>@Configuration
  public class ContextInitializer implements ServletContextInitializer {
  
  @Override
  public void onStartup(ServletContext arg0) throws ServletException {
      // TODO Auto-generated method stub
  }
  
  }
  </code></pre>
  
  <p>and in my Application class</p>
  
  <pre><code>public static void main(String[] args) {
      SpringApplication.run(new Class[] { SocialIntegrationApplication.class, ContextInitializer.class }, args);
  }
  </code></pre>
  
  <p>4) Performed a mvn clean install. Builds successfully.</p>
  
  <p>But when starting the server, I am getting an error as <code>Server Java Web Tomcat 7 Server failed to start.</code></p>
  
  <p>Could you please help me out. Thanks.</p>
  
  <p>EDIT : Sharing the catalina.out. Not able to see any error though.</p>
  
  <pre><code>127.0.0.1 - - [07/Feb/2017:18:16:17 +0530] "GET / HTTP/1.1" 404 899
  0:0:0:0:0:0:0:1 - - [07/Feb/2017:18:16:18 +0530] "GET /ROOT/ HTTP/1.1" 200 37264
  0:0:0:0:0:0:0:1 - - [07/Feb/2017:18:16:19 +0530] "GET /ROOT/pages/images/favicon.ico HTTP/1.1" 401 923
  127.0.0.1 - - [07/Feb/2017:18:22:17 +0530] "GET / HTTP/1.1" 404 899
  0:0:0:0:0:0:0:1 - - [07/Feb/2017:18:22:18 +0530] "GET /ROOT/ HTTP/1.1" 200 37264
  0:0:0:0:0:0:0:1 - - [07/Feb/2017:18:22:18 +0530] "GET /ROOT/pages/images/favicon.ico HTTP/1.1" 401 923
  0:0:0:0:0:0:0:1 - - [07/Feb/2017:18:22:27 +0530] "GET /ROOT/facebook HTTP/1.1" 200 37264
  0:0:0:0:0:0:0:1 - - [07/Feb/2017:18:22:27 +0530] "GET /ROOT/pages/images/favicon.ico HTTP/1.1" 401 923
  0:0:0:0:0:0:0:1 - - [07/Feb/2017:18:22:38 +0530] "GET /ROOT/facebook HTTP/1.1" 200 37264
  0:0:0:0:0:0:0:1 - - [07/Feb/2017:18:22:38 +0530] "GET /ROOT/pages/images/favicon.ico HTTP/1.1" 401 923
  0:0:0:0:0:0:0:1 - - [07/Feb/2017:18:25:17 +0530] "GET /ROOT/ HTTP/1.1" 200 37264
  0:0:0:0:0:0:0:1 - - [07/Feb/2017:18:25:17 +0530] "GET /ROOT/pages/images/favicon.ico HTTP/1.1" 401 923
  127.0.0.1 - - [07/Feb/2017:18:25:59 +0530] "GET / HTTP/1.1" 404 899
  0:0:0:0:0:0:0:1 - - [07/Feb/2017:18:26:00 +0530] "GET /integration/ HTTP/1.1" 404 923
  0:0:0:0:0:0:0:1 - - [07/Feb/2017:18:28:31 +0530] "GET /integration/ HTTP/1.1" 404 923
  0:0:0:0:0:0:0:1 - - [07/Feb/2017:18:29:02 +0530] "GET / HTTP/1.1" 404 899
  0:0:0:0:0:0:0:1 - - [07/Feb/2017:18:29:05 +0530] "GET / HTTP/1.1" 404 899
  </code></pre>
  
  <p>Sharing the server console log</p>
  
  <pre><code>    15:27:19.848 [localhost-startStop-1] ERROR org.slf4j.helpers.Util - SLF4J: Class path contains multiple SLF4J bindings.
  15:27:19.852 [localhost-startStop-1] ERROR org.slf4j.helpers.Util - SLF4J: Found binding in [jar:file:/C:/XM/neo-java-web-sdk-2.53.6/repository/.archive/bin/logback-classic.jar!/org/slf4j/impl/StaticLoggerBinder.class]
  15:27:19.852 [localhost-startStop-1] ERROR org.slf4j.helpers.Util - SLF4J: Found binding in [jar:file:/C:/XM/XM_Workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/social-integration/WEB-INF/lib/logback-classic-1.1.9.jar!/org/slf4j/impl/StaticLoggerBinder.class]
  15:27:19.853 [localhost-startStop-1] ERROR org.slf4j.helpers.Util - SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
  15:27:20.269 [localhost-startStop-1] ERROR org.slf4j.helpers.Util - SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]
  </code></pre>
  
  <p>EDIT 2 : Adding the <code>logging.level.root=INFO</code> to the properties file, getting the following exception</p>
  
  <pre><code>    11:53:20.995 [localhost-startStop-1] ERROR org.slf4j.helpers.Util - SLF4J: Class path contains multiple SLF4J bindings.
  11:53:20.997 [localhost-startStop-1] ERROR org.slf4j.helpers.Util - SLF4J: Found binding in [jar:file:/C:/XM/neo-java-web-sdk-2.53.6/repository/.archive/bin/logback-classic.jar!/org/slf4j/impl/StaticLoggerBinder.class]
  11:53:20.997 [localhost-startStop-1] ERROR org.slf4j.helpers.Util - SLF4J: Found binding in [jar:file:/C:/XM/XM_Workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/social-integration-tomcat7/WEB-INF/lib/logback-classic-1.1.7.jar!/org/slf4j/impl/StaticLoggerBinder.class]
  11:53:20.998 [localhost-startStop-1] ERROR org.slf4j.helpers.Util - SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
  11:53:21.283 [localhost-startStop-1] ERROR org.slf4j.helpers.Util - SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]
  11:53:22.303 [main] ERROR java.lang.Throwable - java.lang.ClassCircularityError: java/util/logging/LogRecord
  11:53:22.303 [main] ERROR java.lang.Throwable -     at org.slf4j.bridge.SLF4JBridgeHandler.getSLF4JLogger(SLF4JBridgeHandler.java:198)
  11:53:22.304 [main] ERROR java.lang.Throwable -     at org.slf4j.bridge.SLF4JBridgeHandler.publish(SLF4JBridgeHandler.java:293)
  11:53:22.304 [main] ERROR java.lang.Throwable -     at java.util.logging.Logger.log(Logger.java:616)
  11:53:22.304 [main] ERROR java.lang.Throwable -     at java.util.logging.Logger.doLog(Logger.java:641)
  11:53:22.304 [main] ERROR java.lang.Throwable -     at java.util.logging.Logger.logp(Logger.java:841)
  11:53:22.305 [main] ERROR java.lang.Throwable -     at org.apache.juli.logging.DirectJDKLog.log(DirectJDKLog.java:185)
  11:53:22.305 [main] ERROR java.lang.Throwable -     at org.apache.juli.logging.DirectJDKLog.fatal(DirectJDKLog.java:161)
  11:53:22.305 [main] ERROR java.lang.Throwable -     at org.apache.catalina.startup.Catalina.start(Catalina.java:695)
  11:53:22.305 [main] ERROR java.lang.Throwable -     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  11:53:22.306 [main] ERROR java.lang.Throwable -     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
  11:53:22.306 [main] ERROR java.lang.Throwable -     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  11:53:22.306 [main] ERROR java.lang.Throwable -     at java.lang.reflect.Method.invoke(Method.java:606)
  11:53:22.307 [main] ERROR java.lang.Throwable -     at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
  11:53:22.307 [main] ERROR java.lang.Throwable -     at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:428)
  </code></pre>
  
  <p>and my current pom.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  </code></pre>
  
  <p>http://maven.apache.org/xsd/maven-4.0.0.xsd">
      4.0.0</p>
  
  <pre><code>&lt;groupId&gt;com.xm&lt;/groupId&gt;
  &lt;artifactId&gt;social-integration&lt;/artifactId&gt;
  &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
  &lt;packaging&gt;war&lt;/packaging&gt;
  
  &lt;name&gt;social-integration&lt;/name&gt;
  &lt;description&gt;Social integration using Spring Boot&lt;/description&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.5.1.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;project.reporting.outputEncoding&gt;UTF-8&lt;/project.reporting.outputEncoding&gt;
      &lt;java.version&gt;1.7&lt;/java.version&gt;
      &lt;tomcat.version&gt;7.0.59&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-batch&lt;/artifactId&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-social-facebook&lt;/artifactId&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-social-linkedin&lt;/artifactId&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-social-twitter&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;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-web-services&lt;/artifactId&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.tomcat&lt;/groupId&gt;
          &lt;artifactId&gt;tomcat-juli&lt;/artifactId&gt;
          &lt;version&gt;7.0.59&lt;/version&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.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-configuration-processor&lt;/artifactId&gt;
          &lt;optional&gt;true&lt;/optional&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-configuration-processor&lt;/artifactId&gt;
          &lt;optional&gt;true&lt;/optional&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;!-- Facebook APIs --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.facebook.ads.sdk&lt;/groupId&gt;
          &lt;artifactId&gt;facebook-java-ads-sdk&lt;/artifactId&gt;
          &lt;version&gt;0.4.0&lt;/version&gt;
      &lt;/dependency&gt;
  &lt;/dependencies&gt;
  
  &lt;build&gt;
      &lt;plugins&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-maven-plugin&lt;/artifactId&gt;
          &lt;/plugin&gt;
      &lt;/plugins&gt;
  &lt;/build&gt;
  </code></pre>
  
  <p></p>