很长时间没有使用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的更多相关文章

  1. 异常:Struts:org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find BasicDataSource

    org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.apache.common ...

  2. spring问题org.springframework.beans.factory.CannotLoadBeanClassException

    1.看jdk是否配置正确 2.把MyEclipse里面的那个classes删除让他重新编译就没什么问题了,只要配置是对的 3.重新clean project

  3. 报错org.springframework.beans.factory.CannotLoadBeanClassException: Error loading class [org.mybatis.spring.SqlSessionFactoryBean]

    超级大坑 org.springframework.beans.factory.CannotLoadBeanClassException: Error loading class [org.mybati ...

  4. 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 ...

  5. 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] ...

  6. Java-API-Package:org.springframework.beans.factory.annotation

    ylbtech-Java-API-Package:org.springframework.beans.factory.annotation 1.返回顶部 1. @NonNullApi @NonNull ...

  7. 错误/异常: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 ...

  8. Java-Class-@I:org.springframework.beans.factory.annotation.Autowired

    ylbtech-Java-Class-@I:org.springframework.beans.factory.annotation.Autowired 1.返回顶部   2.返回顶部 1. pack ...

  9. 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 ...

随机推荐

  1. 创建pfx数字证书

    相关参考: 安全工具: http://msdn.microsoft.com/zh-cn/library/dd233106(v=vs.110).aspx makecert: http://msdn.mi ...

  2. Java io流详解三

    public class IOpractise { public void iotest() { int b= 0; FileInputStream fis = null; try { fis = n ...

  3. java.util.Calendar简介

    Calendar是一个抽象类,我们无法直接实例化它,它有一个具体子类实体类java.util.GregorianCalendar,这个类实现的就是我们日常所用的公历历法,或者叫做阳历.我们可以直接使用 ...

  4. SqlServer分页总结-摘抄

    sqlserver2008不支持关键字limit ,所以它的分页sql查询语句将不能用mysql的方式进行,幸好sqlserver2008提供了top,rownumber等关键字,这样就能通过这几个关 ...

  5. 微信小程序组件text

    基础内容text:官方文档 Demo Code var initData = 'this is first line\nthis is second line' var extraLine = []; ...

  6. C# 并行 反射 去掉实体属性多余空格

          有时会遇到很多不合理的数据附件到实体后有大量空格需要处理,这里提供一个方法,通过并行反射的方式高效清理空格.   Code: //清除字符串空格 public static object ...

  7. Linux服务器内存cache清理

    发现cache中占用大量内存,无free内存可用 使用如下命令清理: syncsysctl -w vm.drop_caches=1 转自:http://blog.csdn.net/sky_qing/a ...

  8. Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration info

    Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the ...

  9. qss 样式不生效--注释不能嵌套

    qss 兼容 css 调qt样式的时候出现一个很奇怪的问题 删掉注释掉的内容 样式正常,不删注释 ,注释后面的样式全部失效.有点困惑的是: 感觉很困惑,后来发现里面有行中文注释,删掉中文注释就行了,以 ...

  10. 《网络攻防》Web基础

    20145224陈颢文 <网络攻防>Web基础 基础问题回答 什么是表单: 表单是一个包含表单元素的区域.表单元素是允许用户在表单中输入信息的元素.表单在网页中主要负责数据采集功能. 浏览 ...