This forum is now a read-only archive. All commenting, posting, registration services have been turned off. Those needing community support and/or wanting to ask questions should refer to the Tag/Forum map, and to http://spring.io/questions for a curated list of stackoverflow tags that Pivotal engineers, and the community, monitor.

when i start it to the server i have this error :
2012-02-28 11:29:47,259 [Thread-10] ERROR DataNucleus.Persistence - Error : An error occurred trying to instantiate an instance of the API adapter "org.datanucleus.api.jpa.JPAAdapter" (perhaps you dont have the requisite datanucleus-api-XXX jar in the CLASSPATH, or the api jar for the persistence spec you are using?) : {1}

all the dependency already existing in my CLASSPATH
so can some one help me please !!!

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:
org.datanucleus.jpa.PersistenceProviderImpl
at javax.persistence.Persistence.createEntityManagerF actory(Persistence.java:180)
at javax.persistence.Persistence.createEntityManagerF actory

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:
view plaincopy to clipboardprint?
<!-- INCORRECT -->
<provider>org.datanucleus.jpa.EntityManagerFactory Impl</provider>

The correct entry for this application should have been:
view plaincopy to clipboardprint?
<provider>org.datanucleus.jpa.PersistenceProviderI mpl</provider>

Comment

in the CLASSPATH i have "datanucleus-api-jpa-3.0.6.jar" and the class provider "org.datanucleus.api.jpa.PersistenceProviderIm pl" has already exist so i don't know were is the problem , so can some one help me please ?

Comment

i use datanucleus V2 to resolve this error but now i have a new bug :
ERROR DataNucleus.MetaData - Found Meta-Data for class com.ex.Employee but this class is not enhanced!! Please enhance the class before running DataNucleus.
org.datanucleus.exceptions.NucleusUserException: Found Meta-Data for class com.ex.Employee but this class is not enhanced!! Please enhance the class before running DataNucleus.