title: Spring Boot Error: java.lang.NoSuchMethodError: org.apache.tomcat.util.scan.StandardJarScanner.setJarScanFilter
body: <p>I am currently writing an API backend using Spring which I want to deploy on to a production server using Spring Boot.</p>
  
  <p>If I run the backend in Eclipse compiling to a war (specified in Maven), and using Tomcat 7, it runs without a problem.</p>
  
  <p>However as I want to deploy to the server I am using Spring Boot.</p>
  
  <p>Application.java</p>
  
  <pre><code>package com.ninjasquare.server;
  
  import java.util.Arrays;
  
  import org.springframework.boot.SpringApplication;
  import org.springframework.boot.autoconfigure.SpringBootApplication;
  import org.springframework.context.ApplicationContext;
  
  @SpringBootApplication
  public class Application {
  
       public static void main(String[] args) {
              ApplicationContext ctx = SpringApplication.run(Application.class, args);
  
              System.out.println("NinjaSquare server up and running with Spring Boot!");
  
              System.out.println("Let's inspect the beans provided by Spring Boot:");
  
              String[] beanNames = ctx.getBeanDefinitionNames();
              Arrays.sort(beanNames);
              for (String beanName : beanNames) {
                  System.out.println(beanName);
              }
  
          }
  
  }
  </code></pre>
  
  <p>pom.xml</p>
  
  <pre><code>&lt;project xmlns="http://maven.apache.org/POM/4.0.0"   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
      &lt;groupId&gt;com.ninjasquare&lt;/groupId&gt;
      &lt;artifactId&gt;NinjaSquareServer&lt;/artifactId&gt;
      &lt;!-- Server Deployment Change Required: 1. Change war to jar --&gt;
      &lt;packaging&gt;war&lt;/packaging&gt;
      &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
  
      &lt;!-- Spring Boot related config --&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;/parent&gt;
  
      &lt;properties&gt;
      &lt;java-version&gt;1.7&lt;/java-version&gt;
      &lt;!-- Note: By default Spring Boot uses Tomcat 8. We set this so we can use Tomcat 7. --&gt;
      &lt;!-- &lt;tomcat.version&gt;7.0.59&lt;/tomcat.version&gt; --&gt;
      &lt;!-- &lt;org.springframework-version&gt;4.1.6.RELEASE&lt;/org.springframework-version&gt; --&gt;
  
      &lt;org.springframework-version&gt;3.1.1.RELEASE&lt;/org.springframework-version&gt;
      &lt;org.aspectj-version&gt;1.6.10&lt;/org.aspectj-version&gt;
      &lt;org.slf4j-version&gt;1.6.6&lt;/org.slf4j-version&gt;
      &lt;jersey.version&gt;1.8&lt;/jersey.version&gt;
      &lt;org.springframework.data.version&gt;2.2.0.RELEASE&lt;/org.springframework.data.version&gt;
      &lt;org.springframework.spring-test&gt;2.5&lt;/org.springframework.spring-test&gt;
      &lt;log4j.version&gt;1.2.15&lt;/log4j.version&gt;
      &lt;javax.inject.version&gt;1&lt;/javax.inject.version&gt;
      &lt;javax.servlet.version&gt;3.0.1&lt;/javax.servlet.version&gt;
      &lt;javax.servlet.jsp.version&gt;2.1&lt;/javax.servlet.jsp.version&gt;
      &lt;javax.servlet.jstl.version&gt;1.2&lt;/javax.servlet.jstl.version&gt;
  
      &lt;spring-social-facebook-version&gt;1.1.1.RELEASE&lt;/spring-social-facebook-version&gt;
  
      &lt;junit.version&gt;4.4&lt;/junit.version&gt;
      &lt;cglib.version&gt;2.2.2&lt;/cglib.version&gt;
      &lt;org.hibernate.version&gt;4.3.1.Final&lt;/org.hibernate.version&gt;
      &lt;com.github.jsimone.version&gt;7.0.22.3&lt;/com.github.jsimone.version&gt;
      &lt;org.neo4j.app.version&gt;1.8.2&lt;/org.neo4j.app.version&gt;
      &lt;spring-data-neo4j.version&gt;2.0.1.RELEASE&lt;/spring-data-neo4j.version&gt;
      &lt;maven-eclipse-plugin.version&gt;2.9&lt;/maven-eclipse-plugin.version&gt;
      &lt;org.apache.maven.plugins.version&gt;2.5.1&lt;/org.apache.maven.plugins.version&gt;
      &lt;org.codehaus.mojo&gt;1.2.1&lt;/org.codehaus.mojo&gt;
      &lt;org.apache.maven.plugins.maven-dependency-plugin&gt;2.4&lt;/org.apache.maven.plugins.maven-dependency-plugin&gt;
      &lt;org.apache.maven.plugins.maven-surefire-plugin&gt;2.6&lt;/org.apache.maven.plugins.maven-surefire-plugin&gt;
  &lt;/properties&gt;
  
  &lt;dependencies&gt;
      &lt;!-- Server Deployment Change Required: 2. Include our custom JAR. For now, patch this code on the server manually.
      Note: This JAR needs to be installed with maven install:install-file on the server --&gt;
      &lt;!-- 
      &lt;dependency&gt;
          &lt;groupId&gt;com.ninjasquare.common&lt;/groupId&gt;
          &lt;artifactId&gt;ninjasquarecommon&lt;/artifactId&gt;
          &lt;version&gt;0.01&lt;/version&gt;
      &lt;/dependency&gt;
       --&gt;
  
      &lt;!--  Spring Boot dependency --&gt;
  
      &lt;!-- Import dependency management from Spring Boot --&gt;
      &lt;!-- 
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-dependencies&lt;/artifactId&gt;
          &lt;version&gt;1.2.3.RELEASE&lt;/version&gt;
          &lt;type&gt;pom&lt;/type&gt;
          &lt;scope&gt;import&lt;/scope&gt;
      &lt;/dependency&gt;
      --&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;!--  Was this code missing before? --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-core&lt;/artifactId&gt;
          &lt;version&gt;4.1.6.RELEASE&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;javax.el&lt;/groupId&gt;
          &lt;artifactId&gt;el-api&lt;/artifactId&gt;
          &lt;version&gt;2.2&lt;/version&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.glassfish.web&lt;/groupId&gt;
          &lt;artifactId&gt;el-impl&lt;/artifactId&gt;
          &lt;version&gt;2.2&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;!-- Jackson/Jersey deps --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.sun.jersey&lt;/groupId&gt;
          &lt;artifactId&gt;jersey-core&lt;/artifactId&gt;
          &lt;version&gt;${jersey.version}&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;com.sun.jersey&lt;/groupId&gt;
          &lt;artifactId&gt;jersey-server&lt;/artifactId&gt;
          &lt;version&gt;${jersey.version}&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;com.sun.jersey&lt;/groupId&gt;
          &lt;artifactId&gt;jersey-json&lt;/artifactId&gt;
          &lt;version&gt;${jersey.version}&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;!-- SDN --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.data&lt;/groupId&gt;
          &lt;artifactId&gt;spring-data-neo4j&lt;/artifactId&gt;
          &lt;!-- &lt;version&gt;${org.springframework.data.version}&lt;/version&gt; --&gt;
      &lt;/dependency&gt;
  
      &lt;!-- Spring --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-test&lt;/artifactId&gt;
          &lt;!-- &lt;version&gt;${org.springframework.spring-test}&lt;/version&gt; --&gt;
      &lt;/dependency&gt;
  
      &lt;!-- Spring --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-context&lt;/artifactId&gt;
          &lt;!-- &lt;version&gt;${org.springframework-version}&lt;/version&gt; --&gt;
          &lt;exclusions&gt;
              &lt;!-- Exclude Commons Logging in favor of SLF4j --&gt;
              &lt;exclusion&gt;
                  &lt;groupId&gt;commons-logging&lt;/groupId&gt;
                  &lt;artifactId&gt;commons-logging&lt;/artifactId&gt;
              &lt;/exclusion&gt;
          &lt;/exclusions&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-webmvc&lt;/artifactId&gt;
          &lt;!-- &lt;version&gt;${org.springframework-version}&lt;/version&gt; --&gt;
      &lt;/dependency&gt;
  
      &lt;!-- AspectJ --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.aspectj&lt;/groupId&gt;
          &lt;artifactId&gt;aspectjrt&lt;/artifactId&gt;
          &lt;!-- &lt;version&gt;${org.aspectj-version}&lt;/version&gt; --&gt;
      &lt;/dependency&gt;
  
      &lt;!-- Logging --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;log4j&lt;/groupId&gt;
          &lt;artifactId&gt;log4j&lt;/artifactId&gt;
          &lt;!-- &lt;version&gt;${log4j.version}&lt;/version&gt; --&gt;
          &lt;exclusions&gt;
              &lt;exclusion&gt;
                  &lt;groupId&gt;javax.mail&lt;/groupId&gt;
                  &lt;artifactId&gt;mail&lt;/artifactId&gt;
              &lt;/exclusion&gt;
              &lt;exclusion&gt;
                  &lt;groupId&gt;javax.jms&lt;/groupId&gt;
                  &lt;artifactId&gt;jms&lt;/artifactId&gt;
              &lt;/exclusion&gt;
              &lt;exclusion&gt;
                  &lt;groupId&gt;com.sun.jdmk&lt;/groupId&gt;
                  &lt;artifactId&gt;jmxtools&lt;/artifactId&gt;
              &lt;/exclusion&gt;
              &lt;exclusion&gt;
                  &lt;groupId&gt;com.sun.jmx&lt;/groupId&gt;
                  &lt;artifactId&gt;jmxri&lt;/artifactId&gt;
              &lt;/exclusion&gt;
          &lt;/exclusions&gt;
      &lt;/dependency&gt;
  
      &lt;!-- @Inject --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;javax.inject&lt;/groupId&gt;
          &lt;artifactId&gt;javax.inject&lt;/artifactId&gt;
          &lt;version&gt;${javax.inject.version}&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;!-- Servlet --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
          &lt;artifactId&gt;javax.servlet-api&lt;/artifactId&gt;
          &lt;!-- &lt;version&gt;${javax.servlet.version}&lt;/version&gt; --&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;javax.servlet.jsp&lt;/groupId&gt;
          &lt;artifactId&gt;jsp-api&lt;/artifactId&gt;
          &lt;version&gt;${javax.servlet.jsp.version}&lt;/version&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
          &lt;artifactId&gt;jstl&lt;/artifactId&gt;
          &lt;!-- &lt;version&gt;${javax.servlet.jstl.version}&lt;/version&gt; --&gt;
      &lt;/dependency&gt;
  
      &lt;!--  Import Spring Social libraries --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.social&lt;/groupId&gt;
          &lt;artifactId&gt;spring-social-facebook&lt;/artifactId&gt;
          &lt;!-- &lt;version&gt;${spring-social-facebook-version}&lt;/version&gt; --&gt;
      &lt;/dependency&gt;
  
      &lt;!-- additional libraries required by neo/spring... --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;junit&lt;/groupId&gt;
          &lt;artifactId&gt;junit&lt;/artifactId&gt;
          &lt;!-- &lt;version&gt;${junit.version}&lt;/version&gt; --&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;cglib&lt;/groupId&gt;
          &lt;artifactId&gt;cglib&lt;/artifactId&gt;
          &lt;version&gt;${cglib.version}&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
          &lt;artifactId&gt;hibernate-validator&lt;/artifactId&gt;
          &lt;!-- &lt;version&gt;${org.hibernate.version}&lt;/version&gt; --&gt;
      &lt;/dependency&gt;
  
  
      &lt;!-- execute immediately support... --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.github.jsimone&lt;/groupId&gt;
          &lt;artifactId&gt;webapp-runner&lt;/artifactId&gt;
          &lt;version&gt;${com.github.jsimone.version}&lt;/version&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;com.sun.jersey.contribs&lt;/groupId&gt;
          &lt;artifactId&gt;jersey-spring&lt;/artifactId&gt;
          &lt;version&gt;${jersey.version}&lt;/version&gt;
          &lt;exclusions&gt;
              &lt;exclusion&gt;
                  &lt;groupId&gt;org.springframework&lt;/groupId&gt;
                  &lt;artifactId&gt;spring&lt;/artifactId&gt;
              &lt;/exclusion&gt;
              &lt;exclusion&gt;
                  &lt;groupId&gt;org.springframework&lt;/groupId&gt;
                  &lt;artifactId&gt;spring-aop&lt;/artifactId&gt;
              &lt;/exclusion&gt;
              &lt;exclusion&gt;
                  &lt;groupId&gt;org.springframework&lt;/groupId&gt;
                  &lt;artifactId&gt;spring-core&lt;/artifactId&gt;
              &lt;/exclusion&gt;
              &lt;exclusion&gt;
                  &lt;groupId&gt;org.springframework&lt;/groupId&gt;
                  &lt;artifactId&gt;spring-web&lt;/artifactId&gt;
              &lt;/exclusion&gt;
              &lt;exclusion&gt;
                  &lt;groupId&gt;org.springframework&lt;/groupId&gt;
                  &lt;artifactId&gt;spring-beans&lt;/artifactId&gt;
              &lt;/exclusion&gt;
              &lt;exclusion&gt;
                  &lt;groupId&gt;org.springframework&lt;/groupId&gt;
                  &lt;artifactId&gt;spring-context&lt;/artifactId&gt;
              &lt;/exclusion&gt;
          &lt;/exclusions&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.neo4j.app&lt;/groupId&gt;
          &lt;artifactId&gt;neo4j-server&lt;/artifactId&gt;
          &lt;version&gt;${org.neo4j.app.version}&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.neo4j.app&lt;/groupId&gt;
          &lt;artifactId&gt;neo4j-server&lt;/artifactId&gt;
          &lt;classifier&gt;static-web&lt;/classifier&gt;
          &lt;version&gt;${org.neo4j.app.version}&lt;/version&gt;
      &lt;/dependency&gt;
  
              &lt;!--        
              &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.data&lt;/groupId&gt;
          &lt;artifactId&gt;spring-data-neo4j-rest&lt;/artifactId&gt;
          &lt;version&gt;${spring-data-neo4j.version}&lt;/version&gt;
      &lt;/dependency&gt; --&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.simpleframework&lt;/groupId&gt;
          &lt;artifactId&gt;simple-xml&lt;/artifactId&gt;
          &lt;version&gt;2.7&lt;/version&gt;
      &lt;/dependency&gt;
  
  &lt;/dependencies&gt;
  &lt;build&gt;
      &lt;plugins&gt;
          &lt;!-- Plugin for Spring Boot Maven --&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;plugin&gt;
              &lt;artifactId&gt;maven-eclipse-plugin&lt;/artifactId&gt;
              &lt;!-- &lt;version&gt;${maven-eclipse-plugin.version}&lt;/version&gt; --&gt;
              &lt;configuration&gt;
                  &lt;additionalProjectnatures&gt;
                      &lt;projectnature&gt;org.springframework.ide.eclipse.core.springnature&lt;/projectnature&gt;
                  &lt;/additionalProjectnatures&gt;
                  &lt;additionalBuildcommands&gt;
                      &lt;buildcommand&gt;org.springframework.ide.eclipse.core.springbuilder&lt;/buildcommand&gt;
                  &lt;/additionalBuildcommands&gt;
                  &lt;downloadSources&gt;true&lt;/downloadSources&gt;
                  &lt;downloadJavadocs&gt;true&lt;/downloadJavadocs&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
              &lt;!-- &lt;version&gt;${org.apache.maven.plugins.version}&lt;/version&gt; --&gt;
              &lt;configuration&gt;
                  &lt;source&gt;${java-version}&lt;/source&gt;
                  &lt;target&gt;${java-version}&lt;/target&gt;
                  &lt;compilerArgument&gt;-Xlint:all&lt;/compilerArgument&gt;
                  &lt;showWarnings&gt;true&lt;/showWarnings&gt;
                  &lt;showDeprecation&gt;true&lt;/showDeprecation&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
              &lt;artifactId&gt;exec-maven-plugin&lt;/artifactId&gt;
              &lt;!-- &lt;version&gt;${org.codehaus.mojo}&lt;/version&gt; --&gt;
              &lt;configuration&gt;
                  &lt;mainClass&gt;org.test.int1.Main&lt;/mainClass&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
          &lt;!-- enable execution environment... --&gt;
          &lt;!-- &lt;plugin&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-dependency-plugin&lt;/artifactId&gt;
              &lt;version&gt;${org.apache.maven.plugins.maven-dependency-plugin}&lt;/version&gt;
              &lt;executions&gt;
                  &lt;execution&gt;
                      &lt;phase&gt;package&lt;/phase&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;copy&lt;/goal&gt;
                      &lt;/goals&gt;
                      &lt;configuration&gt;
                          &lt;artifactItems&gt;
                              &lt;artifactItem&gt;
                                  &lt;groupId&gt;com.github.jsimone&lt;/groupId&gt;
                                  &lt;artifactId&gt;webapp-runner&lt;/artifactId&gt;
                                  &lt;version&gt;${com.github.jsimone.version}&lt;/version&gt;
                                  &lt;destFileName&gt;webapp-runner.jar&lt;/destFileName&gt;
                              &lt;/artifactItem&gt;
                          &lt;/artifactItems&gt;
                      &lt;/configuration&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
          &lt;/plugin&gt; --&gt;
  
          &lt;!-- get Spring, Maven &amp; JUnit test working... --&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt;
              &lt;!-- &lt;version&gt;${org.apache.maven.plugins.maven-surefire-plugin}&lt;/version&gt; --&gt;
              &lt;dependencies&gt;
                  &lt;dependency&gt;
                      &lt;groupId&gt;org.apache.maven.surefire&lt;/groupId&gt;
                      &lt;artifactId&gt;surefire-junit47&lt;/artifactId&gt;
                      &lt;version&gt;${org.apache.maven.plugins.maven-surefire-plugin}&lt;/version&gt;
                  &lt;/dependency&gt;
              &lt;/dependencies&gt;
              &lt;configuration&gt;
                  &lt;includes&gt;
                      &lt;include&gt;**/testcases/*.class&lt;/include&gt;
                  &lt;/includes&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
  
      &lt;/plugins&gt;
  &lt;/build&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>When I copy the whole project over to my linux server, and I run <strong>maven package</strong>, the code compiles without a problem. When I then run the generated jar file with <strong>java -jar [name of file]</strong> I get the following error:</p>
  
  <pre><code>09:17:26.946 [main] ERROR o.s.boot.SpringApplication - Application startup failed
  org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is java.lang.NoSuchMethodError: org.apache.tomcat.util.scan.StandardJarScanner.setJarScanFilter(Lorg/apache/tomcat/JarScanFilter;)V
      at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:133) ~[spring-boot-1.2.3.RELEASE.jar!/:1.2.3.RELEASE]
      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:474) ~[spring-context-4.1.6.RELEASE.jar!/:4.1.6.RELEASE]
      at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118) ~[spring-boot-1.2.3.RELEASE.jar!/:1.2.3.RELEASE]
      at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:686) [spring-boot-1.2.3.RELEASE.jar!/:1.2.3.RELEASE]
      at org.springframework.boot.SpringApplication.run(SpringApplication.java:320) [spring-boot-1.2.3.RELEASE.jar!/:1.2.3.RELEASE]
      at org.springframework.boot.SpringApplication.run(SpringApplication.java:957) [spring-boot-1.2.3.RELEASE.jar!/:1.2.3.RELEASE]
      at org.springframework.boot.SpringApplication.run(SpringApplication.java:946) [spring-boot-1.2.3.RELEASE.jar!/:1.2.3.RELEASE]
      at com.ninjasquare.server.Application.main(Application.java:13) [NinjaSquareServer-0.0.1-SNAPSHOT.jar!/:0.0.1-SNAPSHOT]
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_75]
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_75]
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_75]
      at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_75]
      at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:53) [NinjaSquareServer-0.0.1-SNAPSHOT.jar!/:0.0.1-SNAPSHOT]
      at java.lang.Thread.run(Thread.java:745) [na:1.7.0_75]
  Caused by: java.lang.NoSuchMethodError: org.apache.tomcat.util.scan.StandardJarScanner.setJarScanFilter(Lorg/apache/tomcat/JarScanFilter;)V
      at org.springframework.boot.context.embedded.tomcat.SkipPatternJarScanner$Tomcat8TldSkipSetter.setSkipPattern(SkipPatternJarScanner.java:106) ~[spring-boot-1.2.3.RELEASE.jar!/:1.2.3.RELEASE]
      at org.springframework.boot.context.embedded.tomcat.SkipPatternJarScanner.setPatternToTomcat8SkipFilter(SkipPatternJarScanner.java:61) ~[spring-boot-1.2.3.RELEASE.jar!/:1.2.3.RELEASE]
      at org.springframework.boot.context.embedded.tomcat.SkipPatternJarScanner.&lt;init&gt;(SkipPatternJarScanner.java:56) ~[spring-boot-1.2.3.RELEASE.jar!/:1.2.3.RELEASE]
      at org.springframework.boot.context.embedded.tomcat.SkipPatternJarScanner.apply(SkipPatternJarScanner.java:87) ~[spring-boot-1.2.3.RELEASE.jar!/:1.2.3.RELEASE]
      at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainerFactory.prepareContext(TomcatEmbeddedServletContainerFactory.java:168) ~[spring-boot-1.2.3.RELEASE.jar!/:1.2.3.RELEASE]
      at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainerFactory.getEmbeddedServletContainer(TomcatEmbeddedServletContainerFactory.java:154) ~[spring-boot-1.2.3.RELEASE.jar!/:1.2.3.RELEASE]
      at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.createEmbeddedServletContainer(EmbeddedWebApplicationContext.java:157) ~[spring-boot-1.2.3.RELEASE.jar!/:1.2.3.RELEASE]
      at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:130) ~[spring-boot-1.2.3.RELEASE.jar!/:1.2.3.RELEASE]
      ... 13 common frames omitted
  </code></pre>
  
  <p>I think the issue is because I don't have the right versions of Spring/Spring Boot running (perhaps it's trying to use an incorrect version of Tomcat so the method doesn't exist?)</p>
  
  <p><strong>Update 2015-04-06:</strong> I tried kucing_terbang's suggestion of using spring boot v1.1.10 but now get the error as follows:</p>
  
  <pre><code>[Stacktrace deleted, as out of space for stackoverflow question, refer to stacktrace of v1.1.12.RELEASE below]
  </code></pre>
  
  <p><strong>Update 2015-04-07:</strong> I then tried with v1.1.12.RELEASE which gave similar errors:</p>
  
  <pre><code>07:41:29.917 [main] INFO  o.s.b.f.a.AutowiredAnnotationBeanPostProcessor - JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
  07:41:29.949 [main] WARN  o.s.b.c.e.AnnotationConfigEmbeddedWebApplicationContext - Exception encountered during context initialization - cancelling refresh attempt
  org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is org.springframework.context.ApplicationContextException: Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean.
      at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:124) [spring-boot-1.1.12.RELEASE.jar!/:1.1.12.RELEASE]
      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:476) ~[spring-context-4.0.9.RELEASE.jar!/:4.0.9.RELEASE]
      at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:109) [spring-boot-1.1.12.RELEASE.jar!/:1.1.12.RELEASE]
      at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:691) [spring-boot-1.1.12.RELEASE.jar!/:1.1.12.RELEASE]
      at org.springframework.boot.SpringApplication.run(SpringApplication.java:320) [spring-boot-1.1.12.RELEASE.jar!/:1.1.12.RELEASE]
      at org.springframework.boot.SpringApplication.run(SpringApplication.java:952) [spring-boot-1.1.12.RELEASE.jar!/:1.1.12.RELEASE]
      at org.springframework.boot.SpringApplication.run(SpringApplication.java:941) [spring-boot-1.1.12.RELEASE.jar!/:1.1.12.RELEASE]
      at com.ninjasquare.server.Application.main(Application.java:13) [NinjaSquareServer-0.0.1-SNAPSHOT.jar!/:na]
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_75]
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_75]
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_75]
      at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_75]
      at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:53) [NinjaSquareServer-0.0.1-SNAPSHOT.jar!/:na]
      at java.lang.Thread.run(Thread.java:745) [na:1.7.0_75]
  Caused by: org.springframework.context.ApplicationContextException: Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean.
      at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.getEmbeddedServletContainerFactory(EmbeddedWebApplicationContext.java:174) [spring-boot-1.1.12.RELEASE.jar!/:1.1.12.RELEASE]
      at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.createEmbeddedServletContainer(EmbeddedWebApplicationContext.java:147) [spring-boot-1.1.12.RELEASE.jar!/:1.1.12.RELEASE]
      at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:121) [spring-boot-1.1.12.RELEASE.jar!/:1.1.12.RELEASE]
      ... 13 common frames omitted
  
  07:41:29.952 [main] ERROR o.s.boot.SpringApplication - Application startup failed
  org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is org.springframework.context.ApplicationContextException: Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean.
      at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:124) ~[spring-boot-1.1.12.RELEASE.jar!/:1.1.12.RELEASE]
      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:476) ~[spring-context-4.0.9.RELEASE.jar!/:4.0.9.RELEASE]
      at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:109) ~[spring-boot-1.1.12.RELEASE.jar!/:1.1.12.RELEASE]
      at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:691) [spring-boot-1.1.12.RELEASE.jar!/:1.1.12.RELEASE]
      at org.springframework.boot.SpringApplication.run(SpringApplication.java:320) [spring-boot-1.1.12.RELEASE.jar!/:1.1.12.RELEASE]
      at org.springframework.boot.SpringApplication.run(SpringApplication.java:952) [spring-boot-1.1.12.RELEASE.jar!/:1.1.12.RELEASE]
      at org.springframework.boot.SpringApplication.run(SpringApplication.java:941) [spring-boot-1.1.12.RELEASE.jar!/:1.1.12.RELEASE]
      at com.ninjasquare.server.Application.main(Application.java:13) [NinjaSquareServer-0.0.1-SNAPSHOT.jar!/:na]
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_75]
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_75]
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_75]
      at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_75]
      at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:53) [NinjaSquareServer-0.0.1-SNAPSHOT.jar!/:na]
      at java.lang.Thread.run(Thread.java:745) [na:1.7.0_75]
  Caused by: org.springframework.context.ApplicationContextException: Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean.
      at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.getEmbeddedServletContainerFactory(EmbeddedWebApplicationContext.java:174) ~[spring-boot-1.1.12.RELEASE.jar!/:1.1.12.RELEASE]
      at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.createEmbeddedServletContainer(EmbeddedWebApplicationContext.java:147) ~[spring-boot-1.1.12.RELEASE.jar!/:1.1.12.RELEASE]
      at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:121) ~[spring-boot-1.1.12.RELEASE.jar!/:1.1.12.RELEASE]
      ... 13 common frames omitted
  </code></pre>
  
  <p>I then tried a mvn clean and mvn package again, which gave me the following error on compile:</p>
  
  <pre><code>[ERROR] COMPILATION ERROR :
  [INFO] -------------------------------------------------------------
  [ERROR] /home/dengke/test_garden/NinjaSquareServer-DS-ServerDeploymentPOC-2015-04-04/src/main/java/com/ninjasquare/server/Application.java:[6,46] cannot find symbol
    symbol:   class SpringBootApplication
    location: package org.springframework.boot.autoconfigure
  [ERROR] /home/dengke/test_garden/NinjaSquareServer-DS-ServerDeploymentPOC-2015-04-04/src/main/java/com/ninjasquare/server/Application.java:[9,2] cannot find symbol
    symbol: class SpringBootApplication
  [ERROR] /home/dengke/test_garden/NinjaSquareServer-DS-ServerDeploymentPOC-2015-04-04/src/main/java/com/ninjasquare/server/Application.java:[6,46] cannot find symbol
    symbol:   class SpringBootApplication
    location: package org.springframework.boot.autoconfigure
  [ERROR] /home/dengke/test_garden/NinjaSquareServer-DS-ServerDeploymentPOC-2015-04-04/src/main/java/com/ninjasquare/server/Application.java:[9,2] cannot find symbol
    symbol: class SpringBootApplication
  [INFO] 4 errors
  [INFO] -------------------------------------------------------------
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD FAILURE
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time: 12.839s
  [INFO] Finished at: Tue Apr 07 07:31:41 BST 2015
  [INFO] Final Memory: 24M/63M
  [INFO] ------------------------------------------------------------------------
  [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project NinjaSquareServer: Compilation failure: Compilation failure:
  [ERROR] /home/dengke/test_garden/NinjaSquareServer-DS-ServerDeploymentPOC-2015-04-04/src/main/java/com/ninjasquare/server/Application.java:[6,46] cannot find symbol
  [ERROR] symbol:   class SpringBootApplication
  [ERROR] location: package org.springframework.boot.autoconfigure
  [ERROR] /home/dengke/test_garden/NinjaSquareServer-DS-ServerDeploymentPOC-2015-04-04/src/main/java/com/ninjasquare/server/Application.java:[9,2] cannot find symbol
  [ERROR] symbol: class SpringBootApplication
  [ERROR] /home/dengke/test_garden/NinjaSquareServer-DS-ServerDeploymentPOC-2015-04-04/src/main/java/com/ninjasquare/server/Application.java:[6,46] cannot find symbol
  [ERROR] symbol:   class SpringBootApplication
  [ERROR] location: package org.springframework.boot.autoconfigure
  [ERROR] /home/dengke/test_garden/NinjaSquareServer-DS-ServerDeploymentPOC-2015-04-04/src/main/java/com/ninjasquare/server/Application.java:[9,2] cannot find symbol
  [ERROR] symbol: class SpringBootApplication
  [ERROR] -&gt; [Help 1]
  </code></pre>
  
  <p>However if I using v1.2.3.RELEASE I don't get the compile error, and if I then change to v1.1.12.RELEASE and run mvn package without a clean, I don't get the error either (but I get the error when running the jar as before).</p>
  
  <p>Perhaps this is indicative of a deeper issue?</p>
  
  <p>Any help with this issue would be much appreciated.</p>
  
  <p>Thanks!</p>