MyThinkPond

On Java, Python, Groovy, Grails, Spring, Node.js, Linux, Arduino, ARM, Embedded Devices & Web

Tomcat 6+: Infamous “SEVERE: Error listenerStart” message – How-To debug this error?

Posted by Venkatt Guhesan on July 1, 2011

I’m sure if you have been developing with Java and Tomcat for sometime, you are likely to run into the infamous debug error.

SEVERE: Error listenerStart

You will most likely start Googling it trying to find out what the heck is going on. And in trying to see the extended logging on what that “listenerStart” error means. After some lucky searches, you will see links asking you to drop a “log4j.properties” file under ‘/WEB-INF/classes’ directory inside your WAR to help debug which one of the listeners is throwing this crazy error.

Well, this advise will most likely work for you if you are developing under an earlier version of Tomcat. If you are using versions 6.0 or above then continue to read on…

In Tomcat 6 or above, the default logger is the”java.util.logging” logger and not Log4J. So if you are trying to add a “log4j.properties” file – this will NOT work. The Java utils logger looks for a file called “logging.properties” as stated here:
http://tomcat.apache.org/tomcat-6.0-doc/logging.html

So to get to the debugging details create a “logging.properties” file under your”/WEB-INF/classes” folder of your WAR and you’re all set.

And now when you restart your Tomcat, you will see all of your debugging in it’s full glory!!!

Sample logging.properties file:

org.apache.catalina.core.ContainerBase.[Catalina].level = INFO
org.apache.catalina.core.ContainerBase.[Catalina].handlers = java.util.logging.ConsoleHandler

and you will most likely see a “class-not-found” exception. ;-)

Look at the bright side, you’re now one step closer to the solution.

Happy coding!

About these ads

22 Responses to “Tomcat 6+: Infamous “SEVERE: Error listenerStart” message – How-To debug this error?”

  1. […] WordPress.com « Tomcat 6+: Infamous “SEVERE: Error listenerStart” message – How-To debug this&nbsp… […]

  2. Mysk said

    Thanks Venkat..

  3. Dev said

    thanks it helps

  4. Fred said

    thanks helped me a lot !

  5. Absolute champ! It was a typo in a class name and it was so easy to solve once I actually knew what the problem was. Cheers.

  6. Angelo said

    It’s awesome for me to have a site, which is helpful designed for my experience. thanks admin

  7. Wonderful post! We will be linking to this particularly great post on our site.
    Keep up the good writing.

  8. Lynn said

    Hi there! I know this is kind of off topic but I was wondering which
    blog platform are you using for this site? I’m getting tired of WordPress because I’ve had issues with hackers and I’m looking at alternatives for another platform. I would be awesome if you could point me in the direction of a good platform.

  9. bilal said

    OMG never thought I’d be so happy to see error messages!

  10. Pri said

    Thanks Venkat, this post was really a big help for me.

  11. Mikhail said

    Helped a lot.
    Thank you very much!

  12. […] you need to use the CLI. The logging was of fairly limited use, and at the end of it I ran into the Tomcat 6+: Infamous “SEVERE: Error listenerStart” message halfway through the application bootstrap. The support forums eventually led me to the way […]

  13. Ger said

    Reblogged this on La búsqueda del bíjaro and commented:
    So with Tomcat +6.0 a logging.properties is used to manage the log files.
    Good to know! Thanks Venkatt for the data, it helped me find the issue.

  14. Johne455 said

    Rattling nice pattern and good subject matter, hardly anything else we need D. ddbagfeeddac

  15. geek said

    I will never thank you enough!!!!!!

  16. JB said

    thank you!!

  17. GS said

    Incredibly helpful! I thought it sounded too easy, but it indeed pointed me to my problem. Thank you so much for posting this!

  18. Daniel said

    Thank you for your help. Now Tomcat outputs a proper stack trace, and not an overly general error message.

  19. computer said

    This is very fascinating, You are an overly professional blogger.
    I’ve joined your rss feed and look ahead to in the hunt for more of your fantastic post.
    Additionally, I’ve shared your site in my social networks

  20. Ajit said

    So nice..now i am able to see the exact problem. It is just some JDK compatiblity problem for Some Clasess.
    like ..Unsupported major.minor version 51.0 (unable to load class com.mserve.webapp.listener.UserCounterListener)

    Thank u …..

  21. Ricardo said

    Hello,

    I am a beginner with the commandline and tomcat and all, so this might sound like a stupid question, but…
    I have created the logging.properties in /WEB-INF/classes as instructed and restarted tomcat. Where can I see the result of the debugging? Which log should I look in to?

    • Venkatt Guhesan said

      Look under the folder where you installed Tomcat (Catalina). You should see a “logs” folder underneath. It’s one of the files below unless you modified it as one of the properties.

      ${catalina.base}/logs/**

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
Follow

Get every new post delivered to your Inbox.

Join 124 other followers

%d bloggers like this: