JSF初学者 启动tomcat报错

huang_w 2008-04-02
启动tomcat时报错

严重: Error configuring application listener of class org.apache.myfaces.webapp.StartupServletContextListener
java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
at org.apache.myfaces.webapp.StartupServletContextListener. <clinit>(StartupServletContextListener.java:39)
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:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
==========================================================

不管上面的错误后有在浏览器加入http://localhost:8080/JSFDemo/login.faces
控制台又有错误!
我已经把jstl.jar
standard.jar
jsf-api.jar
jsf-impl.jar
myfaces-all.jar
这些加入tomcat的lib下了
不知道怎么解决 大家帮帮我吧

2008-4-1 21:36:08 org.apache.catalina.core.StandardContext listenerStart
严重: Error configuring application listener of class org.apache.myfaces.webapp.StartupServletContextListener
java.lang.NoClassDefFoundError: Could not initialize class org.apache.myfaces.webapp.StartupServletContextListener
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:513)
at java.lang.Class.newInstance0(Class.java:355)
hintcnuie 2008-04-03
好像是缺少log4j之类的jar吧
lianyeyu 2008-04-03
应该是log4j的问题
yongtree 2008-04-07
hintcnuie 写道
好像是缺少log4j之类的jar吧

应该是这个的问题,加上这个包以后要配置log4j.properties。commons-logging-1.0.4.jar也不能丢。
Global site tag (gtag.js) - Google Analytics