File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Tomcat and the fly likes Tomcat hangs when app start-up fails Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat hangs when app start-up fails" Watch "Tomcat hangs when app start-up fails" New topic

Tomcat hangs when app start-up fails

William Stafford
Ranch Hand

Joined: Dec 13, 2004
Posts: 109
We are deploying a newer version of a web app to run in the same Tomcat instance (1.4.31) as the existing version. On our development servers, winXP, if the new version encounters a startup problem the production version will start, the new version will not start and Tomcat will run as expected.

On the production server, which is linux, Tomcat seems to 'hang' on the first failure encountered when starting the new app and nothing further happens. Tomcat has to be killed when it enters this state because the
management console is also unresponsive. In the application log the last log entry is the exception logged from the new app and there is no further logging. Since we have been doing some database changes the usual error that causes this is Jakarta DBCP connection failure but we have also seen it for a missing class file. So I don't think the error is at the root of the problem but at this point I can't rule out anything.

We don't manage the server that this is happening on so we don't have the usual diagnostic capabilities, all we have are the logs. Since Tomcat is completely unresponsive when this happens there is no way to get a thread trace or stack dump. So I'm looking for any ideas on what may be going on or suggestion as to what to try to get more information about the problem.

We are completely stumped by this, any ideas or suggestions would be appreciated.

Ben Souther

Joined: Dec 11, 2004
Posts: 13410

Are you seeing any exceptions in the logs?

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
William Stafford
Ranch Hand

Joined: Dec 13, 2004
Posts: 109

We see do an exception being logged. It is always the last log entry. In each case the situation causing the exception was either fixed or out of our control. In the case where the exception was fixed the start-up sequence would no longer stop at that point but if there was another exception the start-up would stop and Tomcat would hang. So the exception condition itself does not seem to be the problem.

I agree. Here's the link:
subject: Tomcat hangs when app start-up fails
It's not a secret anymore!