WAR will not be used for Tomcat 7.0.19

I have a WAR that Tomcat will not deploy, and although it usually gives me a reason or some guidance as to why it will not deploy the application, the output of the Tomcat catalina log simply indicates:

SEVERE: context start [/ appmon-qa] failed due to previous errors

Here web.xml:

<?xml version="1.0" encoding="UTF-8"?>
<web-app
    xmlns="http://java.sun.com/xml/ns/j2ee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
    version="2.4">

    <!-- The display name of this web application -->
    <display-name>AppMonitor</display-name>

    <listener>
        <listener-class>
            com.me.myorg.appmon.AppMonitor
        </listener-class>
    </listener>
</web-app>

And important stuff inside this class AppMonitor:

public class AppMonitor implements ServletContextListener {
    @Override
    public void contextDestroyed(ServletContextEvent event) {
        return;
    }

    @Override
    public void contextInitialized(ServletContextEvent event) {
        try {
            // Guts of my monitor app
        } catch(Exception exc) {
            System.out.println("Something bad happened!\n" + exc.getMessage());
        }
    }
}

And a remarkably vague / unregistered log output:

INFO: Deploying web application archive appmon-qa.war
Jun 8, 2012 9:45:30 AM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error listenerStart
Jun 8, 2012 9:45:31 AM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/appmon-qa] startup failed due to previous errors
Jun 8, 2012 9:45:31 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory docs
Jun 8, 2012 9:45:31 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory examples
Jun 8, 2012 9:45:32 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory host-manager
Jun 8, 2012 9:45:32 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory manager
Jun 8, 2012 9:45:32 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory ROOT
Jun 8, 2012 9:45:32 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Jun 8, 2012 9:45:32 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Jun 8, 2012 9:45:32 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-nio-8010"]
Jun 8, 2012 9:45:32 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 2875 ms

I did not deploy this WAR and deploy another, which I know works fine, and Tomcat 7.0.19 started it without any problems, so I know this is not a Tomcat / configuration problem. This is clearly something wrong with my WAR. The directory structure is as follows:

appmon-qa.war/
    META-INF/
        MANIFEST.MF
    WEB-INF/
        classes/
            All of my binaries
        lib/
            All JAR dependencies
        web.xml

- (-) web.xml, Tomcat . web.xml/ServletContextListener , - contextInitialized, catch , .

, ? !

+5
1

.

@Override
public void contextInitialized(ServletContextEvent servletContextEvent) {
        super.contextInitialized(servletContextEvent);

....   }

   @Override
    public void contextDestroyed(ServletContextEvent servletContextEvent) {
        super.contextDestroyed(servletContextEvent);
    }

tomcat (, log4j) http://tomcat.apache.org/tomcat-7.0-doc/logging.html

+1

All Articles