Just a quick post that I hope might benefit others. If you have been developing web applications on tomcat for a while you have likely come the two error messages mentioned in the title: SEVERE: Error listenerStart and SEVERE: Error filterStart.
SEVERE: Error listenerStart
Occurs when an exception is thrown in the contextInitialized method of a ServletContextListener
SEVERE: Error filterStart
Occurs when an exception is thrown in the init method of a Filter
Unfortunately by default, tomcat won’t provide you with any details about the cause of the error. Infact it wont even tell you which filter or listener is failing. This can be big problem in applications of significant size that have many filters and listeners configured. Fortunately there is a solution. In your webapplication’s WEB-INF/classes folder you can create a logging.properties file with the following contents
org.apache.catalina.core.ContainerBase.[Catalina].level = INFO
org.apache.catalina.core.ContainerBase.[Catalina].handlers = java.util.logging.ConsoleHandler
Now you will be presented with the stacktrace
Thanks!
It works!
Brilliant solution!
You the man, top solution.
Thanks, it works!
it just works. thanks a lot, it was driving me craizy this
SEVERE: Error filterStart
Thanks, it works!
You saved me a lot of time with this little trick. Many thanks!
[…] Debugging the dreaded “SEVERE: Error listenerStart” and “SEVERE: Error filterStart” tomcat e… (tags: java) Related: MacOS Forge und git… […]
Great help… Thanks alot
Be sure to really call the file “logging.properties”. I was trying to add those lines to an existing “log4j.properties” file which did not produce the desired logging output (tomcat 7.0.19).
Once I called the file “logging.properties” it worked…
Thanks – it works
Thx a lot it works….. Great Help 🙂
Hi,
if you have this problem mit JBoss 4, then edit server/default/conf/jboss-log4j.xml and add this:
<category name=”org.apache.catalina.core.ContainerBase”>
<priority value=”INFO”/>
</category>
Thanks a lot …..it worked!!
Thanks a lot dudde, It’s solved my problem.
Thanks once again.
I did the steps. But still no stacktrace is printed on the console. Am I missing something ? Do I need to call logging.properties file explicitly ?
Thanks! This saved my day once more!
I had missed out on commons-pool-1.4.jar in my spring application.
It works after I include this jar.
I had SEVERE Error listenerStart while starting tomcat on Mac OS X lion and the fix for me was to set
export JAVA_OPTS=-Djava.net.preferIPv4Stack=true
before starting
thanks!
At Tomcat-7.0.x it only works if you set the configurations to conf/logging.properties
I’m using tomcat 7.0.12 and I can’t get this to work. I added those lines to logging.properties in the conf directory but I still just get the same error with no extra information. Is there something else I need to do?
Works perfectly! Thanks for the tip!
Well, Thiago, fancy seeing you making that point, since I came here for that same reason.
And…we work for the same company 😉
Thank you so much. I can see full stack trance now. 😉
Thank You so so much.Your tip is really useful.
Tomcat 7.0.30 provides such a standard logging configuration:
—
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level = INFO
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].handlers = 2localhost.org.apache.juli.FileHandler
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].level = INFO
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].handlers = 3manager.org.apache.juli.FileHandler
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].level = INFO
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].handlers = 4host-manager.org.apache.juli.FileHandler
—
This means that you simply have o look into the parallel produced log file, which starts like “localhost.*”.
Thanks… it works
Great help. Thanx a lot. It saved a lot of time.
Thanks, something worked — finally!
(I will take small victories) 🙂
Awesome tip!! Thanks for sharing!
[…] Error listenerStart […]
Thanks, thanks, thanks !!!
Aaaaaaw! Thanksssss!!!!
thanks that really helped 🙂
Worked like a charm. Thanks !
Thanks.. Really helped.. Initially thought logging.properties in /conf would be sufficient. But it should be there in /webapps//WEB-INF/classes/
woowwww… it works, it really helped me thanx a lot
This helped a great deal. I have been stuck with dumb console. Thanks a lot
its not working me
Wow..Nice… it worked… 🙂
Thanks a lot. without this I could not have figured out what was the problem
Thanks This is really helped me I have added this properties file at \.openshift\config
Great, it generated more logs for me……