title: Spring Boot - Application failed to start with classpath
body: <p>What a nice day, isn't it?</p>
  
  <p>I hope that someone of this community can help me.</p>
  
  <p><strong>Tomcat Version 7,
  Servlet API 3.0</strong></p>
  
  <p>I like to start my <strong>Spring Boot</strong> project in a tomcat using a .war. Heres my code of the spring boot application:</p>
  
  <p><strong>Main-Class</strong></p>
  
  <pre><code>@Configuration
  @EnableAutoConfiguration
  @ComponentScan(basePackages = "com.###.dashboard")
  @EnableJpaRepositories
  @EntityScan(basePackages = "com.###.dashboard.domain")
  public class Dashboard extends SpringBootServletInitializer  {
  
      public static void main(String[] args) {
          SpringApplication.run(new Object[] {Dashboard.class}, args);    
      }
  
      @Override
      protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
          return application.sources(Dashboard.class);
      }
  
  
  }
  </code></pre>
  
  <p><strong>pom</strong></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.###.dashboard&lt;/groupId&gt;
    &lt;artifactId&gt;Dashboard&lt;/artifactId&gt;
    &lt;packaging&gt;war&lt;/packaging&gt;
    &lt;version&gt;1.0&lt;/version&gt;
    &lt;name&gt;Dashboard&lt;/name&gt;
    &lt;url&gt;http://maven.apache.org&lt;/url&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.1.8.RELEASE&lt;/version&gt;
      &lt;/parent&gt;
  
      &lt;dependencies&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-mobile&lt;/artifactId&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-thymeleaf&lt;/artifactId&gt;
          &lt;/dependency&gt;
  
  
          &lt;dependency&gt;
              &lt;groupId&gt;com.h2database&lt;/groupId&gt;
              &lt;artifactId&gt;h2&lt;/artifactId&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.data&lt;/groupId&gt;
              &lt;artifactId&gt;spring-data-commons&lt;/artifactId&gt;
          &lt;/dependency&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;/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;/dependencies&gt;
  
      &lt;properties&gt;
          &lt;start-class&gt;com.###.dashboard.main.Dashboard&lt;/start-class&gt;
      &lt;/properties&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;
  
  &lt;/project&gt;
  </code></pre>
  
  <p><strong>error message of tomcat/spring boot</strong></p>
  
  <pre><code>2014-12-04 13:32:18.878  INFO 198588 --- [           main] .b.l.ClasspathLoggingApplicationListener : Application failed to start
  with classpath: [file:/../tomcat7/webapps/dashboard/WEB-INF/classes/, ..path to libs, list of all jar files in folder libs..
  2014-12-04 13:32:19.091  INFO 198588 --- [           main] ationConfigEmbeddedWebApplicationContext : Closing org.springframework.
  boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@61f0fe81: startup date [Thu Dec 04 13:32:15 CET 2014]; root of
   context hierarchy
  java.lang.reflect.InvocationTargetException
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:606)
          at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:303)
          at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:431)
  Caused by: java.lang.OutOfMemoryError: PermGen space
  </code></pre>
  
  <p>Where i need to set the classpath? I thought i dont need to set any .xml-files.</p>
  
  <p>Thank you!</p>