For this error, there can be different solutions. I have noted down the ones that had worked for me.

Solution 1. This is always happened in deployment and debugging environment. In deployment environment, just make sure your server classpath has included the Spring jar library (e.g spring-4.0.4.jar).

In debugging environment, the steps may vary from different IDE, but the solution is same. In Eclipse, developers usually will create a tomcat, jboss…whatever application server for debugging, just make sure the correct Spring jars are included.

  1. Double click on your debugging server
  2. Click on the “Open launch configuration” to access the server environment
  3. Click on the classpath tab
  4. Include the Spring jar file here , it may also required common log jar due to Spring dependency.
  5. Done, run your application again.

.

Solution 2. If you are using Maven as a build tool and downloading dependencies using it, there can be some jar conflict. Because Tomcat servers normally provide some jars such as servlet-api and jpa-api. So if you again included them using maven; there will be problems in identifying them.

Solution 3. If you are using Eclipse as your IDE and using Maven as your build tool and tomcat as your server; remember Tomcat server will not look on the jars which are just inside the folders. For that there's a small trick,

  1. Right click on your project and select properties
  2. From the displayed window, select Deployment Assembly
  3. Select Add
  4. Add Maven dependencies
  5. Click Apply and Click OK

Hope one of these solutions would help you to solve your problem. Happy Coding and make sure that is using Java.

原文地址:https://stackoverflow.com/questions/15989325/java-lang-noclassdeffounderror-org-springframework-context-applicationcontext/22746332#22746332

最新文章

  1. Java处理 文件复制
  2. matlab里的svmtrain的输出model里,各参数的含义
  3. jasoncpp读取jason数据如何判断某一字段是否存在
  4. asp.net mvc 之旅—— 第二站 窥探Controller下的各种Result
  5. 一步步搭建自己的轻量级MVCphp框架-(三)一个国产轻量级框架Amysql源码分析(2) 进程
  6. C程序设计语言练习题1-4
  7. ios 判断,qq,银行卡,手机号,邮编,生日,数字,字符串,护照, email
  8. css以及选择器基础
  9. 20162318 实验二《Java面向对象程序设计》实验报告
  10. XMPP系列(六)---创建群组
  11. 使用 GNU profiler 来提高代码运行速度
  12. CentOS7部署Django,nginx,uwsgi,redis
  13. 自学PHP的正确方法与经验
  14. Allegro PCB Design GXL (legacy) 刷新PCB封装(Package)中的焊盘(Padstack)
  15. django源码分析
  16. Win10下安装zio
  17. 编写灵活、稳定、高质量的 css代码的规范
  18. High level GPU programming in C++
  19. JVM总结-java对象的内存布局
  20. Java——String类

热门文章

  1. 大数据相关概念和hdfs
  2. Javascript 的定时器 setInterval,setTimeout,clearInterval
  3. 从系统学Android--2.5Activity启动模式
  4. Thymeleaf对象的使用:数字对象
  5. RabbitMQ学习笔记(五、RabbitMQ集群)
  6. AcWing 799. 最长连续不重复子序列
  7. 80道最新java基础部分面试题(五)
  8. WPF 精修篇 page
  9. Matlab2019a启动慢,寻找许可证耽误时间解决办法
  10. linux--新装机图形化界面遇到的问题