Uploaded image for project: 'jBPM'
  1. jBPM
  2. JBPM-4400

Problems using persistences with human tasks in OSGi

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical Critical
    • jBPM 6.1.0.CR2
    • None
    • None

      This issue documents changes that are required to get persistence working with human tasks in an OSGi environment (e.g. Karaf, Fuse). Persistence was integrated using Meta-Persistence header field. Below is a summary of the issues:

      1. the features.xml file as of JBPM-4395 prevents the Hibernate PersistenceProvider from registering with the framework. Replacing the bundles with the GAV's used in the 6.0 features.xml fixes the problem.
      2. a few of the bundles providing entity classes fail to import javassist and hibernate, which causes proxy creation to fail. The following bundles had problems, but I'd recommend doing an inventory of all bundles providing entity classes and verify those bundles have the proper imports: jbpm-human-task-audit, jbpm-human-task-jpa. These can be fixed by adding the following imports to the offending jars: javassist.util.proxy;resolution:=optional,org.hibernate.proxy;resolution:=optional
      3. org.kie.internal.task.api.TaskModelProvider uses ServiceLoader to load TaskModelFactory. This fails to find and load JPATaskModelFactory in an OSGi environment; a different mechanism should be used.

      By making the above changes in the resources cached in my local .m2 repository and by adding the service definition to my bundle, I was able to use persistence in a bpm process in a switchyard bundle.

            kverlaen@redhat.com Kris Verlaenen
            rcernich1 Rob Cernich
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: