Bug 991467 - Web application using jBPM6 CR1 deployed in EAP 6.1 throws ClassNotFoundException: bitronix.tm.BitronixTransactionManager
Summary: Web application using jBPM6 CR1 deployed in EAP 6.1 throws ClassNotFoundExcep...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss BPMS Platform 6
Classification: Retired
Component: jBPM Core
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ER2
: 6.0.0
Assignee: Maciej Swiderski
QA Contact: Jiri Svitak
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-08-02 13:21 UTC by Jiri Svitak
Modified: 2015-06-02 01:35 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-08-06 20:09:02 UTC
Type: Bug
Embargoed:


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

Description Jiri Svitak 2013-08-02 13:21:51 UTC
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 13:41:30 UTC
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 14:39:40 UTC
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 07:55:46 UTC
Kris:
Yes, application works as expected.

Comment 4 Maciej Swiderski 2013-08-05 12:10:01 UTC
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 11:19:41 UTC
Verified in ER2 (redhat-2).


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