7 Replies Latest reply on Apr 23, 2014 8:11 AM by Marco Rietveld

    Is JBPM 6.0.1 supported on Wildfly?

    Chris Lowe Apprentice

      I've been trying to run a JBPM example from here on Wildfly 8.0.0.Final:




      With this example, I encounter numerous errors when deploying to Wildfly via the Maven plugin which I tried to hack my way through to see how far I could get.


      Initially, I get problems from a transitive dependency originating from the jbpm jars:


      18:28:42,630 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 61) MSC000001: Failed to start service jboss.persistenceunit."jbpm6-example.war#jbpm.unit01": org.jboss.msc.service.StartException in service jboss.persistenceunit."jbpm6-example.war#jbpm.unit01": org.hibernate.InvalidMappingException: Error while parsing file: vfs:/content/jbpm6-example.war/WEB-INF/lib/jbpm-human-task-jpa-6.1.0-SNAPSHOT.jar/META-INF/Taskorm.xml


      Caused by: org.hibernate.InvalidMappingException: Error while parsing file: vfs:/content/jbpm6-example.war/WEB-INF/lib/jbpm-human-task-jpa-6.1.0-SNAPSHOT.jar/META-INF/Taskorm.xml


      Caused by: org.hibernate.InvalidMappingException: Unable to read XML


      Caused by: org.dom4j.DocumentException: org.dom4j.DocumentFactory cannot be cast to org.dom4j.DocumentFactory Nested exception: org.dom4j.DocumentFactory cannot be cast to org.dom4j.DocumentFactory

        at org.dom4j.io.SAXReader.read(SAXReader.java:484)

        at org.hibernate.internal.util.xml.MappingReader.legacyReadMappingDocument(MappingReader.java:325) [hibernate-core-4.3.1.Final.jar:4.3.1.Final]

        ... 20 more


      If I tailor the pom to exclude dom4j from being deployed, Hibernate then cannot parse a query in JBPMorm.xml:


      HHH000177: Error in named query: GetProcessInstanceIdByCorrelation: org.hibernate.hql.internal.ast.QuerySyntaxException: unexpected token: key near line 1, column 133 [select key.processInstanceId from org.jbpm.persistence.correlation.CorrelationKeyInfo key left join key.properties props where size(key.properties) = cast(:elem_count as integer) and props.value in :properties group by key.id,key.processInstanceId having count(key.id) = :elem_count]


      I put a temporary work around for this by editing the query to remove line "size(key.properties) = cast(:elem_count as integer) and" from the file which resulted in this error going away - obviously this is not a solution, but I wanted to see if this was the only remaining error before looking at this in depth.  Sadly, it wasn't...


      WELD subsequently seems to throw up quite a lot of problems:


      org.jboss.weld.exceptions.IllegalStateException: WELD-001332: BeanManager method getBeans() is not available during application initialization

        at org.jboss.weld.bean.builtin.BeanManagerProxy.checkContainerValidated(BeanManagerProxy.java:159)


      I resolve this issue by restarting Wildfly with the system property: -Dorg.jboss.weld.nonPortableMode=true


      Then I get problems relating to Seam references in the example pom (comments say they are necessary for deployment):


      - Producer Method [HttpServletRequest] with qualifiers [@Any @Default] declared as [[BackedAnnotatedMethod] @Produces @Typed @RequestScoped protected org.jboss.solder.servlet.http.ImplicitHttpServletObjectsProducer.getHttpServletRequest()],

        - WELD|AbstractSyntheticBean|jbpm6-example.war/WEB-INF/lib/solder-impl-3.1.0.Final.jar|HttpServletRequest


      If I remove the Seam references from the pom, I get the following:


      org.jboss.weld.exceptions.DeploymentException: WELD-001408: Unsatisfied dependencies for type Injector with qualifiers @Default

        at injection point [BackedAnnotatedParameter] Parameter 1 of [BackedAnnotatedMethod] @Inject org.sonatype.guice.plexus.converters.PlexusXmlBeanConverter.setTypeConverterBindings(Injector)

        at org.sonatype.guice.plexus.converters.PlexusXmlBeanConverter.setTypeConverterBindings(PlexusXmlBeanConverter.java:0)



      And this is where I have decided to give up messing locally and post a question here.


      Is JBPM 6.0.1 supported on Wildfly?


      If so, is there another Maven based example I can look at to demonstrate BPM deploying to Wildfly?

      And if not, when is it likely to be supported?

      Given the early errors relating to dom4j class casting and the Hibernate query parsing issue, it feels more than a deployment issue at this point.

      Best regards,


        • 1. Re: Is JBPM 6.0.1 supported on Wildfly?
          Jonny Carter Newbie

          Well, the ant install.demo script that the user guide suggests for  quickstart downloads jboss application server 7. Since Wildfly starts at version 8, I don't think JBPM 6 is currently setup to work on WF 8. It looks like others are having similar problems http://stackoverflow.com/questions/18928037/do-the-jbpm-5-4-wars-run-under-wildfly-8-0.

          • 2. Re: Is JBPM 6.0.1 supported on Wildfly?
            Maciej Swiderski Master

            jbpm 6 was not tested on Wildfly and thus the issues you're seeing, hopefully we'll have some time for making it to work smoothly on wildly for 6.2.



            • 3. Re: Is JBPM 6.0.1 supported on Wildfly?
              Chris Lowe Apprentice

              Thanks for clarifying.  Would you like us to start raising Wildfly issues in Jira?

              • 4. Re: Is JBPM 6.0.1 supported on Wildfly?
                Marco Rietveld Novice

                Yes, please. (Wildfly issues in Jira).


                Also: the dom4j issue that you're seeing proably has to do with the JDK version that you're using. If you're using JDK 5 (which I suspect), it might help to move to JDk 7.


                (I have the feeling that Wildfly is only supported/tested on JDK 7)

                • 5. Re: Is JBPM 6.0.1 supported on Wildfly?
                  Jay Guidos Novice

                  I often see this dom4j issue, and I find it hard to work around.  I ensure (via manual inspection of ears) that I have no version of dom4j accidentally deployed, sometimes I try to deactivate the dom4j module in JBoss 7.1.1 but the exception never goes away.  It seems to be a threading/thread context issue, because I notice it always happens when the thread that is loading the EAR somehow loads dom4j before the thread loading my JBPM console does.


                  I tried a number of workarounds, including deactivating the dom4j module and/or marking it a global module, but its always a no-go. 


                  I am using JDK 1.7 across the board, and still see exactly the same classloader issue from time to time.  I bet its a race in JBoss 7.1.1 application loading, but that doesn't really help me any.


                  Jay Guidos

                  • 6. Re: Re: Is JBPM 6.0.1 supported on Wildfly?
                    Chris Lowe Apprentice

                    I am using JDK 1.7_51, the dom4j dependency is coming in via a jBPM Maven dependency:


                    [INFO] --- maven-dependency-plugin:2.1:tree (default-cli) @ bpm-runtime-standalone ---

                    [INFO] com.system.core.workflow:bpm-runtime-standalone:jar:1.0.4-SNAPSHOT

                    [INFO] +- postgresql:postgresql:jar:9.1-901.jdbc4:compile

                    [INFO] +- org.kie:kie-api:jar:6.0.1.Final:compile

                    [INFO] |  \- org.slf4j:slf4j-api:jar:1.7.2:compile

                    [INFO] +- org.jbpm:jbpm-audit:jar:6.0.1.Final:compile

                    [INFO] |  +- org.jbpm:jbpm-flow:jar:6.0.1.Final:compile

                    [INFO] |  |  +- com.google.protobuf:protobuf-java:jar:2.5.0:compile

                    [INFO] |  |  \- joda-time:joda-time:jar:1.6.2:compile

                    [INFO] |  +- org.drools:drools-persistence-jpa:jar:6.0.1.Final:compile

                    [INFO] |  \- org.hibernate.javax.persistence:hibernate-jpa-2.0-api:jar:1.0.1.Final:compile

                    [INFO] +- org.jbpm:jbpm-bpmn2:jar:6.0.1.Final:compile

                    [INFO] |  \- org.jbpm:jbpm-flow-builder:jar:6.0.1.Final:compile

                    [INFO] +- org.jbpm:jbpm-human-task-core:jar:6.0.1.Final:compile

                    [INFO] |  +- org.drools:drools-core:jar:6.0.1.Final:compile

                    [INFO] |  +- javax.activation:activation:jar:1.1.1:compile

                    [INFO] |  +- javax.annotation:jsr250-api:jar:1.0:compile

                    [INFO] |  +- org.mvel:mvel2:jar:2.1.8.Final:compile

                    [INFO] |  +- javax.mail:mail:jar:1.4.5:compile

                    [INFO] |  +- dom4j:dom4j:jar:1.6.1:compile                  <-------------------- HERE!

                    [INFO] |  |  \- xml-apis:xml-apis:jar:1.0.b2:compile

                    [INFO] |  \- org.javassist:javassist:jar:3.15.0-GA:compile

                    [INFO] +- org.jbpm:jbpm-human-task-audit:jar:6.0.1.Final:compile


                    The obvious workaround, of course, is to use Maven exclusions or declare a dom4j dependency to declare dom4j as provided scope.





                    • 7. Re: Is JBPM 6.0.1 supported on Wildfly?
                      Marco Rietveld Novice

                      Thanks for pointing that out Chris, I'll see if we can't remove all dom4j dependencies from the code.