wood burning stoves 2.0*
The moose likes Tomcat and the fly likes Tomcat spits out too many and too big exceptions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat spits out too many and too big exceptions" Watch "Tomcat spits out too many and too big exceptions" New topic
Author

Tomcat spits out too many and too big exceptions

Axel Brown
Greenhorn

Joined: Feb 12, 2008
Posts: 25
I don't know how to explain this correctly, but when any Java error occurs Tomcat outputs so huge (very long) stack trace of each error so my logs (which are in rotation of 10 files 10MB each) get filled out in seconds!

Happens usually when there is a DB connection issue and some other cases.

On my old server the stack trace of each error is kind of short and errors has only one or two outputs in log, but on new server each error has like 7-9 pages long stack trace and gets replicated many times.

Any idea?

Thanks!
Joachim Rohde
Ranch Hand

Joined: Nov 27, 2006
Posts: 423

Hm... just a random guess:
Are you using Log4j (or is any framework that you are using, using Log4j)? I just remember that I setted the logging-level of a spring-application to 'debug' which generated tons of logging-output.
Axel Brown
Greenhorn

Joined: Feb 12, 2008
Posts: 25
Originally posted by Joachim Rohde:
Hm... just a random guess:
Are you using Log4j (or is any framework that you are using, using Log4j)? I just remember that I setted the logging-level of a spring-application to 'debug' which generated tons of logging-output.


Log4j, but all settings are with ERROR level only.
When I see the exception in the log it's literally 7-9 pages long - a single exeption...
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

I don't think this has anything to do with Tomcat.
Have you verified that the same error is not being thrown repeatedly?


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Axel Brown
Greenhorn

Joined: Feb 12, 2008
Posts: 25
Originally posted by Ben Souther:
I don't think this has anything to do with Tomcat.
Have you verified that the same error is not being thrown repeatedly?


It's the same error just many many times plus its trace is sooo long...
Do you know what it might be?
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

It's impossible to say what it could be without seeing the exceptions and the code that's causing them to be thrown.

Rather than trying to manipulate Tomcat into reporting less, I think it would be a better idea to track down what ever is throwing exceptions in your code and get those things fixed.
Axel Brown
Greenhorn

Joined: Feb 12, 2008
Posts: 25
Originally posted by Ben Souther:
It's impossible to say what it could be without seeing the exceptions and the code that's causing them to be thrown.

Rather than trying to manipulate Tomcat into reporting less, I think it would be a better idea to track down what ever is throwing exceptions in your code and get those things fixed.


I know for sure when I shut down DB and my app is trying to connect - I get 10 tomcats logs each 10MB populated in less than a few seconds...
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Are using Tomcat's connection pooling or are you connecting yourself?

If your app (or the connection pool) is designed to continuously attempt to connect to a non-running database, this should be the expected behavior.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Tomcat spits out too many and too big exceptions
 
Similar Threads
Tomcat Hangs during startup
Is tomcat an Application Server?
Getting Jakarta Tomcat to run on Port 80
Cancelling a file download - "java.lang.IllegalStateException: getOutputStream() ..."
Tomcat not generating default Log file