• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

No Persistence provider for EntityManager named eclipselinkjpa

 
Haseeb Yousaf
Greenhorn
Posts: 5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 754
Eclipse IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check your persistence xml where you have a name for your provider. Check where you use the EntityManager. The name will be different.
 
Haseeb Yousaf
Greenhorn
Posts: 5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic