部署Maven项目到tomcat报错:java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderLi
来源:互联网 发布:谷歌seo教程 编辑:程序博客网 时间:2024/06/09 08:06
问题背景:
工程为maven工程,ContextLoaderListener类位于spring-web-3.1.0.RELEASE.jar包中。检查了maven的pom.xml,依赖引入正常。在工程Maven Dependencies视图中也能看到spring-web-3.1.0.RELEASE.jar包被正常引入进来了。
错误原因:
进入到tomcat的部署路径.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\下检查了一下,发现工程部署后在WEB-INF文件夹下没有生成lib目录,正常情况下,会生成lib目录并把工程的所有依赖jar包都部署到该目录下。
解决方案:
1.右键点击项目--选择Properties
选择Deployment Assembly,在右边点击Add按钮,在弹出的窗口中选择Java Build Path Entries
2.点击Next,选择Maven Dependencies
3.点击Finish,然后可以看到已经把Maven Dependencies添加到Web应用结构中了
操作完后,重新部署工程,不再报错了。然后我们再到.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\目录下,发现工程WEB-INF目录下自动生成了lib目录,并且所有的依赖jar包也都已经部署进来。问题因此解决。
转自:http://blog.sina.com.cn/s/blog_7fb5109d0101o48g.html
阅读全文
0 0
- 部署Maven项目到tomcat报错:java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderLi
- 部署Maven项目到tomcat报错:java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderLi
- 部署Maven项目到tomcat报错:java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderLi
- 部署Maven项目到tomcat报错:java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderLi
- 部署Maven项目到tomcat报错:java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderLi
- 部署Maven项目到tomcat报错:java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderLi
- 部署Maven项目到tomcat报错:java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderLi
- 部署Maven项目到tomcat报错:java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderLi
- 部署Maven项目到tomcat报错:java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderLi
- 部署Maven项目到tomcat报错:java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderLi
- 部署Maven项目到tomcat报错:java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderLi
- 部署Maven项目到tomcat报错:java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderLi
- 部署Maven项目到tomcat报错:java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderLi
- 部署Maven项目到tomcat报错:java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderLi
- 部署Maven项目到tomcat报错:java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderLi
- 部署Maven项目到tomcat报错:java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderLi
- 部署Maven项目到tomcat报错:java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderLi
- 部署Maven项目到tomcat报错:java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderLi
- Spring boot redis注解
- 流量桶限流
- c++中“箭头(->)”和“点号(.)”操作符的区别(HM解析)
- AI 学习之路——轻松初探 Python 篇(二)
- JQuery获取上传的文件大小
- 部署Maven项目到tomcat报错:java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderLi
- 201403-3 命令行选项 ccf
- ISP、IAP、ICP介绍
- lesson7-2
- android页面跳转到空白页
- JMS(Java消息服务)入门教程
- 以太坊ETH代币开发教程源码学习笔记
- 轻松学习 JavaScript——第 1 部分:了解 let 语句
- SQL语句中,为什么where子句不能使用列别名,而order by却可以?