Win a copy of Rust Web Development this week in the Other Languages forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

Please tell me I have a typo in my Persistence.xml

 
Ranch Hand
Posts: 300
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Right I have been banging my head against the wall trying to get a simple EntityManagerFactory created.



To try to get an EntityManagerFactory I do:



My persistence.xml is in a META-INF directory and I have tried both using the project as is in eclipse and packaging it all into a jar.
No matter what I try I get:

javax.persistence.PersistenceException: No Persistence provider for EntityManager named my-app

I have written a simple JDBC program with the same db details and that connects. So nothing wrong with my DB,.
So what's up?

Note: I am using eclipselink

Cheers.
 
Luke Murphy
Ranch Hand
Posts: 300
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Resolved. I only had the javax.persistence_x jar that comes as part of the
eclipselink install. I was missing the eclipselink.jar.

 
Bartender
Posts: 2700
IntelliJ IDE Opera
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You do understand that javax.persistence aka JPA is a specification and that eclipselink is an implementation of that specification?
 
Luke Murphy
Ranch Hand
Posts: 300
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Wouter Oet wrote:You do understand that javax.persistence aka JPA is a specification and that eclipselink is an implementation of that specification?


Correct. As is hibernate. You need an implementation on your classpath. I was looking for the simpliest in terms of configuration and footprint.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic