Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8057347
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T09:00:09+00:00 2026-06-05T09:00:09+00:00

I have a WAR that Tomcat will not deploy, and whereas it normally gives

  • 0

I have a WAR that Tomcat will not deploy, and whereas it normally gives me the reason or some indication as to why it won’t deploy the app, Tomcat’s catalina log output simply states:

SEVERE: Context [/appmon-qa] startup failed due to previous errors

Here’s is the 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 the important stuff inside that AppMonitor class:

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 the remarkably vague/undescriptive 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 undeployed this WAR and deployed another one that I know works fine and Tomcat 7.0.19 launched it without any problems, so I know its not a Tomcat/configuration issue. This is clearly something wrong with my WAR. 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

If there was something wrong with my (super-simple) web.xml, Tomcat should be complaining in the log output. If my web.xml/ServletContextListener was fine, but something was throwing an exception inside my contextInitialized method, the catch block would be printing the message to the console – but that’s not happening.

Any ideas as to what could be the underlying problem or what options I have to start diagnosing this? Thanks in advance!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T09:00:12+00:00Added an answer on June 5, 2026 at 9:00 am

    You should call the super class in your methods.

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

    ….
    }

    and

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

    As an extra you could make sure to increase the log level on your tomcat server (maybe integrate log4j)
    http://tomcat.apache.org/tomcat-7.0-doc/logging.html

    Mihai

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a web application (WAR) that I want to deploy in Tomcat 5.
I have a simple Sinatra app that I will be hosting in tomcat as
I have a packaged app.war file that I am trying to copy to the
I have a webapp that is deployed as a WAR file to a Tomcat
I have an external tool that is a tomcat webservice (distributed as a .war)
I have multiple (8) WAR files and 1 EAR file that I want to
I have a .war project in Eclipse. It is probably not relevant but I
I have a number of war projects deployed in a single tomcat 5.5 container.
I have some resource files that are in the classpath of my web application
I'm trying to configure Hudson so that I will be able to automatically deploy

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.