title: Configuration Error of Class Application Listener
body: <p>I am running Tomcat 7.0 and INTELLIJ on windows 64 bit, when i run the application i got a problem of application listener(org.springframework web.context.ContextLoaderListener.
   Here is part of the files:</p>
  
  <p><strong>web.xml:</strong></p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&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;display-name&gt;Apache-cxf&lt;/display-name&gt;
  
      &lt;context-param&gt;
          &lt;param-name&gt;isRemote&lt;/param-name&gt;
          &lt;param-value&gt;false&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;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;/servlet&gt;
  
      &lt;servlet-mapping&gt;
          &lt;servlet-name&gt;CXFServlet&lt;/servlet-name&gt;
          &lt;url-pattern&gt;/services/*&lt;/url-pattern&gt;
      &lt;/servlet-mapping&gt;
  
  
      &lt;!-- currently the W3C havent settled on a media type for WSDL;
      http://www.w3.org/TR/2003/WD-wsdl12-20030303/#ietf-draft
      for now we go with the basic 'it's XML' response --&gt;
      &lt;mime-mapping&gt;
          &lt;extension&gt;wsdl&lt;/extension&gt;
          &lt;mime-type&gt;text/xml&lt;/mime-type&gt;
      &lt;/mime-mapping&gt;
  
  
      &lt;mime-mapping&gt;
          &lt;extension&gt;xsd&lt;/extension&gt;
          &lt;mime-type&gt;text/xml&lt;/mime-type&gt;
      &lt;/mime-mapping&gt;
  
      &lt;welcome-file-list id="WelcomeFileList"&gt;
          &lt;welcome-file&gt;index.jsp&lt;/welcome-file&gt;
          &lt;welcome-file&gt;index.html&lt;/welcome-file&gt;
      &lt;/welcome-file-list&gt;
  
  &lt;/web-app&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p><strong>Tomcat log:</strong></p>
  
  <pre><code>    org.apache.catalina.core.StandardContext listenerStart
  GRAVE: Erreur lors de la configuration de la classe d'écoute de l'application (application listener) org.springframework.web.context.ContextLoaderListener
  java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
      at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1702)
      at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1547)
      at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:532)
      at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:514)
      at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:142)
      at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4876)
      at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5455)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
      at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
      at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
      at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:634)
      at org.apache.catalina.startup.HostConfig.manageApp(HostConfig.java:1741)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301)
      at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
      at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
      at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:620)
      at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:567)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301)
      at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
      at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
      at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1468)
      at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:76)
      at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1309)
      at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1401)
      at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:829)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:324)
      at sun.rmi.transport.Transport$1.run(Transport.java:200)
      at sun.rmi.transport.Transport$1.run(Transport.java:197)
      at java.security.AccessController.doPrivileged(Native Method)
      at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
      at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568)
      at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:826)
      at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:683)
      at java.security.AccessController.doPrivileged(Native Method)
      at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:682)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at java.lang.Thread.run(Thread.java:745)
  
  août 02, 2017 12:38:37 PM org.apache.catalina.core.StandardContext listenerStart
  GRAVE: L''installation des écouteurs (listeners) de l''application a été sautée suite aux erreurs précédentes
  </code></pre>
  
  <p><strong>Server log:</strong></p>
  
  <pre><code>    Connected to server
  [2017-08-02 12:29:36,505] Artifact webservice-server.jar.src:war exploded: Artifact is being deployed, please wait...
  août 02, 2017 12:29:36 PM org.apache.catalina.deploy.WebXml setVersion
  AVERTISSEMENT: Unknown version string [3.1]. Default version will be used.?
  août 02, 2017 12:29:39 PM org.apache.catalina.core.StandardContext startInternal
  GRAVE: Error listenerStart
  août 02, 2017 12:29:39 PM org.apache.catalina.core.StandardContext startInternal
  GRAVE: Erreur de démarrage du contexte [] suite aux erreurs précédentes
  [2017-08-02 12:29:39,611] Artifact webservice-server.jar.src:war exploded: Error during artifact deployment. See server log for details.
  août 02, 2017 12:29:46 PM org.apache.catalina.startup.HostConfig deployDirectory
  INFOS: Déploiement du répertoire D:\tomcat7\apache-tomcat-7.0.50\webapps\manager de l'application web
  [2017-08-02 12:38:34,539] Artifact webservice-server.jar.src:war exploded: Artifact is being deployed, please wait...
  août 02, 2017 12:38:37 PM org.apache.catalina.core.StandardContext startInternal
  GRAVE: Error listenerStart
  août 02, 2017 12:38:37 PM org.apache.catalina.core.StandardContext startInternal
  GRAVE: Erreur de démarrage du contexte [] suite aux erreurs précédentes
  [2017-08-02 12:38:37,918] Artifact webservice-server.jar.src:war exploded: Error during artifact deployment. See server log for details.
  </code></pre>
  
  <p>Does anyone have any suggestions as to how I can debug this further? Any help would be most appreciated.</p>
  
  <p><strong>spring-config:</strong></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"
         xsi:schemaLocation="http://www.springframework.org/schema/beans 
     http://www.springframework.org/schema/beans/spring-beans.xsd
     http://www.springframework.org/schema/context "&gt;
  
      &lt;bean id="greetingService"
            class="com.springRemotingRmiServer.GreetingServiceImpl"/&gt;
  
      &lt;bean class="org.springframework.remoting.rmi.RmiServiceExporter"&gt;
          &lt;property name="serviceName" value="greetingService"/&gt;
          &lt;property name="service" ref="greetingService"/&gt;
          &lt;property name="serviceInterface" 
                    value="com.springRemotingRmiServer.GreetingService"/&gt;
          &lt;property name="registryPort" value="1099"/&gt;
      &lt;/bean&gt;
  
  &lt;/beans&gt;
  </code></pre>