java.lang.ClassNotFoundException:org.springframework.web.servlet.DispatcherServlet错误
不知道为什么我会收到此错误。 这里有很多类似的问题,但到目前为止我都没有。
我的常春藤文件是
我的web.xml是
Knox Web Interface action org.springframework.web.servlet.DispatcherServlet 1 action /*
我已经解决了常春藤。 仍然得到错误。 我也可以在日食中看到class级。
我真的很困惑。 任何帮助或建议表示赞赏。
PS:我也尝试添加但常春藤没有解决。 我明白了
Some projects fail to be resolved Impossible to resolve dependencies of #TestWebProject;working@BLT430LT3201C download failed: com.oracle.toplink#toplink;10.1.3!toplink.jar unresolved dependency: com.oracle#oc4j;1.0: not found unresolved dependency: com.oracle#toplink-essentials;2.41: not found unresolved dependency: javax.ejb#ejb;3.0: not found download failed: com.bea.wlplatform#commonj-twm;1.1!commonj-twm.jar unresolved dependency: jexcelapi#jxl;2.6.6: not found download failed: javax.jms#jms;1.1!jms.jar download failed: javax.faces#jsf-api;1.1!jsf-api.jar download failed: javax.resource#connector;1.0!connector.jar
不确定这是否与上述问题有关。 我正在http://mvnrepository.com/artifact/org.springframework搜索所有依赖项信息。
我的项目结构是
WEB-INF / lib目录为空。
资料来源: http : //opensourceforgeeks.blogspot.in/2014/05/javalangclassnotfoundexception.html
非常感谢你们的宝贵意见。 你没事。 Jar文件必须位于WEB-INF/lib
。 或者您可以告诉Eclipse它可以在其他位置找到jar而不仅仅是WEB-INF/lib
。
我们怎么做?
- 右键单击项目并选择属性。 现在转到部署程序集。
- 现在选择Add并选择Java构建路径条目。
- 常春藤选项会自动填充。 选择那个。
- 你完成了。选择Apply并确定。 Classnotfound Exception消失了。