aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes No Persistence provider for EntityManager named eclipselinkjpa Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "No Persistence provider for EntityManager named eclipselinkjpa" Watch "No Persistence provider for EntityManager named eclipselinkjpa" New topic
Author

No Persistence provider for EntityManager named eclipselinkjpa

Haseeb Yousaf
Greenhorn

Joined: Oct 31, 2011
Posts: 5
I am working on a project that involves Eclipselink Persistence JPA. The project is working fine when I run it normally. The problem starts when I try to profile one of the test cases in netbeans, I get this error

warning: The following options were not recognized by any processor: '[eclipselink.canonicalmodel.use_static_factory]'
warning: Implicitly compiled files were not subject to annotation processing.
Use -implicit to specify a policy for implicit compilation.
Note: /Users/haseebyousaf/NetBeansProjects/OpenJPA_Gvault/src/TestQueries/Q1Test.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 warning
Profiler Agent: Initializing...
Profiler Agent: Options: >/Applications/NetBeans/NetBeans 7.0.app/Contents/Resources/NetBeans/profiler/lib,5140,10<
Profiler Agent: Initialized successfully
Profiler Agent: Waiting for connection on port 5140, timeout 10 seconds (Protocol version: 11)
Profiler Agent: Established connection with the tool
Profiler Agent: Local accelerated session
*** Profiler engine warning: class sun.reflect.GeneratedConstructorAccessor1 that should be instrumented is not loaded by target VM
*** Requested classloader: sun.reflect.DelegatingClassLoader@58ecb281, its class = class sun.reflect.DelegatingClassLoader, index = 2, hashcode = 1491907201
*** Profiler engine warning: target VM cannot load class to instrument sun.reflect.GeneratedConstructorAccessor1
*** probably it has been unloaded recently
Profiler Agent: Redefining 100 classes at idx 0, out of total 581
Profiler Agent: Redefining 100 classes at idx 100, out of total 581
Profiler Agent: Redefining 100 classes at idx 200, out of total 581
Profiler Agent: Redefining 100 classes at idx 300, out of total 581
Profiler Agent: Redefining 100 classes at idx 400, out of total 581
Profiler Agent: Redefining 81 classes at idx 500, out of total 581
Exception in thread "main" javax.persistence.PersistenceException: No Persistence provider for EntityManager named eclipselink
at javax.persistence.Persistence.createEntityManagerFactory(Unknown Source)
at javax.persistence.Persistence.createEntityManagerFactory(Unknown Source)
at TestQueries.Q1Test.main(Q1Test.java:27)

I am trying to use the memory analyzer for check the memory consumption of eclipse link but unfortunately its not working,,
Any help would be appreciated
thanks
Hebert Coelho
Ranch Hand

Joined: Jul 14, 2010
Posts: 754

Check your persistence xml where you have a name for your provider. Check where you use the EntityManager. The name will be different.


[uaiHebert.com] [Full WebApplication JSF EJB JPA JAAS with source code to download] One Table Per SubClass [Web/JSF]
Haseeb Yousaf
Greenhorn

Joined: Oct 31, 2011
Posts: 5
HI Hebert Coelho,,
I guess you did not understand the question correctly. The program runs fine during the normal execution. This error comes when I try to profile the program to check the memory consumption.
I hope that helps, thanks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: No Persistence provider for EntityManager named eclipselinkjpa