title: Spring SEVERE Error : Listener Start?
body: <p>I get this error, using Apache tomcat 6.0.51. I use spring+ hibernate+ rest.
  I can't find reason. What can I do to fix it? 
  I try to many way but no solution..</p>
  
  <pre><code> Connected to server
      [2017-04-06 03:05:57,259] Artifact toyotaproject:war exploded: Artifact is being deployed, please wait...
      Nis 06, 2017 3:05:57 AM org.apache.catalina.core.StandardContext start
      SEVERE: Error listenerStart
      Nis 06, 2017 3:05:57 AM org.apache.catalina.core.StandardContext start
      SEVERE: Context [] startup failed due to previous errors
      [2017-04-06 03:05:57,665] Artifact toyotaproject:war exploded: Error during artifact deployment. See server log for details.
      Nis 06, 2017 3:06:07 AM org.apache.catalina.startup.HostConfig deployDirectory
      INFO: Deploying web application directory manager
      F:\apache-tomcat-6.0.51\bin\catalina.bat stop
      Using CATALINA_BASE:   "C:\Users\yusufaslan\.IntelliJIdea2016.3\system\tomcat\Unnamed_toyotaproject_2"
      Using CATALINA_HOME:   "F:\apache-tomcat-6.0.51"
      Using CATALINA_TMPDIR: "F:\apache-tomcat-6.0.51\temp"
      Using JRE_HOME:        "C:\Program Files\Java\jdk1.8.0_101"
      Using CLASSPATH:       "F:\apache-tomcat-6.0.51\bin\bootstrap.jar"
      Nis 06, 2017 3:07:13 AM org.apache.coyote.http11.Http11AprProtocol pause
      INFO: Pausing Coyote HTTP/1.1 on http-8080
      Nis 06, 2017 3:07:13 AM org.apache.coyote.ajp.AjpAprProtocol pause
      INFO: Pausing Coyote AJP/1.3 on ajp-8009
      Nis 06, 2017 3:07:14 AM org.apache.catalina.core.StandardService stop
      INFO: Stopping service Catalina
      Nis 06, 2017 3:07:14 AM org.apache.coyote.http11.Http11AprProtocol destroy
      INFO: Stopping Coyote HTTP/1.1 on http-8080
      Nis 06, 2017 3:07:14 AM org.apache.coyote.ajp.AjpAprProtocol destroy
      INFO: Stopping Coyote AJP/1.3 on ajp-8009
      Disconnected from server
  </code></pre>
  
  <p>this is my pom.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &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/xsd/maven-4.0.0.xsd"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
      &lt;groupId&gt;toyotaproject&lt;/groupId&gt;
      &lt;artifactId&gt;toyotaproject&lt;/artifactId&gt;
      &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
      &lt;build&gt;
  
          &lt;plugins&gt;
  
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
                  &lt;configuration&gt;
                      &lt;source&gt;1.6&lt;/source&gt;
                      &lt;target&gt;1.6&lt;/target&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
      &lt;dependencies&gt;
          &lt;!-- CXF Dependencies --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;junit&lt;/groupId&gt;
              &lt;artifactId&gt;junit&lt;/artifactId&gt;
              &lt;version&gt;3.8.1&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
              &lt;artifactId&gt;hibernate-entitymanager&lt;/artifactId&gt;
              &lt;version&gt;4.2.0.Final&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;version&gt;4.2.0.Final&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring-core&lt;/artifactId&gt;
              &lt;version&gt;3.2.18.RELEASE&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring-context&lt;/artifactId&gt;
              &lt;version&gt;3.2.18.RELEASE&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring-orm&lt;/artifactId&gt;
              &lt;version&gt;3.2.18.RELEASE&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring-web&lt;/artifactId&gt;
              &lt;version&gt;3.2.18.RELEASE&lt;/version&gt;
          &lt;/dependency&gt;
                  &lt;!-- Spring Security --&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.security&lt;/groupId&gt;
              &lt;artifactId&gt;spring-security-web&lt;/artifactId&gt;
              &lt;version&gt;3.2.3.RELEASE&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.security&lt;/groupId&gt;
              &lt;artifactId&gt;spring-security-config&lt;/artifactId&gt;
              &lt;version&gt;3.2.3.RELEASE&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;!-- Spring Security --&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.cxf&lt;/groupId&gt;
              &lt;artifactId&gt;cxf-rt-transports-http&lt;/artifactId&gt;
              &lt;version&gt;3.0.4&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.cxf&lt;/groupId&gt;
              &lt;artifactId&gt;cxf-rt-transports-http-jetty&lt;/artifactId&gt;
              &lt;version&gt;3.0.4&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.cxf&lt;/groupId&gt;
              &lt;artifactId&gt;cxf-rt-frontend-jaxrs&lt;/artifactId&gt;
              &lt;version&gt;3.0.4&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;javax.ws.rs&lt;/groupId&gt;
              &lt;artifactId&gt;jsr311-api&lt;/artifactId&gt;
              &lt;version&gt;1.1.1&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.codehaus.jackson&lt;/groupId&gt;
              &lt;artifactId&gt;jackson-mapper-asl&lt;/artifactId&gt;
              &lt;version&gt;1.7.1&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.codehaus.jackson&lt;/groupId&gt;
              &lt;artifactId&gt;jackson-jaxrs&lt;/artifactId&gt;
              &lt;version&gt;1.7.1&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.codehaus.jackson&lt;/groupId&gt;
              &lt;artifactId&gt;jackson-xc&lt;/artifactId&gt;
              &lt;version&gt;1.7.1&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
              &lt;artifactId&gt;javax.servlet-api&lt;/artifactId&gt;
              &lt;version&gt;3.0.1&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.poi&lt;/groupId&gt;
              &lt;artifactId&gt;poi&lt;/artifactId&gt;
              &lt;version&gt;3.8&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.poi&lt;/groupId&gt;
              &lt;artifactId&gt;poi-ooxml&lt;/artifactId&gt;
              &lt;version&gt;3.9&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.json&lt;/groupId&gt;
              &lt;artifactId&gt;json&lt;/artifactId&gt;
              &lt;version&gt;20090211&lt;/version&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  
  &lt;/project&gt;
  </code></pre>
  
  <p>In server log:</p>
  
  <pre><code>Nis 06, 2017 3:05:57 AM org.apache.catalina.core.StandardContext listenerStart SEVERE: Error configuring application listener of class org.springframework.web.context.ContextLoaderListener java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
  at org.apache.catalina.loader.WebappClassLoader.loadClass(Webap‌​pClassLoader.java:16‌​98)  
  at org.apache.catalina.loader.WebappClassLoader.loadClass(Webap‌​pClassLoader.java:15‌​44)
  at org.apache.catalina.core.StandardContext.listenerStart(Stand‌​ardContext.java:4219‌​)' 
  </code></pre>
  
  <p>why i get this error ? this is about what ?
  I use Intellij Idea and this is....                                                             </p>
  
  <pre><code>    web.xml &lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
           version="3.1"&gt;
  
      &lt;context-param&gt;
          &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt;
          &lt;param-value&gt;src/main/web/applicationContext.xml,src/main/web/Spring-Security.xml&lt;/param-value&gt;
      &lt;/context-param&gt;
  
      &lt;listener&gt;
          &lt;listener-class&gt;org.springframework.web.context.ContextLoaderListener&lt;/listener-class&gt;
      &lt;/listener&gt;
  
      &lt;!-- Spring Security Start --&gt;
      &lt;listener&gt;
          &lt;listener-class&gt;
              org.springframework.web.context.request.RequestContextListener
          &lt;/listener-class&gt;
      &lt;/listener&gt;
  
      &lt;filter&gt;
          &lt;filter-name&gt;springSecurityFilterChain&lt;/filter-name&gt;
          &lt;filter-class&gt;
              org.springframework.web.filter.DelegatingFilterProxy
          &lt;/filter-class&gt;
      &lt;/filter&gt;
      &lt;!-- Projenin ana url'inden itibaren spring security aktif ediliyor --&gt;
      &lt;filter-mapping&gt;
          &lt;filter-name&gt;springSecurityFilterChain&lt;/filter-name&gt;
          &lt;url-pattern&gt;/*&lt;/url-pattern&gt;
      &lt;/filter-mapping&gt;
      &lt;!-- Spring Security End --&gt;
      &lt;servlet&gt;
          &lt;servlet-name&gt;CXFServlet&lt;/servlet-name&gt;
          &lt;servlet-class&gt;org.apache.cxf.transport.servlet.CXFServlet&lt;/servlet-class&gt;
          &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
      &lt;/servlet&gt;
  
      &lt;servlet-mapping&gt;
          &lt;servlet-name&gt;CXFServlet&lt;/servlet-name&gt;
          &lt;url-pattern&gt;/rest/*&lt;/url-pattern&gt;
      &lt;/servlet-mapping&gt;
  
  
  
  &lt;/web-app&gt;
  </code></pre>
  
  <p>this is my applicatiınContext.xml </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;beans xmlns="http://www.springframework.org/schema/beans"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns:context="http://www.springframework.org/schema/context"
         xmlns:tx="http://www.springframework.org/schema/tx"
         xmlns:jaxrs="http://cxf.apache.org/jaxrs"
         xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
              http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd
              http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
               http://cxf.apache.org/jaxrs http://cxf.apache.org/schemas/jaxrs.xsd"&gt;
  
  
      &lt;context:annotation-config /&gt;
      &lt;context:component-scan base-package="com.toyotaproject" /&gt;
      &lt;tx:annotation-driven /&gt;
      &lt;bean id="dataSource"
            class="org.springframework.jdbc.datasource.DriverManagerDataSource"&gt;
          &lt;property name="driverClassName" value="com.mysql.jdbc.Driver" /&gt;
          &lt;property name="url" value="jdbc:mysql://localhost:3307/toyotadb" /&gt;
          &lt;property name="username" value="root" /&gt;
          &lt;property name="password" value="12345" /&gt;
      &lt;/bean&gt;
  
      &lt;bean id="entityManagerFactory"
            class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"&gt;
          &lt;property name="dataSource" ref="dataSource" /&gt;
          &lt;property name="persistenceUnitName" value="SpringJPA_PU"/&gt;
      &lt;/bean&gt;
  
      &lt;bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager"&gt;
          &lt;property name="entityManagerFactory" ref="entityManagerFactory" /&gt;
      &lt;/bean&gt;
      &lt;bean id='jacksonProvider' class='org.codehaus.jackson.jaxrs.JacksonJaxbJsonProvider' /&gt;
  
      &lt;bean id="jpaAdapter"
            class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter"&gt;
          &lt;property name="database" value="MYSQL" /&gt;
          &lt;property name="showSql" value="true" /&gt;
          &lt;property name="generateDdl" value="true" /&gt;
      &lt;/bean&gt;
      &lt;jaxrs:server id="restContainer" address="/" &gt;
          &lt;jaxrs:serviceBeans&gt;
              &lt;ref bean="customerWebService"/&gt;
              &lt;ref bean="reservationWebService"/&gt;
              &lt;ref bean="tripWebService"/&gt;
          &lt;/jaxrs:serviceBeans&gt;
          &lt;jaxrs:providers&gt;
              &lt;ref bean='jacksonProvider' /&gt;
          &lt;/jaxrs:providers&gt;
      &lt;/jaxrs:server&gt;
  &lt;/beans&gt;
  </code></pre>