Spring:org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class
很长时间没有使用Spring,Hibernate,Struts2等一些框架了,现在使用起来还是有点陌生,今天刚弄就在Tomcat在启动的时候是报的这个错误:
org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.founder.barcode.admin.area.action.AreaAction] for bean with name 'areaManageAction' defined in class path resource [applicationContext-action.xml]; nested exception is java.lang.ClassNotFoundException: com.founder.barcode.admin.area.action.AreaAction
今天就这个问题弄了差不多快一天了,尝试了各种方式。Cannot find class就是没有找到这个类,但是你又能在MyEclipse中找到这个类,而且各种配置也没有问题,那这时候就需要去编译好后的目录看一看有没有这个类,最后发现Tomcat中的这个项目没有这个类,也就是说编译没有成功,那么这就是JDK的问题了。一开始把JDK环境变量又重新配置了一下,又把Eclipse中的JDK也重新配置了,换了各种Tomcat,最后还是没有结果,最终是因为在配置Tomcat时JDK使用的是Eclipse自带的,看下图,就在这个位置选择一下JDK的版本。
配置好后,就会解决问题。
但是关于使用Spring框架在启动Tomcat时也会报org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class这种错误,但如果不是JDK上的问题就是缺少jar包的问题了,像c3p0等一些jar包。
Spring:org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class的更多相关文章
- 异常:Struts:org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find BasicDataSource
org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.apache.common ...
- spring问题org.springframework.beans.factory.CannotLoadBeanClassException
1.看jdk是否配置正确 2.把MyEclipse里面的那个classes删除让他重新编译就没什么问题了,只要配置是对的 3.重新clean project
- 报错org.springframework.beans.factory.CannotLoadBeanClassException: Error loading class [org.mybatis.spring.SqlSessionFactoryBean]
超级大坑 org.springframework.beans.factory.CannotLoadBeanClassException: Error loading class [org.mybati ...
- org.springframework.beans.factory.BeanCreationException: Could not autowire field org.springframework.beans.factory.CannotLoadBeanClassException: Error loading class [com.xxxx.service.sys.impl.ProcEn
七月 01, 2019 4:34:20 下午 org.apache.catalina.core.StandardContext listenerStart .....org.springframewo ...
- org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.my.service.ProductService] for bean with name 'productService' defi报错解决方法
原 javaweb项目报错org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [XXX] ...
- Java-API-Package:org.springframework.beans.factory.annotation
ylbtech-Java-API-Package:org.springframework.beans.factory.annotation 1.返回顶部 1. @NonNullApi @NonNull ...
- 错误/异常:org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/classes/beans_common.xml]...的解决方法
1.第一个这种类型的异常 1.1.异常信息:org.springframework.beans.factory.BeanCreationException: Error creating bean w ...
- Java-Class-@I:org.springframework.beans.factory.annotation.Autowired
ylbtech-Java-Class-@I:org.springframework.beans.factory.annotation.Autowired 1.返回顶部 2.返回顶部 1. pack ...
- spring Boot异步操作报错误: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.self.spring.springboot.Jeep' available
我也是最近开始学习Spring Boot,在执行异步操作的时候总是汇报如下的错误: Exception in thread "main" org.springframework.b ...
随机推荐
- lamp中的Oracle数据库链接
lamp一键安装包: https://lnmp.org/install.html 在CentOS 6.7 64位安装PHP的PDO_OCI扩展 Installing PDO_OCI extension ...
- 练T25- focus必看!所有成功截图汇总
http://www.guokr.com/post/565880/ 25914人加入此小组 发新帖 练T25- focus必看!所有成功截图汇总! 读图模式 作家向威 作家 2014-02-22 07 ...
- ubuntu 配置tomcat 实测成功
https://blog.csdn.net/qq_24091555/article/details/75077781
- Unity 碰撞检测 OnTriggerEnter 入门
当我们需要检测两个物体A和B发生碰撞的时候,必须要满足一下条件 1:A和B必须有碰撞边界,你可以点开一个A,在属性窗口点击AddComponent,在physis(物理)目录下看到以下这些 ,根据形状 ...
- java图像加密
0 前言 为了保护服务器的图像数据,需要用一个图像加密算法来加密服务器的图像:一开始找了一种基于混沌的图像加密算法,效果还是很理想的,是把矩阵图像上的像素点进行上下左右的混乱:后来发现加密后图像会变大 ...
- [ufldl]Supervised Neural Networks
要实现的部分为:forward prop, softmax函数的cost function,每一层的gradient,以及penalty cost和gradient. forwad prop forw ...
- [pixhawk笔记]2-飞行模式
本文翻译自px4官方开发文档:https://dev.px4.io/en/concept/flight_modes.html ,有不对之处,敬请指正. pixhawk的飞行模式如下: MANUAL( ...
- bootstrap正则表达式验证手机 座机 邮箱
$('#CusForm').bootstrapValidator({ fields : { //验证手机 'customer.mobile' : { //input中的name 值 validator ...
- Flume-NG源码阅读之FileChannel
FileChannel是flume一个非常重要的channel组件,非常常用.这个channel非常复杂,涉及的文件更多涉及三个包:org.apache.flume.channel.file.org. ...
- HashMap和ConcurrentHashMap和HashTable的底层原理与剖析
HashMap 可以允许key为null,value为null,但HashMap的是线程不安全的 HashMap 底层是数组 + 链表的数据结构 在jdk 1.7 中 map集合中的每一项都是一个 ...