我试图使用jpa2.0 hibernate 4.2.16从实体生成表格,我收到了此错误
Exception in thread "main" java.lang.NoClassDefFoundError: org/hibernate/proxy/EntityNotFoundDelegate
at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:57)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:63)
at org.eclipse.jpt.eclipselink.core.ddlgen.Main.execute(Main.java:76)
at org.eclipse.jpt.eclipselink.core.ddlgen.Main.main(Main.java:64)
Caused by: java.lang.ClassNotFoundException: org.hibernate.proxy.EntityNotFoundDelegate
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 4 more
我的图书馆包含:
hibernate-jpa-2.0-api-1.0.1.Final.jar和hibernate-entitymanager-4.2.16.Final.jar