Spring3.2 and JDK 8 run in conflict, spring3.2jdk 8
Solution:Replace the jar package of Spring Framework with Spring4.0.
// Conflict between spring 3.2 and jdk1.8
Error Log:
Org. springframework. beans. factory. BeanDefinitionStoreException:Failed to read candidate component class:File [D: \ projects \ mybatis-spring \ bin \ cn \ chen \ ssm \ mapper \ ItemsMapper. class]; nested exception is java. lang. IllegalArgumentException
At org. springframework. context. annotation. ClassPathScanningCandidateComponentProvider. findCandidateComponents (ClassPathScanningCandidateComponentProvider. java: 281)
At org. springframework. context. annotation. classpathbeandefinitiondetail. doScan (classpathbeandefinitiondetail. java: 242)
At org. mybatis. spring. mapper. classpathmapperscan. doScan (classpathmapperscan. java: 155)
At org. springframework. context. annotation. classpathbeandefinitiondetail. scan (classpathbeandefinitiondetail. java: 220)
At org. mybatis. spring. mapper. MapperScannerConfigurer. postProcessBeanDefinitionRegistry (MapperScannerConfigurer. java: 315)
At org. springframework. context. support. AbstractApplicationContext. invokeBeanFactoryPostProcessors (AbstractApplicationContext. java: 630)
At org. springframework. context. support. AbstractApplicationContext. refresh (AbstractApplicationContext. java: 461)
At org. springframework. context. support. ClassPathXmlApplicationContext. <init> (ClassPathXmlApplicationContext. java: 139)
At org. springframework. context. support. ClassPathXmlApplicationContext. <init> (ClassPathXmlApplicationContext. java: 83)
At cn. chen. ssm. mapper. ItemsMapperTest. setUp (ItemsMapperTest. java: 16)
At sun. reflect. NativeMethodAccessorImpl. invoke0 (Native Method)
At sun. reflect. NativeMethodAccessorImpl. invoke (Unknown Source)
At sun. reflect. DelegatingMethodAccessorImpl. invoke (Unknown Source)
At java. lang. reflect. Method. invoke (Unknown Source)
At org. junit. runners. model. FrameworkMethod $1. runReflectiveCall (FrameworkMethod. java: 44)
At org. junit. internal. runners. model. ReflectiveCallable. run (ReflectiveCallable. java: 15)
At org. junit. runners. model. FrameworkMethod. invokeExplosively (FrameworkMethod. java: 41)
At org. junit. internal. runners. statements. RunBefores. evaluate (RunBefores. java: 27)
At org. junit. runners. ParentRunner. runLeaf (ParentRunner. java: 263)
At org. junit. runners. BlockJUnit4ClassRunner. runChild (BlockJUnit4ClassRunner. java: 69)
At org. junit. runners. BlockJUnit4ClassRunner. runChild (BlockJUnit4ClassRunner. java: 48)
At org. junit. runners. ParentRunner $ 3.run( ParentRunner. java: 231)
At org. junit. runners. ParentRunner $1. schedule (ParentRunner. java: 60)
At org. junit. runners. ParentRunner. runChildren (ParentRunner. java: 229)
At org. junit. runners. ParentRunner. access $000 (ParentRunner. java: 50)
At org. junit. runners. ParentRunner $2. evaluate (ParentRunner. java: 222)
At org. junit. runners. ParentRunner. run (ParentRunner. java: 292)
At org. eclipse. jdt. internal. junit4.runner. JUnit4TestReference. run (JUnit4TestReference. java: 86)
At org. eclipse. jdt. internal. junit. runner. TestExecution. run (TestExecution. java: 38)
At org. eclipse. jdt. internal. junit. runner. RemoteTestRunner. runTests (RemoteTestRunner. java: 459)
At org. eclipse. jdt. internal. junit. runner. RemoteTestRunner. runTests (RemoteTestRunner. java: 675)
At org. eclipse. jdt. internal. junit. runner. RemoteTestRunner. run (RemoteTestRunner. java: 382)
At org. eclipse. jdt. internal. junit. runner. RemoteTestRunner. main (RemoteTestRunner. java: 192)
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: 52)
At org. springframework. core. type. classreading. SimpleMetadataReaderFactory. getMetadataReader (SimpleMetadataReaderFactory. java: 80)
At org. springframework. core. type. classreading. CachingMetadataReaderFactory. getMetadataReader (CachingMetadataReaderFactory. java: 101)
At org. springframework. context. annotation. ClassPathScanningCandidateComponentProvider. findCandidateComponents (ClassPathScanningCandidateComponentProvider. java: 257)
... 32 more