wood burning stoves 2.0*
The moose likes Object Relational Mapping and the fly likes Problem in using JPA with Axis 2 web service provider Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Problem in using JPA with Axis 2 web service provider" Watch "Problem in using JPA with Axis 2 web service provider" New topic
Author

Problem in using JPA with Axis 2 web service provider

Kshitiz Agarwal
Ranch Hand

Joined: Dec 15, 2011
Posts: 36
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

Joined: Mar 07, 2010
Posts: 1632
    
    7

Do you have a <provider> tag in your persistence.xml? It seems you do not have a persistence provider defined.


[How To Ask Questions][Read before you PM me]
Kshitiz Agarwal
Ranch Hand

Joined: Dec 15, 2011
Posts: 36
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

Joined: Oct 01, 2007
Posts: 553
Also ensure your have your JPA provider jar on the classpath (in your case this would be toplink-essentials.jar)

TopLink : EclipseLink : Book:Java Persistence : Blog:Java Persistence Performance
Kshitiz Agarwal
Ranch Hand

Joined: Dec 15, 2011
Posts: 36
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
 
subject: Problem in using JPA with Axis 2 web service provider
 
Similar Threads
How to change the name of the binding element in wsdl file ?
How to change the name of the binding element in wsdl file ?
websphere 7 and (application based) open-jpa 2
java.lang.NoClassDefFoundError
Change the location of persistence.xml in JPA (Eclipselink 2.3)