java.lang.NoClassDefFoundError: javax/persistence/Persistence

前端 未结 5 1885
眼角桃花
眼角桃花 2020-12-19 21:15

i\'m using Netbeans 6.8 and build simple Maven web application project.

create Entity and main file for persist Entity [also create persist unit] and use EclipsLink.

5条回答
  •  醉酒成梦
    2020-12-19 21:56

    for maven quickstart artifacts:-

    This problems generally occures when there is no hibernate-jpa-2.0-api jar in classpath so first add this jar in your classpath. if still you are getting excption then go to C:\Users\(system user name)\.m2\repository\org\hibernate; delete folder javax. after that again download jars from pom.xml it will work.

    for webapp:--

    first make sure hibernate-jpa-2.0-api jar downloaded and it is available in your build path. after that right click on project-->Build Path--->configure build path--->deployment Assembly--->Add--->java build path entries--->select the available jar(hibernate-jpa-2.0-api)--->next--->finish.

提交回复
热议问题