Eclipse项目修改编译jdk版本(Failed to read candidate component class: file 处理)
转:
Failed to read candidate component class: file 处理
出错现象:
- org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: file [C:\apache-tomcat-7.0.59\webapps\a_ssm2\WEB-INF\classes\com\neusoft\entity\User.class]; nested exception is java.lang.IllegalArgumentException
- org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.findCandidateComponents(ClassPathScanningCandidateComponentProvider.java:281)
- org.springframework.context.annotation.ClassPathBeanDefinitionScanner.doScan(ClassPathBeanDefinitionScanner.java:242)
- org.springframework.context.annotation.ComponentScanBeanDefinitionParser.parse(ComponentScanBeanDefinitionParser.java:84)
- org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:73)
- org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1435)
- org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1425)
- org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:184)
- org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.doRegisterBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:140)
- org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:111)
- org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:493)
- org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:390)
- org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)
- org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)
- org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:174)
- org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:209)
- org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:180)
- org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:125)
- org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:94)
- org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:131)
- org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:537)
- org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:451)
- org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:647)
- org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:598)
- org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:661)
- org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:517)
- org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:458)
- org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:138)
- javax.servlet.GenericServlet.init(GenericServlet.java:158)
- org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504)
- org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
- org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
- org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421)
- org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1074)
- org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
- org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:314)
- java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
- java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
- org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
- java.lang.Thread.run(Thread.java:745)
root cause
- java.lang.IllegalArgumentException
- org.springframework.asm.ClassReader.<init>(Unknown Source)
- org.springframework.asm.ClassReader.<init>(Unknown Source)
- org.springframework.asm.ClassReader.<init>(Unknown Source)
- org.springframework.core.type.classreading.SimpleMetadataReader.<init>(SimpleMetadataReader.java:52)
- org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:80)
- org.springframework.core.type.classreading.CachingMetadataReaderFactory.getMetadataReader(CachingMetadataReaderFactory.java:101)
- org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.findCandidateComponents(ClassPathScanningCandidateComponentProvider.java:257)
- org.springframework.context.annotation.ClassPathBeanDefinitionScanner.doScan(ClassPathBeanDefinitionScanner.java:242)
- org.springframework.context.annotation.ComponentScanBeanDefinitionParser.parse(ComponentScanBeanDefinitionParser.java:84)
- org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:73)
- org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1435)
- org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1425)
- org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:184)
- org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.doRegisterBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:140)
- org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:111)
- org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:493)
- org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:390)
- org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)
- org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)
- org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:174)
- org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:209)
- org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:180)
- org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:125)
- org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:94)
- org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:131)
- org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:537)
- org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:451)
- org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:647)
- org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:598)
- org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:661)
- org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:517)
- org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:458)
- org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:138)
- javax.servlet.GenericServlet.init(GenericServlet.java:158)
- org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504)
- org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
- org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
- org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421)
- org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1074)
- org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
- org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:314)
- java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
- java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
- org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
- java.lang.Thread.run(Thread.java:745)
原因:spring3.2版本不支持jdk1.8,只能到jdk1.7;大概是asm有问题。
处理:
1、安装jdk1.7;
2、修改项目的编译级别为1.7 ;
3、修改项目facets的java为1.7版本;
4、修该tomcat服务器使用的jre
5、重新部署项目,应该就可以了。
Eclipse项目修改编译jdk版本(Failed to read candidate component class: file 处理)的更多相关文章
- SSM项目启动报错:Failed to read candidate component class
SSM项目启动报错:Failed to read candidate component class 换成3.1又没有问题,换成3.2又不行,查看编译环境用的是1.8,将1.8降为1.7,问题解决,服 ...
- org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: file [/Users/lonecloud/tomcat/apache-tomcat-7.0.70 2/webapps/myproject/WEB-INF/classes/cn/lone
解决这个报错的解决办法: org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidat ...
- eclipse项目导入idea jdk版本不一致😵
在导入eclipse项目到idea过程中遇到 Imported project refers to unkonwn jdks JavaSE-1.8 解决方法: file --> Project ...
- Spring+Mybatis整合时 Failed to read candidate component class,Caused by:IllegalArgumentException
Spring+Mybatis整合时Caused by: java.lang.IllegalArgumentException错误 org.springframework.beans.factory.B ...
- SpringMVC错误:Failed to read candidate component class:file... ...
Failed to read candidate component class:file错误分析和处理 org.springframework.beans.factory.BeanDefinitio ...
- spring在扫描包中的注解类时出现Failed to read candidate component错误
出现:org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate componen ...
- spring 启动异常Failed to read candidate component class
Exception in thread "main" org.springframework.beans.factory.BeanDefinitionStoreException: ...
- Failed to read candidate component class错误分析
org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component c ...
- spring3.2.0与mybatis3.2.7整合出错--Failed to read candidate component class--nested exception is java.lang.IllegalArgumentException
错误信息如下: org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate com ...
随机推荐
- sleep() 和 wait() 有什么区别?(未完成)
sleep() 和 wait() 有什么区别?(未完成)
- IIS设置网站为HTTPS并且将HTTP重定向到HTTPS
第一步:下载证书,导入证书到IIS https://help.aliyun.com/knowledge_detail/95502.html 站点绑定https 第二部:安装URL重写模块 rewrit ...
- [WebMethod]参数介绍
一.WebService的调试 net 2.0新建webservice为了安全考虑,默认关闭了Post和Get方法 .让其打开,可在Web.config文件的<system.web>下增加 ...
- BZOJ 4318 OSU! (概率DP)
题意 中文题面,难得解释了 题目传送门 分析 考虑到概率DPDPDP,显然可以想到f(i,j)f(i,j)f(i,j)表示到第iii位末尾有jjj个111的期望值.最后输出f(n+1,0)f(n+1, ...
- Python 10--模块
可以在模块中,直接使用__file__,识别出该模块文件的路径. print __file__
- 003转载----C#打开网页
作者:微wx笑 来源:CSDN 原文:https://blog.csdn.net/testcs_dn/article/details/42246969 版权声明:本文为博主原创文章,转载请附上博文链接 ...
- scapy2 爬取全站,以及使用post请求
前情提要: 一:scrapy 爬取妹子网 全站 知识点: scrapy回调函数的使用 二: scrapy的各个组件之间的关系解析 Scrapy 框架 Scrapy是用纯Python实现一个为了爬取网 ...
- [Luogu] 高斯消元法
https://www.luogu.org/problemnew/show/P3389 模拟,消元 #include <bits/stdc++.h> #define DB double ; ...
- [Qt Quick] No rule to make target 问题解决办法
[问题描述] 修改项目中资源的qml文件名或删除无用资源文件后,重新构建项目时,会出现类似如下的问题提示: No rule to make target 'aaa', needed by 'bbb'. ...
- 基于ARM的SoC设计入门[转]
原文:基于ARM的SoC设计入门 我们跳过所有对ARM介绍性的描述,直接进入工程师们最关心的问题.要设计一个基于ARM的SoC,我们首先要了解一个基于ARM的SoC的结构.图1是一个典型的SoC的结构 ...