facebook

Persistence classes not available at runtime

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #300139 Reply

    crispyoz
    Member

    I developed my application using java persistence. When I am coding I can import and make reference to any of the persistence classes I like, however when I run on the builtin MyEclipse Tomcat server (6) the application complains the persistence classes are not found:

    java.lang.NoClassDefFoundError: javax/persistence/Persistence

    Here is my code:

    EntityManagerFactory emfac = Persistence.createEntityManagerFactory(“trm”);[/color]EntityManager em = emfac.createEntityManager();
    CoreObject co = processLine();
    em.persist(co);
    em.close();
    emfac.close();

    Since I just installed 7.5 anew the server config should be the same as OOTB.

    Thanks

    Chris

    #300161 Reply

    Loyal Water
    Member

    I developed my application using java persistence.

    What kind of an application is this? Do you have the persistence jar on your project build path?

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: Persistence classes not available at runtime

You must be logged in to post in the forum log in