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]
最近在webService服务,在CXF方面自己写了一个测试的小服务程序,发布到本地主机上边,程序大致框架是通过spring框架对数据库进行连接从而操作数据库,有一个接口,一个实现类,一个实体类,接口上边有WebSerivce注解,实现类通过在cxf.xml文件中进行配置,在类中用的是注解方法来操作事务。在发布程序的过程中出现来标题相关的内容,原来的错误是找不到ContextLoaderListener,通过重启服务器,重新builder一下,最终这个错误消失 ,接下来就是下边的错误,搞了半天,各种百度,最终在一个博客上,看到关于编译JDK和系统的jdk版本不一样等说法,自己就去慢慢尝试,果然搞定
从别的地方导入一个项目的时候,经常会遇到eclipse/Myeclipse报Description Resource Path Location Type Java compiler level does not match the version of the installed Java project facet.出现这个问题的原因是因为,eclipse/myeclipse的jdk编译版本与出现问题的项目JDK编译版本不一致所导致!
先设置好jdk,需要确定 项目,eclipse/myeclipse,系统 用的是同一个版本的JDK,我系统中安装的JDK是1.7,所以我把eclipse的jdk成1.7
进入 windows—proferences—java–compiler设置编译出来的文件使用的格式是 1.7版本的 (设置成多少都行,只要兼容,并且与你项目的编译版本一直就可以,我这里统一设置成1.7)
进入项目–properties—java Compiler 把项目编译版本也设置成 1.7
进入项目–properties—Myeclipse—project Facets设置java文件的版本为 1.7
完成以上所有步骤,重启服务,即可解决!别忘记点赞
org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.my.service.ProductService] for bean with name 'productService' defi报错解决方法的更多相关文章
- 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: Error loading class [org.mybatis.spring.SqlSessionFactoryBean]
超级大坑 org.springframework.beans.factory.CannotLoadBeanClassException: Error loading class [org.mybati ...
- 异常: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: Cannot find class
很长时间没有使用Spring,Hibernate,Struts2等一些框架了,现在使用起来还是有点陌生,今天刚弄就在Tomcat在启动的时候是报的这个错误: org.springframework.b ...
- spring问题org.springframework.beans.factory.CannotLoadBeanClassException
1.看jdk是否配置正确 2.把MyEclipse里面的那个classes删除让他重新编译就没什么问题了,只要配置是对的 3.重新clean project
- tomcat启动错误org.springframework.beans.factory.CannotLoadBeanClassException的解决
tomcat启动时一直报这个错误,但是报错的类确实存在. 清空tomcat,更新maven项目,重配tomcat都没有解决. 最后解决办法: Eclipse环境:Project-->clean ...
- Spring报错: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [xxx]
如果确实没有这个类,就挨个将总项目,子项目clean,install一下,注意他们的依赖关系.
- org.springframework.beans.factory.CannotLoadBeanClassException-估计mapper出参 和 po字段不对应了
DEBUG [localhost-startStop-1] - Ignoring bean class loading failure for bean 'itemsService'org.sprin ...
- 出现org.springframework.beans.factory.NoSuchBeanDefinitionException 的解决思路
Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: privat ...
随机推荐
- 工作中php处理HTTP请求的缺陷总结
之前遇到过php在处理一部分业务的时候总是感觉有短板,有些东西总是不能随人心意.比如执行时间问题,一个进程需要读取多条数据放入数组循环执行处理流程,就会很慢,容易超时,这个超时问题 可以用php设置s ...
- 用Java向数据库中插入大量数据时的优化
使用jdbc向数据库插入100000条记录,分别使用statement,PreparedStatement,及PreparedStatement+批处理3种方式进行测试: public void ex ...
- Redesign Your App for iOS 7 之 页面布局
Redesign Your App for iOS 7 之 页面布局 http://www.vinqon.com/codeblog/?detail/11109
- post 与get
GET:从服务器上获取数据,也就是所谓的查,仅仅是获取服务器资源,不进行修改. POST:向服务器提交数据,这就涉及到了数据的更新,也就是更改服务器的数据. 补充: PUT:PUT的英文含义是放置,也 ...
- 【BZOJ5083】普及 单调栈+二分+RMQ
[BZOJ5083]普及 Description 有一个长度为n的字符串,每一位只会是p或j.你需要取出一个子串S(从左到右或从右到左一个一个取出),使得 不管是从左往右还是从右往左取,都保证每时每刻 ...
- MyBatis 学习 - 注解
首先,POJO /** * @Title: Question.java * @Package com.test.model * @Description: TODO(POJO Question) * ...
- 160512、nginx+多个tomcat集群+session共享(windows版)
第一步:下载nginx的windows版本,解压即可使用,点击nginx.exe启动nginx 或cmd命令 1.启动: D:\nginx+tomcat\nginx-1.9.3>start ng ...
- TCP requires two packet transfers to set up the connection before it can send data
wHTTP重用现存连接来减少TCP建立时延. HTTP The Definitive Guide 4.2.3 TCP Connection Handshake Delays When you set ...
- flask中current_app._get_current_object()与current_app有什么区别?
https://segmentfault.com/q/1010000005865632/a-1020000005865704
- 剑指Offer——复杂链表的复制
题目描述: 输入一个复杂链表(每个节点中有节点值,以及两个指针,一个指向下一个节点,另一个特殊指针指向任意一个节点),返回结果为复制后复杂链表的head.(注意,输出结果中请不要返回参数中的节点引用, ...