spring3 hibernate3整合启动报错 求助@@!!! 50
报的三个错!-Exceptioninthread"main"org.springframework.beans.factory.BeanDefinitionStoreEx...
报的三个错!-Exception in thread "main" org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: file [C:\Users\Administrator\Desktop\WORK\ssh2\build\classes\Entity\Emp.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 [C:\Users\Administrator\Desktop\WORK\ssh2\build\classes\Entity\Emp.class]; nested exception is java.lang.IllegalArgumentException
2-----Caused by: 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 [C:\Users\Administrator\Desktop\WORK\ssh2\build\classes\Entity\Emp.class]; nested exception is java.lang.IllegalArgumentException
3----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:53)
我用的jdk7 ,spring3.2 hibernate3和4 都试了。在添加<context:component-scan base-package="Entity"></context:component-scan>就报错,不加不报错
main是ApplicationContext ctx=new ClassPathXmlApplicationContext("beans.xml");没其他操作
找到答案了~jdk版本和spring的jar包版本不合适~ 展开
2-----Caused by: 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 [C:\Users\Administrator\Desktop\WORK\ssh2\build\classes\Entity\Emp.class]; nested exception is java.lang.IllegalArgumentException
3----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:53)
我用的jdk7 ,spring3.2 hibernate3和4 都试了。在添加<context:component-scan base-package="Entity"></context:component-scan>就报错,不加不报错
main是ApplicationContext ctx=new ClassPathXmlApplicationContext("beans.xml");没其他操作
找到答案了~jdk版本和spring的jar包版本不合适~ 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询