我无法通过Ant访问部署在tomcat上的Web应用程序。它部署得很好,但是,当我访问它时,浏览器给了我404错误。卡塔琳娜日志给了我以下例外。它以前工作过。我错过了什么吗?
Aug 11, 2011 12:06:47 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive customercare.war
log4j:WARN No appenders could be found for logger (org.apache.commons.digester.Digester).
log4j:WARN Please initialize the log4j system properly.
Aug 11, 2011 12:07:01 PM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
Aug 11, 2011 12:07:01 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/customercare] startup failed due to previous errors
Exception in thread "Timer-4" java.lang.NullPointerException
at com.mchange.v2.log.log4j.Log4jMLog$Log4jMLogger.isLoggable(Log4jMLog.java:257)
at com.mchange.v2.resourcepool.BasicResourcePool$CullTask.run(BasicResourcePool.java:1934)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
答案 0 :(得分:1)
您的记录器未正确配置:
导致错误的行位于外部Log4jMLogger
的内部类Log4jMLog
导致错误的行是:return logger.isEnabledFor( level(l) );
因此,堆栈跟踪意味着变量logger
为空。