Red Hat Bugzilla – Bug 991467
Web application using jBPM6 CR1 deployed in EAP 6.1 throws ClassNotFoundException: bitronix.tm.BitronixTransactionManager
Last modified: 2015-06-01 21:35:24 EDT
Created attachment 781964 [details]
Web application using jBPM6 CR1 throws ClassNotFoundException: bitronix.tm.BitronixTransactionManager.
1.) Go to https://github.com/jsvitak/jbpm-6-examples and clone it.
2.) Follow the readme.md file in rewards-basic to build and deploy the application.
3.) You can see in server log information from weld that it cannod find Bitronix.
I think that jBPM should not hard depend on Bitronix. The application works correctly because it uses common JTA API and so JBoss transactions in EAP are picked to handle transactions. Bitronix is not necessary in web applications for EAP.
I am using community jBPM 6 CR1, because there are no product binaries available yet for development.
There indeed shouldn't be a runtime dependency on bitronix. It seems one of the classes we use for Bitronix integration however is being picked up by the weld scanner.
Am I correct in assuming that this generates the given error in the server log, but the application itself is still working as expected?
The issue is caused by jbpm-shared-services that currently hosts two classes that are for bitornix tx handling in CDI for non app servers like tomcat or jetty.
The exception is thrown as they are marked as Veto CDI beans but still CDI loads the class itself and throws the exception. I suppose it does not break the deployment but only reports the error in logs. Anyway it needs to be fixed. As a work around please include bitornix into app classpath to avoid this error.
There are two options for resolving this:
1. move these two classes into separate maven module - might be too much for just two classes
2. use maven assembly to filter out the bitronix related classes from the main artifact and produce additional with btm classifier so non app server deployments could refer to it.
Yes, application works as expected.
bitronix related classes have been moved to separate jar produced by jbpm-shared-services as additional jar with classifies btm. All applications have been updated to make use of it when needed - hosted mode and tomcat.
Verified in ER2 (redhat-2).