1 Reply Latest reply: Aug 21, 2012 5:15 AM by Wenli Wang RSS

OSGI + human task persistence

grischan Newbie

Hi,

 

I am currently trying to use human tasks (jBPM 5.3)  in an application based on OSGI (Equinox). 

 

As far as I know Hibernate doesn’t really support OSGI. So I decided to use Eclipse Gemini JPA for persistence. Though I can`t make it work. Seemingly the OSGI JPA specification requires all entities and metadata to be contained in a single persistence bundle.

 

I get the following Exception:

 

javax.persistence.PersistenceException: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.4.0.v20120608-r11652): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Predeployment of PersistenceUnit [jbpm.unit] failed.
Internal Exception: Exception [EclipseLink-7215] (Eclipse Persistence Services - 2.4.0.v20120608-r11652): org.eclipse.persistence.exceptions.ValidationException
Exception Description: Could not load the field named [processInstanceId] on the class [class org.jbpm.persistence.processinstance.ProcessInstanceInfo]. Ensure there is a corresponding field with that name defined on the class.
    at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.createPredeployFailedPersistenceException(EntityManagerSetupImpl.java:1541)
    at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:1532)
    at org.eclipse.persistence.internal.jpa.deployment.JPAInitializer.callPredeploy(JPAInitializer.java:98)
    at org.eclipse.persistence.internal.jpa.deployment.JPAInitializer.initPersistenceUnits(JPAInitializer.java:306)
    at org.eclipse.gemini.jpa.provider.GeminiOSGiInitializer.initializeFromBundle(GeminiOSGiInitializer.java:120)
    at org.eclipse.gemini.jpa.provider.EclipseLinkOSGiProvider.assignPersistenceUnitsInBundle(EclipseLinkOSGiProvider.java:193)
    at org.eclipse.gemini.jpa.PersistenceBundleExtender.tryAssigningPersistenceUnitsInBundle(PersistenceBundleExtender.java:175)
    at org.eclipse.gemini.jpa.PersistenceBundleExtender.bundleChanged(PersistenceBundleExtender.java:317)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:847)
    at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
    at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
    at org.eclipse.osgi.framework.internal.core.Framework.publishBundleEventPrivileged(Framework.java:1569)
    at org.eclipse.osgi.framework.internal.core.Framework.publishBundleEvent(Framework.java:1505)
    at org.eclipse.osgi.framework.internal.core.Framework.publishBundleEvent(Framework.java:1500)
    at org.eclipse.osgi.framework.internal.core.PackageAdminImpl.processDelta(PackageAdminImpl.java:486)
    at org.eclipse.osgi.framework.internal.core.PackageAdminImpl.doResolveBundles(PackageAdminImpl.java:251)
    at org.eclipse.osgi.framework.internal.core.PackageAdminImpl$1.run(PackageAdminImpl.java:174)
    at java.lang.Thread.run(Unknown Source)

 

 

Could you give me some hints which setup might work to use human tasks in an OSGI environment? Does someone have a working project in an OSGI environment which uses Eclipse Gemini JPA, Hibernate or some other JPA Provider?

 

Thanks,

Grischan