Announcement Announcement Module
Collapse
No announcement yet.
Spring app deployment problem (SEVERE: Error listenerStart) Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    Lower the logging level and test again to see the raised exception(s).

    Comment


    • #3
      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.

      Comment


      • #4
        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

        Comment


        • #5
          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.

          Comment


          • #6
            Thanks for your 2 cents, it has helped me.

            Comment


            • #7
              that's correct. it helped me!
              thanks,

              Comment

              Working...
              X