使用 Spring/Log4j/Hibernate/Ant 访问 Web 应用程序时出现 Tomcat 错误[严重:错误监听器启动]?

发布于 2024-11-28 22:11:14 字数 997 浏览 0 评论 0原文

我无法通过 Ant 访问部署在 tomcat 上的 Web 应用程序。它部署得很好,但是,当我访问它时,浏览器给了我 404 错误。 Catalina 日志给了我以下异常。以前它有效。我错过了什么吗?

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)

I can't access my web application deployed on tomcat via Ant. It is deployed fine, but, when I access it, browser gave me 404 error. The catalina log gave me the following exception. It previously worked. Did I missed any thing?

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)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

蓝海 2024-12-05 22:11:14

您的记录器配置不正确:

导致错误的行位于外部 Log4jMLog 的内部类 Log4jMLogger

导致错误的行是:return logger.isEnabledFor( level(l) );
因此,您的堆栈跟踪意味着变量 logger 为 null。

Your logger is not configured right:

The line that causes the error is in the inner class Log4jMLogger of the outer one Log4jMLog

The line that causes the error is: return logger.isEnabledFor( level(l) );
So your stack trace means that the variable logger is null.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文