Eclipse报错java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener解决方案
来源:互联网 发布:三菱l系列编程手册 编辑:程序博客网 时间:2024/06/04 19:49
在使用Eclipse做SSH整合时Tomcat报错
java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListenerat org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4149)at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705)at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)at org.apache.catalina.core.StandardService.start(StandardService.java:525)at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)at org.apache.catalina.startup.Catalina.start(Catalina.java:595)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)at java.lang.reflect.Method.invoke(Unknown Source)at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)但是Eclipse显示已经导包成功,spring中的类也可以正常使用,
于是找到了http://bbs.csdn.net/topics/3000668792009年的神贴,按照42楼的说法是
If you're using Eclipse and Maven, then the problem is with one particular project settings option:
project properties -> Java EE Module Dependencies -> Maven Dependencies
the last option must be checked (which isn't by default).
上面说到了如果使用Eclipse就必须将项目以来的jar包添加到 Java EE Module Dependencies中,但是在新版的Eclipse中没有这个选项,因此又有Eclipse : Java EE Module Dependencies Is Replaced By Web Deployment Assembly的说明,新版的Eclipse已经使用更加灵活的Deployment Assembly替换掉了Java EE Module Dependencies,因此只要在这里添加上WEB工程中的jar包即可。效果如下图所示:
PS:关于Java EE Module Dependencies的解释:This property page lets you add a Web Library dependency to utility projects, JAR files or classpath entries. Archive dependencies will be resolved into the WEB-INF/lib folder of the web module at deployment time. Class folder dependencies will be resolved into the WEB-INF/classes folder.
- Eclipse报错java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener解决方案
- Eclipse启动报错:java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
- java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener错误解决方案
- java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener错误解决方案
- java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener错误解决方案
- java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener错误解决方案
- java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener错误解决方案
- java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener错误解决方案
- 出现java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener解决方案
- maven 报错:java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
- SSH框架问题——java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener报错
- 启动报错:java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
- 启动报错:java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
- 启动报错:java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
- maven项目 启动报错:java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
- tomcat启动报错:java.lang.ClassNotFoundException:org.springframework.web.context.ContextLoaderListener
- 启动报错:java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
- 启动报错:java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
- 在Windows下编译FFmpeg详细说明
- PL/SQL:学会使用DBMS_JOB包
- 【转】c++ web编程:写出你的CGI程序(英文)
- Android 开发源码分享
- G POJ 2886 Who Gets the Most Candies?
- Eclipse报错java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener解决方案
- html跳转的几种方法
- Java中的正则表达式的匹配和分组
- lcd驱动解析(一) .
- hdu 2045 LELE的EPG难题
- windows 下apache多站点支持 [PHP]
- LINQ to SQL查询和SQL命令
- CentOS之SSH安装与配置
- 无线路由高级设置 虚拟服务器及DMZ主机