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 *

Hello

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
java.lang.reflect.InvocationTargetException
     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
     at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
     at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
     at com.thortech.xl.adapterGlue.ScheduleItemEvents.adpCLASSNAME.METHOD(adpCLASSMETHOD.java:120)
     at com.thortech.xl.adapterGlue.ScheduleItemEvents.adpCLASSMETHOD.implementation(adpCLASSMETHOD.java:62)
     at com.thortech.xl.client.events.tcBaseEvent.run(tcBaseEvent.java:196)
     at com.thortech.xl.dataobj.tcDataObj.runEvent(tcDataObj.java:2492)
     at com.thortech.xl.dataobj.tcScheduleItem.runMilestoneEvent(tcScheduleItem.java:2917)
     at com.thortech.xl.dataobj.tcScheduleItem.eventPostInsert(tcScheduleItem.java:547)
     at com.thortech.xl.dataobj.tcDataObj.insert(tcDataObj.java:602)
     at com.thortech.xl.dataobj.tcDataObj.save(tcDataObj.java:474)
     at com.thortech.xl.ejb.beansimpl.tcProvisioningOperationsBean.retryTasks(tcProvisioningOperationsBean.java:4042)
     at Thor.API.Operations.tcProvisioningOperationsIntfEJB.retryTasksx(Unknown Source)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
...
Caused by: javax.persistence.PersistenceException: No Persistence provider for EntityManager named persistenceID: The following providers:
org.eclipse.persistence.jpa.PersistenceProvider
kodo.persistence.PersistenceProviderImpl
org.apache.openjpa.persistence.PersistenceProviderImpl
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.

Legend

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