Spring版本过低问题

来源:互联网 发布:泰安优化公司 编辑:程序博客网 时间:2024/05/01 18:30
  1.  环境信息:
    1. Spring 3.2.10,  JDK 1.8, hibernate 4
  2. 错误提示

Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: file [D:\NewWorkSpace\ep-user\target\test-classes\org\homework\ep\user\base\BaseTest.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:\NewWorkSpace\ep-user\target\test-classes\org\homework\ep\user\base\BaseTest.class]; nested exception is java.lang.IllegalArgumentException  

    at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.findCandidateComponents(ClassPathScanningCandidateComponentProvider.java:290)  

..............

  1. 问题分析
    1. ASM ClassReader failed to parse class file”黄色高亮是其中主要的原因。
    2. 原因是,如果使用JDK8,那么springJAR包最低版本为4.0以上!
  2. 解决方案
    1. 使用jdk7   
    2. 升级Springjar包为4.0以上!
1 0