title: Tomcat Severe listenerStart error
body: <p>I am in the process of migrating my webapp to IntelliJ/Maven/Windows from Netbeans/Linux.  The project didn't want to import so I've had to do it manually one file at a time, which was fine because I wanted to switch it to using Maven for dependencies.</p>
  
  <p>I've tried various solutions posted in the forums but this problem seems different and is probably something really basic missing that I am failing to see.</p>
  
  <p>Any suggestions?</p>
  
  <p>Console output:</p>
  
  <pre><code>cmd /c "C:\Program Files\Apache Software Foundation\Apache Tomcat 6.0.26\bin\catalina.bat" run
  Using CATALINA_BASE:   "C:\Users\zclark.POWERCOM\.IntelliJIdea90\system\tomcat\Unnamed_SpecBuilder2b71ab8ed"
  Using CATALINA_HOME:   "C:\Program Files\Apache Software Foundation\Apache Tomcat 6.0.26"
  Using CATALINA_TMPDIR: "C:\Program Files\Apache Software Foundation\Apache Tomcat 6.0.26\temp"
  Using JRE_HOME:        "C:\Program Files\Java\jdk1.6.0_21"
  Using CLASSPATH:       "C:\Program Files\Apache Software Foundation\Apache Tomcat 6.0.26\bin\bootstrap.jar"
  Connected to the target VM, address: '127.0.0.1:50512', transport: 'socket'
  14/04/2011 2:19:09 PM org.apache.catalina.core.AprLifecycleListener init
  INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.6.0_21\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\csvn\bin\;C:\csvn\Python25\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\TortoiseSVN\bin;c:\program files (x86)\jetbrains\intellij idea 9.0.1\jre\jre\bin;c:\program files (x86)\jetbrains\intellij idea 9.0.1\jre\jre\bin
  14/04/2011 2:19:09 PM org.apache.coyote.http11.Http11Protocol init
  INFO: Initializing Coyote HTTP/1.1 on http-8080
  14/04/2011 2:19:09 PM org.apache.catalina.startup.Catalina load
  INFO: Initialization processed in 677 ms
  14/04/2011 2:19:10 PM org.apache.catalina.core.StandardService start
  INFO: Starting service Catalina
  14/04/2011 2:19:10 PM org.apache.catalina.core.StandardEngine start
  INFO: Starting Servlet Engine: Apache Tomcat/6.0.26
  14/04/2011 2:19:10 PM org.apache.catalina.startup.HostConfig deployDescriptor
  INFO: Deploying configuration descriptor ROOT.xml
  14/04/2011 2:19:10 PM org.apache.catalina.core.StandardContext start
  SEVERE: Error listenerStart
  14/04/2011 2:19:10 PM org.apache.catalina.core.StandardContext start
  SEVERE: Context [] startup failed due to previous errors
  14/04/2011 2:19:10 PM org.apache.catalina.startup.HostConfig deployDirectory
  INFO: Deploying web application directory docs
  14/04/2011 2:19:10 PM org.apache.catalina.startup.HostConfig deployDirectory
  INFO: Deploying web application directory examples
  14/04/2011 2:19:11 PM org.apache.catalina.startup.HostConfig deployDirectory
  INFO: Deploying web application directory host-manager
  14/04/2011 2:19:11 PM org.apache.catalina.startup.HostConfig deployDirectory
  INFO: Deploying web application directory manager
  14/04/2011 2:19:11 PM org.apache.coyote.http11.Http11Protocol start
  INFO: Starting Coyote HTTP/1.1 on http-8080
  14/04/2011 2:19:11 PM org.apache.jk.common.ChannelSocket init
  INFO: JK: ajp13 listening on /0.0.0.0:8009
  14/04/2011 2:19:11 PM org.apache.jk.server.JkMain start
  INFO: Jk running ID=0 time=0/23  config=null
  14/04/2011 2:19:11 PM org.apache.catalina.startup.Catalina start
  INFO: Server startup in 1632 ms
  Connected to server
  </code></pre>
  
  <p>Here is my web.xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"&gt;
      &lt;context-param&gt;
          &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt;
          &lt;param-value&gt;
              /WEB-INF/applicationContext.xml
              /WEB-INF/specbuilder-servlet.xml
              /WEB-INF/specbuilder-service.xml
              /WEB-INF/specbuilder-data.xml
              /WEB-INF/specbuilder-security.xml
          &lt;/param-value&gt;
      &lt;/context-param&gt;
  
      &lt;servlet&gt;
          &lt;servlet-name&gt;specbuilder&lt;/servlet-name&gt;
          &lt;servlet-class&gt;org.springframework.web.servlet.DispatcherServlet&lt;/servlet-class&gt;
          &lt;load-on-startup&gt;2&lt;/load-on-startup&gt;
      &lt;/servlet&gt;
      &lt;servlet-mapping&gt;
          &lt;servlet-name&gt;specbuilder&lt;/servlet-name&gt;
          &lt;url-pattern&gt;*.htm&lt;/url-pattern&gt;
          &lt;url-pattern&gt;*.docx&lt;/url-pattern&gt;
      &lt;/servlet-mapping&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;init-param&gt;
              &lt;param-name&gt;targetClass&lt;/param-name&gt;
              &lt;param-value&gt;org.springframework.security.web.FilterChainProxy&lt;/param-value&gt;
          &lt;/init-param&gt;
      &lt;/filter&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;listener&gt;
          &lt;listener-class&gt;org.springframework.web.context.ContextLoaderListener&lt;/listener-class&gt;
      &lt;/listener&gt;
  
      &lt;session-config&gt;
          &lt;session-timeout&gt;
              30
          &lt;/session-timeout&gt;
      &lt;/session-config&gt;
      &lt;welcome-file-list&gt;
          &lt;welcome-file&gt;redirect.jsp&lt;/welcome-file&gt;
      &lt;/welcome-file-list&gt;
  &lt;/web-app&gt;
  </code></pre>
  
  <p>I just managed to squeeze some more information out of the log via adding a logging.properties file to WEB-INF/classes:</p>
  
  <pre><code>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(WebappClassLoader.java:1516)
      at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1361)
      at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3915)
      at org.apache.catalina.core.StandardContext.start(StandardContext.java:4467)
      at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
      at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
      at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)
      at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:637)
      at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:563)
      at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:498)
      at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)
      at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)
      at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
      at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
      at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
      at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
      at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
      at org.apache.catalina.core.StandardService.start(StandardService.java:519)
      at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
      at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
      at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
  14/04/2011 2:58:05 PM org.apache.catalina.core.StandardContext listenerStart
  SEVERE: Skipped installing application listeners due to previous error(s)
  14/04/2011 2:58:05 PM org.apache.catalina.core.StandardContext start
  SEVERE: Error listenerStart
  </code></pre>
  
  <p>Update: 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;webApp&lt;/groupId&gt;
      &lt;artifactId&gt;webApp&lt;/artifactId&gt;
      &lt;version&gt;1.0&lt;/version&gt;
  
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;log4j&lt;/groupId&gt;
              &lt;artifactId&gt;log4j&lt;/artifactId&gt;
              &lt;version&gt;1.2.15&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;hibernate&lt;/groupId&gt;
              &lt;artifactId&gt;hibernate&lt;/artifactId&gt;
              &lt;version&gt;3.0.3&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;hibernate-annotations&lt;/groupId&gt;
              &lt;artifactId&gt;hibernate-annotations&lt;/artifactId&gt;
              &lt;version&gt;3.3.0.GA&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.7&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;javax.persistence&lt;/groupId&gt;
              &lt;artifactId&gt;persistence-api&lt;/artifactId&gt;
              &lt;version&gt;1.0&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;dependency&gt;
              &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
              &lt;artifactId&gt;servlet-api&lt;/artifactId&gt;
              &lt;version&gt;2.5&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.0.5.RELEASE&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring-beans&lt;/artifactId&gt;
              &lt;version&gt;3.0.5.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.0.5.RELEASE&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring-context-support&lt;/artifactId&gt;
              &lt;version&gt;3.0.5.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.0.5.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.0.5.RELEASE&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring-webmvc&lt;/artifactId&gt;
              &lt;version&gt;3.0.5.RELEASE&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.security&lt;/groupId&gt;
              &lt;artifactId&gt;spring-security-core&lt;/artifactId&gt;
              &lt;version&gt;3.0.5.RELEASE&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;commons-logging&lt;/groupId&gt;
              &lt;artifactId&gt;commons-logging&lt;/artifactId&gt;
              &lt;version&gt;1.1.1&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;commons-dbcp&lt;/groupId&gt;
              &lt;artifactId&gt;commons-dbcp&lt;/artifactId&gt;
              &lt;version&gt;1.2.2&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;aopalliance&lt;/groupId&gt;
              &lt;artifactId&gt;aopalliance&lt;/artifactId&gt;
              &lt;version&gt;1.0&lt;/version&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  
      &lt;repositories&gt;
          &lt;repository&gt;
              &lt;id&gt;JBoss&lt;/id&gt;
              &lt;name&gt;JBoss Repository&lt;/name&gt;
              &lt;layout&gt;default&lt;/layout&gt;
              &lt;url&gt;http://repository.jboss.org/maven2&lt;/url&gt;
          &lt;/repository&gt;
      &lt;/repositories&gt;
  
  &lt;/project&gt;
  </code></pre>