The error message is as follows:
Org.springframework.beans.factory.BeanDefinitionStoreException:Failed to read candidate componentclass: File [D:\myworkspace\javaweb\20160530-spring_mybatis\bin\com\dzq\ssm\mapper\UserMapper.class]; Nested exception is java.lang.IllegalArgumentException at Org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.findCandidateComponents ( Classpathscanningcandidatecomponentprovider.java:281) at Org.springframework.context.annotation.ClassPathBeanDefinitionScanner.doScan ( Classpathbeandefinitionscanner.java:242) at Org.mybatis.spring.mapper.ClassPathMapperScanner.doScan (Classpathmapperscanner.java:155) at Org.springframework.context.annotation.ClassPathBeanDefinitionScanner.scan ( Classpathbeandefinitionscanner.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 Com.dzq.ssm.test.UserMapperTest.setUp (Usermappertest.java:18) 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.invo Ke (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$(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:50) at Org.eclipse.jdt.internal.junit.runner.TestExecution.run (Testexecution.java:38) at Org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests (Remotetestrunner.java:55X) 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) ... More
Cause of Error:
Solution:
Replace jdk1.8.20 with jdk1.7, and you'll be able to run it.
spring3.2.0 and mybatis3.2.7 Integration error--failed to read candidate component class--nested exception are Java.lang.IllegalArgumentException