resin3.026启动报 No suitable Log constructor

[12:26:13.109] Host[] starting
[12:26:13.687] In-place class redefinition (HotSwap) is available.
[12:26:14.468] WebApp[http://localhost:8001] starting
[12:26:14.843] org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: No suitable Log constructor [Ljava.lang.Class;@16ea269 for org.apache.commons.logging.impl.Log4JL
ogger (Caused by java.lang.NoClassDefFoundError: org/apache/log4j/Category) (Caused by org.apache.commons.logging.LogConfigurationException: No suitable Log constructor [Ljava.lang.Class;@16ea269 for org.apache.commons.l
ogging.impl.Log4JLogger (Caused by java.lang.NoClassDefFoundError: org/apache/log4j/Category))
[12:26:14.843]  at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:543)
[12:26:14.843]  at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:235)
[12:26:14.843]  at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:209)
[12:26:14.843]  at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:351)
[12:26:14.843]  at org.springframework.web.context.ContextLoader.<init>(ContextLoader.java:143)
[12:26:14.843]  at org.springframework.web.context.ContextLoaderListener.createContextLoader(ContextLoaderListener.java:57)
[12:26:14.843]  at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:48)

网上有些朋友说是:log4j和commons-log不兼容,然后解决办法:删除掉$tomcat/commons/lib/下面的commons-log.jar文件,但是我的lib下面没有commons-log.jar。折腾了一个上午,现在和大家共享一下,原来,是我resin的lib下面的commons-logging-1.0.4.jar版本太低了,换为commons-logging-1.1.jar,启动,OK!

你可能感兴趣的:(java,apache,tomcat,Web,log4j)