异常解决[ asm ClassReader failed to parse class file]

简介:     异常解决[ asm  ClassReader failed to parse class file]   15:56:17,364 []-[DEBUG] Resolved location pattern [classpath*:com/baoy/**/*.

 

  异常解决[ asm  ClassReader failed to parse class file]

 

15:56:17,364 []-[DEBUG] Resolved location pattern [classpath*:com/baoy/**/*.class] to resources [file [D:\cache\eclipse4mvn-workplace\DubboDemo\target\classes\com\baoy\base\dao\JdbcTempBaseDao.class], file [D:\cache\eclipse4mvn-workplace\DubboDemo\target\classes\com\baoy\bean\User.class], file [D:\cache\eclipse4mvn-workplace\DubboDemo\target\classes\com\baoy\dao\impl\UserDaoImpl$1.class], file [D:\cache\eclipse4mvn-workplace\DubboDemo\target\classes\com\baoy\dao\impl\UserDaoImpl$UserRowMapper.class], file [D:\cache\eclipse4mvn-workplace\DubboDemo\target\classes\com\baoy\dao\impl\UserDaoImpl.class], file [D:\cache\eclipse4mvn-workplace\DubboDemo\target\classes\com\baoy\dao\UserDao.class], file [D:\cache\eclipse4mvn-workplace\DubboDemo\target\classes\com\baoy\main\Start.class], file [D:\cache\eclipse4mvn-workplace\DubboDemo\target\classes\com\baoy\service\impl\UserServiceImpl.class], file [D:\cache\eclipse4mvn-workplace\DubboDemo\target\classes\com\baoy\service\UserService.class]]
Exception in thread "main" org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: file [D:\cache\eclipse4mvn-workplace\DubboDemo\target\classes\com\baoy\base\dao\JdbcTempBaseDao.class]; nested exception is org.springframework.core.NestedIOException: ASM ClassReader failed to parse class file - probably due to a new Java class file version that isn't supported yet: file [D:\cache\eclipse4mvn-workplace\DubboDemo\target\classes\com\baoy\base\dao\JdbcTempBaseDao.class]; nested exception is java.lang.IllegalArgumentException
	at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.findCandidateComponents(ClassPathScanningCandidateComponentProvider.java:290)
	at org.springframework.context.annotation.ClassPathBeanDefinitionScanner.doScan(ClassPathBeanDefinitionScanner.java:242)
	at org.springframework.context.annotation.ComponentScanBeanDefinitionParser.parse(ComponentScanBeanDefinitionParser.java:84)
	at org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:73)
	at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1438)
	at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1428)
	at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:195)
	at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.doRegisterBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:139)
	at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:108)
	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:493)
	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:390)
	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)
	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)
	at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:174)
	at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:209)
	at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:180)
	at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:243)
	at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:127)
	at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:93)
	at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130)
	at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:537)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:451)
	at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
	at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93)
	at com.baoy.main.Start.main(Start.java:16)
Caused by: org.springframework.core.NestedIOException: ASM ClassReader failed to parse class file - probably due to a new Java class file version that isn't supported yet: file [D:\cache\eclipse4mvn-workplace\DubboDemo\target\classes\com\baoy\base\dao\JdbcTempBaseDao.class]; nested exception is java.lang.IllegalArgumentException
	at org.springframework.core.type.classreading.SimpleMetadataReader.<init>(SimpleMetadataReader.java:56)
	at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:80)
	at org.springframework.core.type.classreading.CachingMetadataReaderFactory.getMetadataReader(CachingMetadataReaderFactory.java:102)
	at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.findCandidateComponents(ClassPathScanningCandidateComponentProvider.java:266)
	... 24 more
