• 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

Working with DataNucleus: How I solved the "No persistence providers available" problem.

author and cow tipper
Posts: 5000
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I just published an article to TheServerSide that discusses how to set up and configure your development environment to use DataNucleus as the Java Persistence API (JPA) provider. I've linked to this thread from the article, hoping anyone who is having trouble running the example might post their question here and take advantage of the big brains that make up the JavaRanch community.

Anyways, the darnedest thing about putting together the tutorial was that during the writing, I kept getting this annoying error that said:

Exception in thread "main" javax.persistence.PersistenceException:
No persistence providers available for "PU" after trying the following discovered implementations:
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:180)
at javax.persistence.Persistence.createEntityManagerFactory

Anyways, I saw a few posts on the issue, but no solutions. I knew it had to be a simple mistake, and sure enough, it was. I had the incorrect entry in my persistence.xml file:

The correct entry for this application should have been:

The full persistence.xml file looked like this:

Anyways, that fixed it, just in case anyone is having a similar issue.

-Cameron McKenzie
Ranch Hand
Posts: 633
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to connect to HBase using JBoss 7.0.2 and data nucleus 3.0.2 and till now no success.

We don't have time to be charming! Quick, read this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!