1 Reply Latest reply on Feb 17, 2017 7:22 AM by shpsgm shpsgm

    Deploying JBPM 3.2.6 within Wildfly 10

    Marco Strauch Newbie



      I have a huge problem. I have to migrate our server code from JBoss 6.0 to Wildfly 10. A lot of the problems I had I have solved but our jbpm integration did not work. So let me describe the problem.


      We are using jbpm 3.2.6. This version of jbpm uses hibernate 3.2.x. The wildfly starts with hibernate 5.x and the rest of our server code should use the latest hibernate version 5.x. And only the jbpm module should run with hibernate 3.2. I tried to exclude hibernate 5.x from jbpm sub deployment and include the module hibernate 3.2 but wildfly takes the libs from hibernate 5.x. So how I have to deploy our application.


      Our application server deployment looks as follow (I left out the other modules which are not for interest here)



        | -- lib (contains some internal libs, all other external libs are defined as modules)

        | -- META-INF (contains the deployment descriptors)

        | -- app-bpm.jar (contains own ejb services that are addressed by the rest of the application and extensions of the jbpm-jpdl.jar which shall use the hibernate 3 libs

        | -- jbpm-jpdl.jar (the jbpm library which shall use hibernate 3)

        | -- .... more modules using hibernate 5



      My jboss-deployment-structure.xml








         <module name="my-libs" export="true" />

         <module name="org.apache.log4j" export="true" />

         <module name="org.hibernate" slot="5.0" export="true" />

         <module name="org.infinispan" export="true" />

         <module name="org.jboss.ejb3" export="true" />

         <module name="org.jboss.ejb-client" export="true" />

         <module name="org.jboss.remote-naming" export="true" />





         <sub-deployment name="app-bpm.jar">


         <module name="org.hibernate" slot="5.0"/>



         <module name="org.hibernate" slot="3.2" />

         <!--<module name="deployment.jbpm" />-->


         <resource-root path="jbpm-jpdl.jar" />




      <!-- Defining jbpm-jpdl.jar as separate module did also not work -->

         <!--<module name="deployment.jbpm" >-->
        <!--<resource-root path="jbpm-jpdl.jar" />-->
        <!--<module name="org.hibernate" slot="3.2" />-->


      My application.xml:

      <application xmlns="http://java.sun.com/xml/ns/javaee"
         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_6.xsd"










      JBPM Loads an own hibnerate configuration file which contains the references to the*.hbm.xml files to load the entities. But event at this point org.hibernate.cfg.Configuration.buildSessionFactory() the libraries of hibernate 5 are used.

      So what can I do, that only the bpm module uses the hibernate 3 libs and the rest of the app server uses hibernate 5.