距离上一篇博客已经很久了,在之前学习java8新特性的stream时,想要将其引入到现在公司的项目中,jdk是1.8,项目也是java8,stream的使用在代码中并不报错,测试类也可以正常使用,但是在启动项目的时候就会报错。那段时间任务比较多就暂时将这个报错搁置了,这几天轻松了一些便开始解决这个问题。
BeanDefinitionStoreException:ArrayIndexOutOfBoundsException
项目报错问题如下:
①server中的报错代码:
11-Jan-2019 10:36:24.983 严重 [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina.core.StandardContext.startInternal One or more Filters failed to start. Full details will be found in the appropriate container log file
11-Jan-2019 10:36:24.983 严重 [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina.core.StandardContext.startInternal Context [/xxx] startup failed due to previous errors
②Tomcat LocalHost Log报错:
org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: file [xxx.class]; nested exception is java.lang.ArrayIndexOutOfBoundsException: 25960
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(BeanDefinitionParserDelegate.java:1335)
at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1325)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:135)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:93)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:493)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doL