首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > Java Exception >

java.lang.NoClassDefFoundError: org/apache/log4j/Logger

2014-01-26 
在web.xml中加入下面一个定义后就会报错 listener listener-class org.springframework.web.context.Co

在web.xml中加入下面一个定义后就会报错
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>

详细报错如下:
<User defined listener org.springframework.web.context.ContextLoaderListener failed: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: No suitable Log constructor [Ljava.lang.Class;@17588d5 for org.apache.commons.logging.impl.Log4JLogger.>
#### <2007-3-20 下午04时04分30秒 CST> <Warning> <HTTP> <ccb-pww43pplmoq> <myserver> <main> < <WLS Kernel> > <> <BEA-101162> <User defined listener org.springframework.web.context.ContextLoaderListener failed: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: No suitable Log constructor [Ljava.lang.Class;@17588d5 for org.apache.commons.logging.impl.Log4JLogger.>
#### <2007-3-20 下午04时04分30秒 CST> <Warning> <HTTP> <ccb-pww43pplmoq> <myserver> <main> < <WLS Kernel> > <> <BEA-101162> <User defined listener org.springframework.web.context.ContextLoaderListener failed: java.lang.NullPointerException.>
#### <2007-3-20 下午04时04分30秒 CST> <Error> <Deployer> <ccb-pww43pplmoq> <myserver> <main> < <WLS Kernel> > <> <BEA-149231> <Unable to set the activation state to true for the application DefaultWebApp.
weblogic.management.ApplicationException: start() failed.
{
Module Name: DefaultWebApp, Error: weblogic.management.DeploymentException: org.apache.commons.logging.LogConfigurationException: No suitable Log constructor [Ljava.lang.Class;@17588d5 for org.apache.commons.logging.impl.Log4JLogger - with nested exception:
[java.lang.NoClassDefFoundError: org/apache/log4j/Logger]
}
at weblogic.j2ee.J2EEApplicationContainer.start(J2EEApplicationContainer.java:2141)
at weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicationContainer.java:2175)
at weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicationContainer.java:2122)
at weblogic.management.deploy.slave.SlaveDeployer$Application.setActivation(SlaveDeployer.java:3099)
at weblogic.management.deploy.slave.SlaveDeployer.setActivationStateForAllApplications(SlaveDeployer.java:1768)
at weblogic.management.deploy.slave.SlaveDeployer.resume(SlaveDeployer.java:351)
at weblogic.management.deploy.DeploymentManagerServerLifeCycleImpl.resume(DeploymentManagerServerLifeCycleImpl.java:229)
at weblogic.t3.srvr.SubsystemManager.resume(SubsystemManager.java:136)
at weblogic.t3.srvr.T3Srvr.resume(T3Srvr.java:965)
at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:360)
at weblogic.Server.main(Server.java:32)
但是同样的程序和配置在另外一台机器上没有任何问题
编译和两个运行环境的jdk都是142_08,服务器是weblogic8.1sp5
请高手答疑

------解决方法--------------------------------------------------------
http://forum.springframework.org/showthread.php?t=16571
------解决方法--------------------------------------------------------
<!-- Listener contextConfigLocation -->
<listener>
<listener-class> org.springframework.web.context.ContextLoaderListener </listener-class>
</listener>
<!-- Listener log4jConfigLocation -->
<listener>
<listener-class> org.springframework.web.util.Log4jConfigListener </listener-class>
</listener>
------解决方法--------------------------------------------------------
你的错误:
rg.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: No suitable Log constructor         

热点排行