Note that there are some explanatory texts on larger screens.

plurals
  1. POError Starting Spring ContextLoaderListener
    primarykey
    data
    text
    <p>I am developing a simple web application using Spring framework 3.1.3.RELEASE &amp; MAVEN. My application would not startup unless I take out the listener from web.xml</p> <pre><code>&lt;listener&gt; &lt;listener-class&gt;org.springframework.web.context.ContextLoaderListener&lt;/listener-class&gt; &lt;/listener&gt; </code></pre> <p>Tomcat reports the following error:</p> <pre><code>INFO: Deploying web application archive sampleapp.war 11/12/2012 3:45:03 PM org.apache.catalina.core.StandardContext start SEVERE: Error listenerStart 11/12/2012 3:45:03 PM org.apache.catalina.core.StandardContext start SEVERE: Context [/sampleapp] startup failed due to previous errors </code></pre> <p>My WEB.XML looks as follows:</p> <pre><code>&lt;web-app 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" version="3.0"&gt; &lt;display-name&gt;EMS&lt;/display-name&gt; &lt;listener&gt; &lt;listener-class&gt;org.springframework.web.context.ContextLoaderListener &lt;/listener-class&gt; &lt;/listener&gt; &lt;context-param&gt; &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt; &lt;param-value&gt;/WEB-INF/spring/*-context.xml&lt;/param-value&gt; &lt;/context-param&gt; &lt;welcome-file-list&gt; &lt;welcome-file&gt;index.html&lt;/welcome-file&gt; &lt;/welcome-file-list&gt; &lt;/web-app&gt; </code></pre> <p>Application Context File is empty at this point:</p> <pre><code>&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" 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"&gt; &lt;/beans&gt; </code></pre> <p>Below is the JAR files under WEB-INF/lib</p> <pre><code>eclipselink-2.4.0.jar javax.persistence-2.0.0.jar mysql-connector-java-5.1.21.jar spring-context-3.1.3.RELEASE.jar spring-core-3.1.3.RELEASE.jar spring-web-3.1.3.RELEASE.jar spring-webmvc-3.1.3.RELEASE.jar </code></pre> <p>Below is the files under WEB-INF</p> <pre><code>application.properties spring-context.xml web.xml </code></pre> <p>I understand that: </p> <ul> <li>ContextLoaderListener is available in spring-web-3.1.3.RELEASE.jar</li> <li>If the JAR is available in WEB-INF/lib then it should be picked by TOMCAT.</li> </ul> <p>What am I doing wrong?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload