[img]http://dl.iteye.com/upload/picture/pic/127727/f18218d3-ee7f-3f5c-86cd-ea27caaa957c.png[/img]
缺少:hibernate-jpa-2.0-api-1.0.0.Final.jar
Exception in thread "main" java.lang.NoClassDefFoundError: javax/persistence/EntityListeners
at org.hibernate.cfg.annotations.reflection.JPAMetadataProvider.getDefaults(JPAMetadataProvider.java:96)
at org.hibernate.annotations.common.reflection.java.JavaReflectionManager.getDefaults(JavaReflectionManager.java:226)
at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1385)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1856)
at Application.main(Application.java:20)
Caused by: java.lang.ClassNotFoundException: javax.persistence.EntityListeners
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
... 5 more
缺少:hibernate-jpa-2.0-api-1.0.0.Final.jar