This discussion is archived
2 Replies Latest reply: Jul 12, 2012 7:44 PM by Kalyan Pasupuleti-Oracle RSS

JSF / JPA deployed to support Oracle Identity Manager

914712 Newbie
Currently Being Moderated
* Cross Posting to Weblogic Server from Identity Management forum *


I have a JPA / JSF application that was written to assist with DB reads / writes. The java methods are called from OIM, as task adapters.

If I run my application from within JDeveloper, all is well. Everything behaves as you'd expect.

If I create a deployment profile and deploy to a jar file, everything works as well. In the jar, all of the classes, as well as the META-INF/persistence.xml file are included. Running the app with 'java -classpath .:/path/to/jar com.classname.method works as expected.

If, however, I then copy the jar to the JavaTasks directory of WLS/OIM, and try and execute the method, I get the following error:

Target Class = com.classname.method
     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
     at sun.reflect.NativeConstructorAccessorImpl.newInstance(
     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(
     at java.lang.reflect.Constructor.newInstance(
     at com.thortech.xl.adapterGlue.ScheduleItemEvents.adpCLASSNAME.METHOD(
     at com.thortech.xl.adapterGlue.ScheduleItemEvents.adpCLASSMETHOD.implementation(
     at com.thortech.xl.dataobj.tcDataObj.runEvent(
     at com.thortech.xl.dataobj.tcScheduleItem.runMilestoneEvent(
     at com.thortech.xl.dataobj.tcScheduleItem.eventPostInsert(
     at com.thortech.xl.dataobj.tcDataObj.insert(
     at com.thortech.xl.ejb.beansimpl.tcProvisioningOperationsBean.retryTasks(
     at Thor.API.Operations.tcProvisioningOperationsIntfEJB.retryTasksx(Unknown Source)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(
Caused by: javax.persistence.PersistenceException: No Persistence provider for EntityManager named persistenceID: The following providers:
Returned null to createEntityManagerFactory.

My persistence.xml file defines the persistenceID provider. It works fine if run from JDeveloper, or the command line. But, WLS/OIM cannot seem to find/parse the persistence.xml file when run as a task adapter.

I have even created a DataSource within WLS, and tried to reference it that way (instead of directly via the jdbc drivers) with no luck.

How do I get OIM to recognize the existence of the persistence.xml file in the META-INF directory of the jar that contains my classes? Do I have to add another persistence.xml file elsewhere in the WLS server to get it to be parsed?

Thank you.


  • Correct Answers - 10 points
  • Helpful Answers - 5 points