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...
Status: CLOSED CURRENTRELEASE
Product: JBoss BPMS Platform 6
Classification: JBoss
Component: jBPM Core (Show other bugs)
6.0.0
Unspecified Unspecified
unspecified Severity medium
: ER2
: 6.0.0
Assigned To: Maciej Swiderski
Jiri Svitak
:
Depends On:
Blocks:
  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:
Environment:
Last Closed: 2014-08-06 16:09:02 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
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]
server.log

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?

Thx,
Kris
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
Kris:
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.

Commits:
https://github.com/droolsjbpm/droolsjbpm-build-bootstrap/commit/a0b95a76db2b5fe400c7b087f759750cb4da376c
https://github.com/droolsjbpm/jbpm/commit/5d91133a7a59aacc2a751881fd595513045963a5
https://github.com/droolsjbpm/jbpm-console-ng/commit/134938bd047b9fec0000b8843ad2c1ab7b07de41
https://github.com/droolsjbpm/kie-wb-distributions/commit/ec24157ad8ace3a1e6a2d46048937a68cc162482
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.