Results 1 to 7 of 7

Thread: Spring app deployment problem (SEVERE: Error listenerStart)

  1. #1
    Join Date
    Jan 2007
    Posts
    107

    Default Spring app deployment problem (SEVERE: Error listenerStart)

    Hi,

    When I deploy my spring app into tomcat I get this:

    Code:
    Jun 8, 2007 10:09:23 AM org.apache.catalina.startup.HostConfig deployWAR
    INFO: Deploying web application archive DCConsumer.war
    Jun 8, 2007 10:09:23 AM org.apache.catalina.core.StandardContext start
    SEVERE: Error listenerStart
    Jun 8, 2007 10:09:23 AM org.apache.catalina.core.StandardContext start
    SEVERE: Context [/DCConsumer] startup failed due to previous errors
    My app tree looks like this (omitting class file names):

    Code:
    /opt/tomcat/webapps/DCConsumer
    |-- META-INF
    |   `-- MANIFEST.MF
    |-- WEB-INF
    |   `-- web.xml
    |-- applicationContext.xml
    |-- classes
    |   |-- com
    |   |   `-- foo
    |   |       `-- dc
    |   |           |-- consumer
    |   |           |   |-- cleaner
    |   |           |   |-- factory
    |   |           |   |-- formatter
    |   |           |   |-- parser
    |   |           |   |-- renderer
    |   |           |   `-- tags
    |   |           |       `-- templates
    |   |           `-- jms
    |   |-- log4j.properties
    |   `-- tidy.properties
    |-- lib
    |   |-- DCDb-local-012.jar
    |   |-- apache-activemq-4.1.1.jar
    |   |-- c3p0-0.9.1.2.jar
    |   |-- cglib-nodep-2.1_3.jar
    |   |-- commons-collections-3.2.jar
    |   |-- commons-io-1.3.1.jar
    |   |-- commons-lang-2.3.jar
    |   |-- commons-logging-1.1.jar
    |   |-- commons-pool-1.3.jar
    |   |-- dom4j-1.6.1.jar
    |   |-- ehcache-1.2.4.jar
    |   |-- hibernate-3.2.4.sp1.jar
    |   |-- itext-2.0.4.jar
    |   |-- jms.jar
    |   |-- jta.jar
    |   |-- jtidy-8.0-20060801.131059-3.jar
    |   |-- log4j-1.2.14.jar
    |   |-- mysql-connector-java-5.0.6-bin.jar
    |   |-- spring-2.0.5.jar
    |   |-- spring-mock-2.0.5.jar
    |   `-- xpp3-1.1.4c.jar
    `-- web.xml
    There is no further log output.

    My web.xml is:

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    
    <web-app
        version="2.5"
        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_2_5.xsd">
    
        <display-name>DC Consumer</display-name>
    
        <context-param>
            <param-name>contextConfigLocation</param-name>
            <param-value>/WEB-INF/applicationContext.xml</param-value>
        </context-param>
    
        <listener>
            <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
        </listener>
    
        <listener>
            <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
        </listener>
    
    </web-app>
    Any ideas? Banging my head against the wall. I can post further files if need be.

  2. #2
    Join Date
    Mar 2007
    Posts
    515

    Default

    Lower the logging level and test again to see the raised exception(s).

  3. #3
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,624

    Default

    Looking at your directory structure your applicationContext.xml is not in your WEB-INF directory but at the root of your WAR. Copy it to the WEB-INF dir.
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

  4. #4
    Join Date
    Aug 2006
    Location
    Now Germany, previously Ukraine
    Posts
    1,546

    Default

    Quote Originally Posted by mdeinum View Post
    Looking at your directory structure your applicationContext.xml is not in your WEB-INF directory but at the root of your WAR. Copy it to the WEB-INF dir.


    And do the same for classes and lib directories - they (with all their contents) should reside under WEB-INF

  5. #5
    Join Date
    Nov 2006
    Location
    Boston, MA
    Posts
    303

    Default

    I know this thread is 6 months old, but I thought I'd add my $.02 in case someone else is googling for an answer to the similar problem (I see many people hit the wall with this one.)

    In most cases, the described problem is caused by an error inside the application contex file (the applicationContext.xml file, in the example above.) For instance, a bean definition contains a property that does not map to a setter on the actual class, a "property-placeholder" points to a location that is not found, or, the XML itself is invalid, etc. Unless you configure Tomcat logging to output Spring log statements, you won't see the details.

  6. #6
    Join Date
    Aug 2009
    Posts
    1

    Default

    Thanks for your 2 cents, it has helped me.

  7. #7

    Default

    that's correct. it helped me!
    thanks,

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •