• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem in using JPA with Axis 2 web service provider

 
Kshitiz Agarwal
Ranch Hand
Posts: 36
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am trying to use JPA in axis 2 web service producer but the I am getting the error:

**No Persistence provider for EntityManager**

Now, I have placed my persistence.xml in JPAcontent and web-inf/classes/meta-inf. Moreover, when I test my web service class by calling its respective method locally, it is running fine. Where do we have to place persistence.xml in case if axis2 project?
 
Bill Gorder
Bartender
Posts: 1682
7
Android IntelliJ IDE Linux Mac OS X Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you have a <provider> tag in your persistence.xml? It seems you do not have a persistence provider defined.
 
Kshitiz Agarwal
Ranch Hand
Posts: 36
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bill Gorder wrote:Do you have a <provider> tag in your persistence.xml? It seems you do not have a persistence provider defined.


I did.....this is the provider:

<provider>oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider</provider>
 
James Sutherland
Ranch Hand
Posts: 553
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also ensure your have your JPA provider jar on the classpath (in your case this would be toplink-essentials.jar)
 
Kshitiz Agarwal
Ranch Hand
Posts: 36
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
James Sutherland wrote:Also ensure your have your JPA provider jar on the classpath (in your case this would be toplink-essentials.jar)


I have already tested web service code by calling it locally and it is running. So I dont think so there would be any jar related problem. Jars are present in lib folder. The problem seems to be related to axis2 configuration. Checking out this link: https://issues.apache.org/jira/browse/AXIS2-5383
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic