严重: Error deploying web application directory Orde

2009-2-24 19:24:57 org.apache.commons.modeler.Registry registerComponent
严重: Null component Catalina:type=JspMonitor,WebModule=//localhost/OrderTickets,J2EEApplication=none,J2EEServer=none
2009-2-24 19:24:57 org.apache.catalina.startup.HostConfig deployDirectories
严重: Error deploying web application directory OrderTickets
java.lang.NoSuchMethodError: org.apache.log4j.Category.log(Ljava/lang/String;Lorg/apache/log4j/Level;Ljava/lang/Object;Ljava/lang/Throwable;)V
at org.apache.commons.logging.impl.Log4JCategoryLog.debug(Log4JCategoryLog.java:94)
at org.apache.catalina.session.ManagerBase.init(ManagerBase.java:627)
at org.apache.catalina.session.StandardManager.start(StandardManager.java:639)
at org.apache.catalina.core.ContainerBase.setManager(ContainerBase.java:499)
at org.apache.catalina.startup.ContextConfig.managerConfig(ContextConfig.java:315)
at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:635)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:216)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4290)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:823)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)
at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:277)
at org.apache.catalina.core.StandardHost.install(StandardHost.java:832)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:701)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:432)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:983)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:349)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1091)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)
at org.apache.catalina.core.StandardService.start(StandardService.java:480)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:2313)
at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)
2009-2-24 19:24:57 org.apache.coyote.http11.Http11Protocol start
信息: Starting Coyote HTTP/1.1 on http-8080
请各位大虾帮我解答一下,小弟不胜感激!!!!!
[b]问题补充:[/b]
classpath路径:
<?xml version="1.0" encoding="UTF-8"?>



















5个回答

首先看一下log4j的版本是不是合适,最好是新版本,不行了到jdk\jre\lib\ext目录看是否有log4j包,有了就删掉。

[code="java"]java.lang.NoSuchMethodError: org.apache.log4j.Category.log(Ljava/lang/String;Lorg/apache/log4j/Level;Ljava/lang/Object;Ljava/lang/Throwable;)V [/code]

这个说的很清楚了,log4j的版本不对,按照zby.110说的检查classPath中的log4j包

去下一个apache的 log4j.jar吧

[b]原因:[/b]commons-logger.jar和你的log4j.jar版本不兼容。前者是对后者的一个封装。前者的功能就是:它封装了一些通常的日志类,比如log4j,java.util.logging.Logger 等。使用log4j时,由于版本不对,commons-logger中用了log4j中的那个类,在当前的log4j.jar版本中已经不存在了,所以报错。

[b]解决方法:[/b]
将class目录下commons-logging.properties
org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JCategoryLog
[b]更改为[/b]
org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