Spring 整合hibernante 错误java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
2016-10-15 18:41
711 查看
1.将所需的jar包全部拷贝到WEB-INF/lib下,再重新启动tomcat便能顺利通过了。参考http://blessht.iteye.com/blog/1104450
最佳答案
spring-web 的jar包没导进去
jar包邮冲突,把重复的jar包删除
在web.xml加上<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:applicationContext-*.xml</param-value>
</context-param>
因为默认的读取的是/WEB-INF下的配置文件,如果配置文件在src中要把路径改为类路径底下
4.把工程刷新一下,因为工程是部署在服务器底下的,要把加入的jar包部署到工程里
最佳答案
spring-web 的jar包没导进去
jar包邮冲突,把重复的jar包删除
在web.xml加上<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:applicationContext-*.xml</param-value>
</context-param>
因为默认的读取的是/WEB-INF下的配置文件,如果配置文件在src中要把路径改为类路径底下
4.把工程刷新一下,因为工程是部署在服务器底下的,要把加入的jar包部署到工程里
相关文章推荐
- java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener错误的解决办法
- SSH+ maven整合: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错误解决方案
- java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener 错误处理办法
- maven项目启动报: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
- 启动tomcat出现java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
- 【java】—— 真正解决java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
- Maven java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
- java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener