Announcement Announcement Module
No announcement yet.
"Error reading tld listeners" - HELP! Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • "Error reading tld listeners" - HELP!

    Hi al!!
    Im working on a web application. Im using Tomcat 5.5.20 as web container.
    The problem is when i put some beans into my applicationContext.xml file. When Tomcat starts it throws an exception:

    31/01/2007 09:18:22 org.apache.catalina.core.StandardContext processTlds
    SEVERE: Error reading tld listeners java.lang.NullPointerException
    	at org.apache.log4j.Category.isEnabledFor(
    	at org.apache.commons.logging.impl.Log4JLogger.isTraceEnabled(
    	at org.apache.catalina.startup.TldConfig.tldScanResourcePaths(
    	at org.apache.catalina.startup.TldConfig.execute(
    	at org.apache.catalina.core.StandardContext.processTlds(
    	at org.apache.catalina.core.StandardContext.start(
    	at org.apache.catalina.core.ContainerBase.addChildInternal(
    	at org.apache.catalina.core.ContainerBase.addChild(
    	at org.apache.catalina.core.StandardHost.addChild(
    	at org.apache.catalina.startup.HostConfig.deployDirectory(
    	at org.apache.catalina.startup.HostConfig.deployDirectories(
    	at org.apache.catalina.startup.HostConfig.deployApps(
    	at org.apache.catalina.startup.HostConfig.start(
    	at org.apache.catalina.startup.HostConfig.lifecycleEvent(
    	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(
    	at org.apache.catalina.core.ContainerBase.start(
    	at org.apache.catalina.core.StandardHost.start(
    	at org.apache.catalina.core.ContainerBase.start(
    	at org.apache.catalina.core.StandardEngine.start(
    	at org.apache.catalina.core.StandardService.start(
    	at org.apache.catalina.core.StandardServer.start(
    	at org.apache.catalina.startup.Catalina.start(
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(
    	at java.lang.reflect.Method.invoke(
    	at org.apache.catalina.startup.Bootstrap.start(
    	at org.apache.catalina.startup.Bootstrap.main(
    If i remove this new bean, the application works ok...
    I dont know wat to do.. i need put more bean (datasource, propertyConfigurer, etc)
    The jar libraries of Log4j and commons-logging are in the classpath of application.
    Im using Spring 2.0.1 and Spring WebFlow 1.0.1.

    Some help??!!
    Thank you!

  • #2
    Ok, Im remove from my WEB-INF/lib the log4j-1.2.14.jar and the application runs ok now...
    But, what appens if I want user log4j for logging?


    • #3
      I came across this today while working on an application. The complexity was minimal, but i was using various common's libraries and hibernate (with it's respective default dependencies).

      I haven't dove into the code (commons logging and spring), but I strongly believe the problem lies within the initialization of the context and errors produced when the application starts. For example I can easily reproduce the problem by intentionally misconfiguring a spring bean or hibernate mapping.

      Unfortunately I had to do a lot of trial & error debugging to find the original problem in my configuration because logging was unavailable at that point.

      I strongly feel this is not an issue with the version commons logging (or log4j) as I am using the latest stable release. I didn't have to revert to an older release in order to resolve the issue either.

      If anyone is interested, I can create a war that replicates the problem consistently.


      • #4
        Hi, I got the same error.

        In my case it was caused by a badly map type between the model object hibernate annotation tag and the a column type.

        It's defenetly not an issue with the log4j. It's more likely an error in the initialization of the context done by Spring and the error reporting.

        Hope this helps!