ERROR [org.springframework.web.context.ContextLoader] - Context initialization failed

在spring3.0.2与jdk1.8整合时出现一下异常:

2015-11-23 17:46:38,102 ERROR [org.springframework.web.context.ContextLoader] - Context initialization failed
org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: file [Xxx.class]; nested exception is java.lang.ArrayIndexOutOfBoundsException: 88979
	at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.findCandidateComponents(ClassPathScanningCandidateComponentProvider.java:237)
	at org.springframework.context.annotation.ClassPathBeanDefinitionScanner.doScan(ClassPathBeanDefinitionScanner.java:204)
	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
。。。
发现,将代码中的Lambda表达式换成标准的java语句,代码运行正常。


揣测:在Spring3.0.2做依赖注入时,直接对编译产生的二进制class文件,在类被加载入Java虚拟机之前动态改变其行为,但是却无法正确解析Lambda表达式,所以出现上诉异常。









你可能感兴趣的:(ERROR [org.springframework.web.context.ContextLoader] - Context initialization failed)