Myeclipse 8.6写一个SSH的项目,出现了一下错误
Exception in thread "main" java.lang.NoSuchMethodError: javax.persistence.OneToOne.orphanRemoval()Z
at org.hibernate.cfg.AnnotationBinder.processElementAnnotations(AnnotationBinder.java:1639)
at org.hibernate.cfg.AnnotationBinder.processIdPropertiesIfNotAlready(AnnotationBinder.java:766)
at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:685)
at org.hibernate.cfg.Configuration$MetadataSourceQueue.processAnnotatedClassesQueue(Configuration.java:3443)
at org.hibernate.cfg.Configuration$MetadataSourceQueue.processMetadata(Configuration.java:3397)
at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1341)
at org.hibernate.cfg.Configuration.generateDropSchemaScript(Configuration.java:931)
at org.hibernate.tool.hbm2ddl.SchemaExport.<init>(SchemaExport.java:188)
at org.hibernate.tool.hbm2ddl.SchemaExport.<init>(SchemaExport.java:156)
at ModelTest.main(ModelTest.java:9)
解决方法:直接去打开javaee.jar,删除persistence目录,成功了
转载自:http://kinglixing.blog.51cto.com/3421535/639125
本文详细介绍了如何解决使用MyEclipse8.6开发SSH项目时遇到的java.lang.NoSuchMethodError错误,通过直接删除javaee.jar中的persistence目录成功解决问题。
263

被折叠的 条评论
为什么被折叠?



