jbpm5 and Jboss AS 7 – little issue

July 14, 2011 at 3:01 pm 5 comments

Hi, all!

Recently I tried to deploy a web application in JBoss AS 7 that contains some jbpm 5 dependencies on its pom.xml.
Unfortunately I got stucked into a weird error – “Deployment of “ui.war” was rolled back with failure message {“Services with missing/unavailable dependencies” => [“jboss.persistenceunit.\”ui.war#org.jbpm.task\” missing [ jboss.data-source.java:/ ]”]” [see the image below]:

So, as I was a jbpm newbie, I decided to take a look at docs to try to answers some questions about this, after taking some time asking my self “Y U NO WORK?”
The problem is that the dependency


contains a persistence.xml file withΒ this content:

 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<persistence version="1.0"
                                 http://java.sun.com/xml/ns/persistence/orm http://java.sun.com/xml/ns/persistence/orm_1_0.xsd"
  <persistence-unit name="org.jbpm.task">
      <property name="hibernate.dialect" value="org.hibernate.dialect.H2Dialect"/>
      <property name="hibernate.connection.driver_class" value="org.h2.Driver"/>
      <property name="hibernate.connection.url" value="jdbc:h2:mem:mydb" />
      <property name="hibernate.connection.username" value="sa"/>
      <property name="hibernate.connection.password" value="sasa"/>
      <property name="hibernate.connection.autocommit" value="false" />
      <property name="hibernate.max_fetch_depth" value="3"/>
      <property name="hibernate.hbm2ddl.auto" value="create" />
      <property name="hibernate.show_sql" value="false" />
AS 7 gets crazy about it because it reads this file from jbpm-human-task jar and cannot find the <jta-data-source> tag! Even if you create a new persistence.xml file containing this persistence unit and try to point a jta-data-source, it will not work, because JBoss AS still reads this persistence inside this jar!
After I realized that, I found some bug reports (hereΒ andΒ here) talking about similar issues.
For while I dont think there’s a fix for that. If you want to test you application without jbpm-human-task features, I suggest you to add this lines of exclusion into your pom.xml:





Edited: Sures, removing the module is the worst solution in the world. I just blogged to show you where the problem was. I suggest you clone jbpm project at github (you will have to clone Drools project also). After that, remover the persistence file into human-task module and rebuild it (tip – manually remove jbpm into your local maven repository. This will avoid lots of problems. Then, create a persistence.xml with this content, and just add the tag <jta-data-source>. Finally, run mvn -o clean install into the project that depends on jbpm. )


Entry filed under: Issues, JBoss, Jboss AS 7, jbpm.

Openshift – Fast Shot jbpm + Seam 3 + JBoss AS 7 => Yes, Solved!

5 Comments Add your own

  • 1. salaboy  |  July 14, 2011 at 3:11 pm

    hmm but if you exclude that.. there is no way to use the jbpm5 human task features there.. and those features are required by the app πŸ™‚
    It looks like we need to change the way that we are delivering the persistence.xml file or at least find out how to override a persistence unit inside jboss as, because in tomcat and jetty is working.

    • 2. hannelita  |  July 14, 2011 at 4:00 pm

      Oh, sure, I just made a test to find de problem. I think more people have the same problem into other projects, so now they know whats wrong πŸ˜›

  • 3. Felipe Firmo  |  July 28, 2011 at 7:34 pm

    Much better now πŸ˜€

  • 4. calcacuervo  |  November 26, 2011 at 5:57 pm

    It seems persistence.xml was removed from jbpm-human task classpath now πŸ™‚

    • 5. hannelita  |  November 26, 2011 at 10:03 pm

      Yes, you are right! This post is a little old πŸ™‚ Everything is working fine now πŸ˜€


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Trackback this post  |  Subscribe to the comments via RSS Feed


July 2011
« Jun   Aug »

Most Recent Posts

%d bloggers like this: