Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8045103
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T05:26:23+00:00 2026-06-05T05:26:23+00:00

I am using eclipse + eclipselink + maven2 + mysql + jpa 2.0 +

  • 0

I am using eclipse + eclipselink + maven2 + mysql + jpa 2.0 + java SE.

I can create MySQL tables from the Entity classes with Eclipse. The persistence.xml is in src/main/resources/META-INF/…

I also has database connections specified in eclipse for production and testing. Either one is chosen with the project and seems to work.

Depending which data source is used with the project, the tables are created to selected database. What is in the persistence.xml as database connection details is ignored (not sure what to expect). Also if I right click on the persistence.xml and select ‘JPA Tools’ > ‘Synchronize Class List’. The file gets updated with the entity classes.

The persistence.xml is also required or else the tables will not be created in either of the databases. (Tested by renaming the file)

Earlier I was also able to execute some DAO-methods for testing by putting in and loading stuff. Also there was a menu item in eclipse package explorer named ‘JPA’, listing the JPA entities in the project, which no longer exists.

I made no changes on the project (only closed the computer for night). The next time the project was opened, I was no longer able to perform any of the DAO-methods and I get the following error:

No Persistence provider for EntityManager named xxx

The same error comes for the main class having DAO-methods, JUnit test ran by Eclipse and the same tests executed by Maven.

Note: I am still able to create the tables from entities.

Any advice?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T05:26:25+00:00Added an answer on June 5, 2026 at 5:26 am

    The problem was in the pom.xml.

    I had the dependency for hibernate as eclipselink was needed.

    WRONG: This is what I Had

    <dependency>
      <groupId>org.hibernate</groupId>
      <artifactId>hibernate-entitymanager</artifactId>
      <version>4.1.3.Final</version>
    </dependency>
    

    RIGHT: It was suppose to be

    <dependency>
      <groupId>org.eclipse.persistence</groupId>
      <artifactId>eclipselink</artifactId>
      <version>2.0.0</version>
      <scope>compile</scope>
    </dependency>
    

    I got the solution by purely testing everything possible. Not sure even how I managed to try the substitution as I was able to perform test with the same pom & project earlier.

    None of the errors or how it was functioning did not suggest it could be somewhat wrong.

    Not even sure that’s completely right, but at least it works again.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working in a java project using eclipse, eclipseLink, java persistence API (JPA) and
I'm using eclipse persistence jpa with OracleDriver and I can't get why it shows
Using Eclipse 3.6.1 Java 1.6.0_26 JMockit 0.999.10 UPDATE: I was able to create a
I am using EclipseLink as JPA Provider. I want Eclipse Link to Generate my
I am using JPA 2.0. (EclipseLink 2.0.2) If an entity contains relations, for example:
I have a Spring-Roo project set up using Eclipse link for my JPA persistence
I am using JPA for a java class and having trouble putting the persistence
I'm using Eclipse Ganymede to create a web application, but the project's currently just
I am using Eclipse & JDE 4.5.0 plug-in. How to align fields vertically. Can
Using Eclipselink/MOXy 2.3 i have following usecase in marshalling to XML: abstract class MyAbstract

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.