org.hibernate.cfg.AnnotationConfiguration报错

来源:互联网 发布:iphone mac 互传文件 编辑:程序博客网 时间:2024/06/10 18:49

Caused by: org.springframework.beans.BeanInstantiationException:


Could not instantiate bean class [org.hibernate.cfg.AnnotationConfiguration]: Constructor threw exception; nested exception is java.lang.NoSuchFieldError: INSTANCE


网上查找了原因,原来要到tomcat里的webapps里删掉项目的hibernate-annotations.jar;hibernate-commons-annotations.jar;保留hibernate3.jar就行了。


不过在myeclipse的文件夹只有hibernate3.jar。

在myeclipse里tomcatserver。重新Redeploy一次,webapp文件夹就要重复生成一次,得不停的删



0 0