请教OpenSourceStruts中的struts_appfuse 使用错误。

03-06-16 zilch_yuan
我在使用Open Source 中的appfuse-0.8时,放在Tomcat 下运行,一直出现这个种错,哪位高手用过,请指教?非常谢谢!我的错误是:

运行前我在Tomcat的common\bin中已经加了mysql-connector-java-2.0-bin.jar 和log4j.jar等。

2003-06-16 15:38:51 StandardContext[/appfuse]: Error configuring application listener of class org.appfuse.webapp.listener.StartupListener

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

at org.apache.commons.logging.impl.Log4jFactory.getInstance(Log4jFactory.java:140)

at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:263)

at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:395)

at org.appfuse.webapp.listener.StartupListener.<init>(StartupListener.java:31)

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)

at java.lang.reflect.Constructor.newInstance(Constructor.java:274)

at java.lang.Class.newInstance0(Class.java:296)

at java.lang.Class.newInstance(Class.java:249)

at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3156)

at org.apache.catalina.core.StandardContext.start(StandardContext.java:3404)

at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)

at org.apache.catalina.core.StandardHost.start(StandardHost.java:638)

at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)

at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:343)

at org.apache.catalina.core.StandardService.start(StandardService.java:388)

at org.apache.catalina.core.StandardServer.start(StandardServer.java:506)

at org.apache.catalina.startup.Catalina.start(Catalina.java:781)

at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)

at org.apache.catalina.startup.Catalina.process(Catalina.java:179)

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:324)

at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)

2003-06-16 15:38:51 StandardContext[/appfuse]: Configuring event listener class 'org.appfuse.webapp.listener.UserCounterListener'

2003-06-16 15:38:51 StandardContext[/appfuse]: Error configuring application listener of class org.appfuse.webapp.listener.UserCounterListener

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

at org.apache.commons.logging.impl.Log4jFactory.getInstance(Log4jFactory.java:140)

at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:263)

at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:395)

at org.appfuse.webapp.listener.UserCounterListener.<init>(UserCounterListener.java:31)

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)

at java.lang.reflect.Constructor.newInstance(Constructor.java:274)

at java.lang.Class.newInstance0(Class.java:296)

at java.lang.Class.newInstance(Class.java:249)

at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3156)

at org.apache.catalina.core.StandardContext.start(StandardContext.java:3404)

at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)

at org.apache.catalina.core.StandardHost.start(StandardHost.java:638)

at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)

at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:343)

at org.apache.catalina.core.StandardService.start(StandardService.java:388)

at org.apache.catalina.core.StandardServer.start(StandardServer.java:506)

at org.apache.catalina.startup.Catalina.start(Catalina.java:781)

at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)

at org.apache.catalina.startup.Catalina.process(Catalina.java:179)

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:324)

at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243) 

fishandfly
2003-06-17 09:27
到www.apache.org上面下载一个log4j,然后把log4j.jar放到lib中。

zilch_yuan
2003-06-17 10:56
运行前我在Tomcat的common\bin中已经加了mysql-connector-java-2.0-bin.jar 和log4j.jar等。

fishandfly
2003-06-18 14:31
common\lib吧!

猜你喜欢