Tuesday, November 24, 2009

Running jBPM 3.2.8_SOA on JBoss EAP 4.3

For my current project, I've been putting together JBoss EAP 4.3 and jBPM 3.2.8_SOA. At my company, we don't have the full JBoss SOA stack, yet do have support contracts for the two separately. Needless to say, it was unlikely that they would behave nicely together out-of-the-box...

The supported jBPM distribution comes as a zip file, lacking the installer that the community version does have. But once unzipped, there's a deploy/ directory with everything that needs to be copied onto the app server. So at a first glance it seemed straightforward enough to copy the data/ and deploy/ directories from the deploy/server/default/ folder of the unzipped distribution to the appropriate server base folder.

Wrong reference to JMS class

However, upon first starting up the server, it was indicated in the server.log file that an expected class for the MQ service MBeans (org.jboss.mq.server.jmx.Queue) could not be found. While I know this class was included in the libs distributed along with the 4.0.5 version of the app server, it is no longer found in the EAP 4.3 version and replaced since then. You'll need to replace these entries in the jbpm-mq-service.xml file (found in the deploy/jbpm directory):

    jboss.mq:service=DestinationManager



      jboss.mq:service=DestinationManager

with these:

    jboss.messaging:service=ServerPeer
    jboss.messaging:service=PostOffice



    jboss.messaging:service=ServerPeer
    jboss.messaging:service=PostOffice

and with those in place, the server starts up without any error messages in the log.

Unable to log onto the jBPM console

So the next step was trying to upload a process archive, but that plan was nipped in the bud by the login procedure of the jBPM console. Using a username-password combo that is in the default database entries (like the infamous admin/admin combo) I was denied access. The error logging threw me off at first in this case, as it complained about not being able to find the appropriate roles.properties and users.properties (e.g. like the ones provided for the JMX console). But adding these (in the deploy/jbpm/jsf-console.war/WEB-INF/classes/ directory) simply left me with a 403 Access Denied page, and no logging whatsoever!

The right answer was found in the jboss-web.xml (for the console). There the JAAS security domain is defined as "java:/jaas/soa", while in the jboss-service.xml (in the deploy/jbpm/jbpm-service.sar/META-INF/ directory) the name of the application is still "jbpm-console" - even though both are in the same distribution!

Changing

   ...

to

   ...

in the latter file does the trick, although it is just as fine when you would change the security domain in the former to "java:/jaas/jbpm-console", as long as the two are in sync.


Now with these two minor issues out of the way, I was able to deploy a simple process and run it. Not too bad for two distributions that weren't designed to work together. Possibly there are still some issues left to be solved, which I then undoubtedly will run into during the course of this project. If so, I'll simply dedicate another post about it...