Caused by: java.lang.IllegalArgumentException
	at org.springframework.asm.ClassReader.<init>(Unknown Source)
	at org.springframework.asm.ClassReader.<init>(Unknown Source)
	at org.springframework.asm.ClassReader.<init>(Unknown Source)
	at org.springframework.core.type.classreading.SimpleMetadataReader.<init>(SimpleMetadataReader.java:53)
	... 27 more

 

 “ASM ClassReader failed to parse class file”是其中主要的原因。检查Maven的类库,没有发现问题,无asm显性依赖,其依赖产生于spring本身。

 

   a.  使用jdk7   

   b.  升级spring 4

 

本人使用 jdk1.8 spring 使用时很早之前的demo spring- 3.1.12.RELEASE  ,修改 spring 版本为 4.3.12.RELEASE之后,问题解决

 

 

 

 

 

 

 

 

 

 

 

 

 

捐助开发者 

在兴趣的驱动下,写一个免费的东西,有欣喜,也还有汗水,希望你喜欢我的作品,同时也能支持一下。 当然,有钱捧个钱场(支持支付宝和微信 以及扣扣群),没钱捧个人场,谢谢各位。

 

个人主页http://knight-black-bob.iteye.com/



 
 
 谢谢您的赞助,我会做的更好!

目录
相关文章
|
2月前
|
Docker 容器
ADD failed: file not found in build context or excluded by .dockerignore: stat irap_rule_center: fil
ADD failed: file not found in build context or excluded by .dockerignore: stat irap_rule_center: fil
成功解决:Failed to load resource: net::ERR_FILE_NOT_FOUND
这篇文章提供了解决"Failed to load resource: net::ERR_FILE_NOT_FOUND"错误的步骤,通过修改配置文件中的资源路径设置为相对路径"./"来成功运行打包后的项目。
成功解决:Failed to load resource: net::ERR_FILE_NOT_FOUND
|
前端开发
【前端异常】Module build failed: Error: ENOENT: no such file or directory, scandir ‘G:\OPWeb\public\node_m
【前端异常】Module build failed: Error: ENOENT: no such file or directory, scandir ‘G:\OPWeb\public\node_m
185 0
|
6月前
|
Java 应用服务中间件
完美解决tomcat启动异常:Invalid byte tag in constant pool: 19;Unable to process Jar entry [module-info.class]
完美解决tomcat启动异常:Invalid byte tag in constant pool: 19;Unable to process Jar entry [module-info.class]
1236 0
成功解决:ERROR StatusLogger No log4j2 configuration file found.
成功解决:ERROR StatusLogger No log4j2 configuration file found.
【问题】Log writing failed, No space left on device @ io_write - /mnt/project/log/development.log
【问题】Log writing failed, No space left on device @ io_write - /mnt/project/log/development.log
180 0
【问题】Log writing failed, No space left on device @ io_write - /mnt/project/log/development.log
|
Oracle 关系型数据库 Linux
Alert 日志报错:ORA-2730x OS Failure Message: No Buffer Space Available
今天巡检遇到数据库报错 ORA-2730x 错误,数据库版本为Oracle 11204 (x86_64),错误日志如下:
Alert 日志报错:ORA-2730x OS Failure Message: No Buffer Space Available
|
Android开发
打包时Resource is out of sync with the file system 报错问题
打包时Resource is out of sync with the file system 报错问题
164 0
打包错误--Error:A problem was found with the configuration of task ':app:packageRelease'.
解决办法: app目录下的build.gradle文件 将 shrinkResources 的值改为 false 或者直接去掉   shrinkResources true  表示 :打包的时候会去删除一些不必要 的文件   ------------------------------------- 问题是以往打包一直没出过这样的问题,根本原因不知。
1597 0
|
网络协议 Java 容器
【报错】项目启动,仅仅报错 One or more listeners failed to start. Full details will be found in the appropriate container log file
今天spring4.3.13 项目,整合ActiveMQ的时候,项目启动在自动部署到tomcat下的时候,不能正常的部署,仅仅报错如下: Connected to server [2017-12-08 03:57:12,428] Artifact springDemo:war exploded: Artifact is being deployed, please wait.
6314 0