Search code examples
javaeclipsejpaeclipselink

import javax.persistence.EntityManager error


I have copied my project from pc to other and i got error

  1. import javax.persistence.EntityManager; importjavax.persistence.EntityManagerFactory; import javax.persistence.Persistence; import javax.persistence.Query;

the compiler doesn't know them, in the lib folder i added 3 jar from the local pc derby.jar eclipselink.jar and also javax.persistence_2.0.4.v201112161009.jar

what could be the reason


Solution

  • add two more Jar's that are

    toplink-essentials.jar
    toplink-essentials-agent.jar
    

    Add this external jars to your project