Win a copy of Succeeding with AI this week in the Artificial Intelligence and Machine Learning forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Junilu Lacar
Sheriffs:
  • Tim Cooke
  • Jeanne Boyarsky
  • Knute Snortum
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • salvin francis
  • fred rosenberger
  • Frits Walraven

Problem in using JPA with Axis 2 web service provider

 
Ranch Hand
Posts: 36
  • 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?
 
Bartender
Posts: 1682
7
Android Mac OS X IntelliJ IDE Spring Linux
  • 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
  • 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>
 
Ranch Hand
Posts: 553
  • 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
  • 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
 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
ScroogeXHTML 8.7 - RTF to HTML5 and XHTML converter
https://coderanch.com/t/730700/ScroogeXHTML-RTF-HTML-XHTML-converter
    Bookmark Topic Watch Topic
  • New Topic