搭建spring+springmvc+myBatis框架出现了如下错误,请教?

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.context.annotation.internalPersistenceAnnotationProcessor': Instantiation of bean failed; nested exception is java.lang.ClassFormatError: Absent Code attribute in method that is not native or abstract in class file javax/persistence/PersistenceContextType

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1076) ~[spring-beans-4.0.6.RELEASE.jar:4.0.6.RELEASE]

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1021) ~[spring-beans-4.0.6.RELEASE.jar:4.0.6.RELEASE]

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:504) ~[spring-beans-4.0.6.RELEASE.jar:4.0.6.RELEASE]

Caused by: java.lang.ClassFormatError: Absent Code attribute in method that is not native or abstract in class file javax/persistence/PersistenceContextType

at java.lang.ClassLoader.defineClass1(Native Method) ~[na:1.7.0_21]

at java.lang.ClassLoader.defineClass(ClassLoader.java:791) ~[na:1.7.0_21]

2016-03-18 10:54:07.917:WARN:oejw.WebAppContext:Failed startup of context o.e.j.w.WebAppContext{/,file:/H:/QDJWDZ/workspace/jw-wlf/jw-wlf-main/src/main/webapp/},H:\QDJWDZ\workspace\jw-wlf\jw-wlf-main\src\main\webapp

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.context.annotation.internalPersistenceAnnotationProcessor': Instantiation of bean failed; nested exception is java.lang.ClassFormatError: Absent Code attribute in method that is not native or abstract in class file javax/persistence/PersistenceContextType

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1076)

Caused by: 

java.lang.ClassFormatError: Absent Code attribute in method that is not native or abstract in class file javax/persistence/PersistenceContextType

at java.lang.ClassLoader.defineClass1(Native Method)

at java.lang.ClassLoader.defineClass(ClassLoader.java:791)


Hopeonce
浏览 2575回答 1
1回答

HansonQ

参考我的一篇文章 http://www.imooc.com/article/4833
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Java