java.lang.ClassNotFoundException: org.apache.commons.logging.LogFactory
我正在使用 My-eclipse 并做一个 struts 项目,没有语法错误,但在启动 tomcat 服务器时,控制台中出现以下错误。
java.lang.ClassNotFoundException:org.apache.commons.logging.LogFactory
和
javax.servlet.UnavailableException:解析错误处理资源路径 jndi:/localhost/strutspro/WEB-INF/struts-config.xml
知道问题是什么。
I am using My-eclipse and doing a struts project there is no syntax error but on starting tomcat server the following error appear in console.
java.lang.ClassNotFoundException: org.apache.commons.logging.LogFactory
and
javax.servlet.UnavailableException: Parsing error processing resource path jndi:/localhost/strutspro/WEB-INF/struts-config.xml
any idea whats the problem.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
看来您已经找到了解决方案,但我对同一问题的解决方案有点不同。
在 Eclipse 3.6 中运行 Tomcat 4.1.29,我开始收到非常类似的错误(Servlet /webcustom 抛出 load() 异常 javax.servlet.UnavailableException: Parsing errorprocessing resources path /WEB-INF/conf/struts-config-资源.xml,...)。
执行“Eclipse > Project > Clean”或“Eclipse > Servers > (Tomcat Server Instance) > Clean Tomcat Work Directory”都无法解决我的问题。
然而,经过大量的试验和错误,我发现解决方案是这样的......
Eclipse >服务器> (Tomcat 服务器实例)...
希望这对其他人有帮助。
-jpt
It looks like you've already found your solution, but my solution to the same problem was a little different.
Running Tomcat 4.1.29 inside Eclipse 3.6, I started receiving a very similar error (Servlet /webcustom threw load() exception javax.servlet.UnavailableException: Parsing error processing resource path /WEB-INF/conf/struts-config-resource.xml,...).
Neither performing an "Eclipse > Project > Clean", nor an "Eclipse > Servers > (Tomcat Server Instance) > Clean Tomcat Work Directory" would resolve the problem for me.
However, after a lot of trial and error, I found the solution to be this...
Eclipse > Servers > (Tomcat Server Instance)...
Hopefully this helps someone else.
-jpt
下载 commons-logging 并将 jar 放入
WEB-INF/lib.
对于未来 - 谷歌找不到的类名,看看它属于哪个库,下载它并将其放在类路径上(在本例中为
WEB-INF/lib
)Donwload commons-logging and place the jar(s) in
WEB-INF/lib
.And for the future - google the class name that is not found to see which library it belongs to, download it and put it on the classpath (
WEB-INF/lib
in this case)