Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener : <p>I have a spring project and try to make it use spring boot and to run at embadded tomcat following :</p>

<p><a href="https://spring.io/guides/gs/rest-service/" rel="noreferrer">https://spring.io/guides/gs/rest-service/</a></p>

<p>This is my Application</p>

<pre><code>//@Configuration
//@EnableAspectJAutoProxy
@SpringBootApplication
@ComponentScan(basePackages = "gux.prome")
public class Application {

    public static void main(String[] args) {
        SpringApplication.run(Application.class, args);
    }

}
</code></pre>

<p>If I use maven command: <code>mvn spring-boot:run</code>, the project starts fine, but I need to debug , so I run this main method at InteliJ, exception occurs:</p>

<pre><code>Exception in thread "main" java.lang.IllegalArgumentException: Cannot instantiate interface org.springframework.context.ApplicationListener : org.springframework.boot.logging.ClasspathLoggingApplicationListener
    at org.springframework.boot.SpringApplication.createSpringFactoriesInstances(SpringApplication.java:414)
    at org.springframework.boot.SpringApplication.getSpringFactoriesInstances(SpringApplication.java:394)
    at org.springframework.boot.SpringApplication.getSpringFactoriesInstances(SpringApplication.java:385)
    at org.springframework.boot.SpringApplication.initialize(SpringApplication.java:263)
    at org.springframework.boot.SpringApplication.&lt;init&gt;(SpringApplication.java:237)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1191)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1180)
    at gux.prome.config.Application.main(Application.java:19)
    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 com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)
Caused by: java.lang.NoClassDefFoundError: org/springframework/context/event/GenericApplicationListener
....
</code></pre>

<p>This is the pom:</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;gux&lt;/groupId&gt;
  &lt;artifactId&gt;prome-data&lt;/artifactId&gt;


  &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
  &lt;name&gt;prome-data Maven Webapp&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.3.3.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;!-- guava --&gt;
    &lt;dependency&gt;
      &lt;groupId&gt;com.google.guava&lt;/groupId&gt;
      &lt;artifactId&gt;guava&lt;/artifactId&gt;
      &lt;version&gt;18.0&lt;/version&gt;
    &lt;/dependency&gt;
    &lt;!-- end of guava --&gt;


    &lt;dependency&gt;
      &lt;groupId&gt;joda-time&lt;/groupId&gt;
      &lt;artifactId&gt;joda-time&lt;/artifactId&gt;
      &lt;version&gt;2.9.2&lt;/version&gt;
    &lt;/dependency&gt;

  &lt;/dependencies&gt;


  &lt;properties&gt;
    &lt;java.version&gt;1.7&lt;/java.version&gt;
  &lt;/properties&gt;


  &lt;build&gt;

    &lt;finalName&gt;prome-data&lt;/finalName&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;!--&lt;plugin&gt;--&gt;
      &lt;!-- use java 7 --&gt;
        &lt;!--&lt;artifactId&gt; maven-compiler-plugin&lt;/artifactId&gt;--&gt;
        &lt;!--&lt;version&gt;3.1&lt;/version&gt;--&gt;
        &lt;!--&lt;configuration&gt;--&gt;
          &lt;!--&lt;source&gt; 1.7&lt;/source&gt;   --&gt;
          &lt;!--&lt;target&gt; 1.7&lt;/target&gt;--&gt;
        &lt;!--&lt;/configuration&gt;--&gt;
      &lt;!--&lt;/plugin&gt;--&gt;

    &lt;/plugins&gt;
  &lt;/build&gt;

  &lt;!--&lt;repositories&gt;--&gt;
    &lt;!--&lt;repository&gt;--&gt;
      &lt;!--&lt;id&gt;spring-releases&lt;/id&gt;--&gt;
      &lt;!--&lt;url&gt;http://repo.spring.io/libs-release&lt;/url&gt;--&gt;
    &lt;!--&lt;/repository&gt;--&gt;
  &lt;!--&lt;/repositories&gt;--&gt;

  &lt;!--&lt;pluginRepositories&gt;--&gt;
    &lt;!--&lt;pluginRepository&gt;--&gt;
      &lt;!--&lt;id&gt;spring-releases&lt;/id&gt;--&gt;
      &lt;!--&lt;url&gt;http://repo.spring.io/libs-release&lt;/url&gt;--&gt;
    &lt;!--&lt;/pluginRepository&gt;--&gt;
  &lt;!--&lt;/pluginRepositories&gt;--&gt;


&lt;/project&gt;
</code></pre>
