Error reading tld listeners
May 28, 2008
Problem :
Trying to run a web application (that makes use of the log4j framework) on tomcat, during start up, it complained of the following error…
SEVERE: Error reading tld listeners java.lang.NullPointerException java.lang.NullPointerException at org.apache.log4j.Category.isEnabledFor(Category.java:746) at org.apache.commons.logging.impl.Log4JLogger.isTraceEnabled(Log4JLogger.java:327) at org.apache.catalina.startup.TldConfig.tldScanResourcePaths(TldConfig.java:581) at org.apache.catalina.startup.TldConfig.execute(TldConfig.java:282) at org.apache.catalina.core.StandardContext.processTlds(StandardContext.java:4278 ) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4115) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524) at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:608 ) ...
Solution 1:
Simply replace the commons-logging-1.1 jar with an older version, namely commons-loggin-1.0.4.jar.
Solution 2:
Edit the context.xml file residing under the META-INF folder (or create one if it doesn’t already exist), and turn off the tld processing as follows…
<?xml version="1.0" encoding="UTF-8"?> <Context path="/yourowncontextname" processTlds="false"/>
… where “yourowncontextname” is the context name your application will use to run in the browser under.
Wa’Allahu A’lam.
Entry Filed under: Java, Netbeans, Tomcat. Tags: commons-logging + error, commons-loggins + java.lang.NullPointerException, Error reading tld listeners, java.lang.NullPointerException, log4j + error, log4j + java.lang.NullPointerException, SEVERE: Error reading tld listeners.
Trackback this post | Subscribe to the comments via RSS Feed