为了账号安全,请及时绑定邮箱和手机立即绑定

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

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

Hopeonce 2016-03-18 11:11:32
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\webapporg.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)
查看完整描述

1 回答

?
HansonQ

TA贡献223条经验 获得超56个赞

参考我的一篇文章 http://www.imooc.com/article/4833

查看完整回答
反对 回复 2016-03-18
  • 1 回答
  • 0 关注
  • 2574 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信