Bug 991467 - Web application using jBPM6 CR1 deployed in EAP 6.1 throws ClassNotFoundException: bitronix.tm.BitronixTransactionManager
Web application using jBPM6 CR1 deployed in EAP 6.1 throws ClassNotFoundExcep...
Product: JBoss BPMS Platform 6
Classification: JBoss
Component: jBPM Core (Show other bugs)
Unspecified Unspecified
unspecified Severity medium
: ER2
: 6.0.0
Assigned To: Maciej Swiderski
Jiri Svitak
Depends On:
  Show dependency treegraph
Reported: 2013-08-02 09:21 EDT by Jiri Svitak
Modified: 2015-06-01 21:35 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2014-08-06 16:09:02 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
server.log (37.73 KB, text/plain)
2013-08-02 09:21 EDT, Jiri Svitak
no flags Details

  None (edit)
Description Jiri Svitak 2013-08-02 09:21:51 EDT
Created attachment 781964 [details]

Web application using jBPM6 CR1 throws ClassNotFoundException: bitronix.tm.BitronixTransactionManager.

To reproduce:
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.
Comment 1 Kris Verlaenen 2013-08-02 09:41:30 EDT
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?

Comment 2 Maciej Swiderski 2013-08-02 10:39:40 EDT
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.

Any thought?
Comment 3 Jiri Svitak 2013-08-05 03:55:46 EDT
Yes, application works as expected.
Comment 4 Maciej Swiderski 2013-08-05 08:10:01 EDT
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.

Comment 5 Jiri Svitak 2013-09-03 07:19:41 EDT
Verified in ER2 (redhat-2).

Note You need to log in before you can comment on or make changes to this bug.