title: Crash deploying Spring-Boot WAR in Tomcat
body: <p>I managed to run a spring-boot web application with <code>java -jar</code> command. But when changing the packaging field into war (in pom.xml) and build it into war, it failed to run in tomcat 7.</p>
  
  <p>I make my pom.xml's parent into:</p>
  
  <pre><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;0.5.0.M7&lt;/version&gt;
  &lt;/parent&gt;
  </code></pre>
  
  <p>and also:</p>
  
  <pre><code>public class ApplicationWebXml extends SpringBootServletInitializer {
  
      @Override
      protected SpringApplicationBuilder configure(
              SpringApplicationBuilder application) {
          return application.sources(Application.class);
      }
  
  }
  </code></pre>
  
  <p>The error I got is:</p>
  
  <pre><code>INFO: Deploying web application archive /home/ichsan/coding/java/tools/apache-tomcat-7.0.39/webapps/hello.war
  Jan 4, 2014 10:18:50 PM org.apache.catalina.loader.WebappClassLoader validateJarFile
  INFO: validateJarFile(/home/ichsan/coding/java/tools/apache-tomcat-7.0.39/webapps/hello/WEB-INF/lib/tomcat-embed-core-7.0.47.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
  Jan 4, 2014 10:18:50 PM org.apache.catalina.startup.ContextConfig getServletContainerInitializer
  SEVERE: The ServletContentInitializer [org.apache.tomcat.websocket.server.WsSci] could not be created
  java.lang.ClassNotFoundException: org.apache.tomcat.websocket.server.WsSci
      at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1713)
      at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1558)
  </code></pre>
  
  <p>My questions are:</p>
  
  <ol>
  <li>What happens here and how to overcome this?</li>
  <li>Is it really safe to use spring-boot? Because the embedded server libraries seem affecting reliability of its deployment into j2ee containers. I know, it's still in Milestone version.</li>
  </ol>