Bug 1051739 - Classloader issues integrating with remote BPMS
Summary: Classloader issues integrating with remote BPMS
Keywords:
Status: MODIFIED
Alias: None
Product: JBoss Fuse Service Works 6
Classification: JBoss
Component: Rules / jBPM integration
Version: 6.0.0 GA
Hardware: All
OS: All
unspecified
high
Target Milestone: DR3
: 6.1.0
Assignee: David Ward
QA Contact: Matej Melko
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-01-11 06:13 UTC by Babak Mozaffari
Modified: 2023-05-15 19:53 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Calling a remote Red Hat JBoss Business Process Management System instance requires use of "kie-services-client" in "org.kie.remote". This module is not provided with the product, If users try to call the remote server, a "class not found" exception is recorded in the log.
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)
SY eclipse project (17.86 KB, application/zip)
2014-01-11 06:13 UTC, Babak Mozaffari
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker SWITCHYARD-2113 0 Major Resolved Switchyard should work with the remote API available in BPMS 2015-12-08 14:11:23 UTC

Description Babak Mozaffari 2014-01-11 06:13:18 UTC
Created attachment 848506 [details]
SY eclipse project

Description of problem:

Calling a remote BPMS instance requires use of "kie-services-client" in "org.kie.remote". This module is not provided in FSW but kie-api is provided, further complicating this library issue.

Version-Release number of selected component (if applicable):

FSW ER8

How reproducible:

Consistent

Steps to Reproduce:
1. Import, build and deploy the attached test project
2. Run the bean by invoking the service through the browser (or wget/lynx) at http://localhost:8080/external-bpms-dependency/
3. Check server log

Actual results:

Server log shows a class not found exception: java.lang.NoClassDefFoundError: org/kie/services/client/api/RemoteRestRuntimeFactory.

Expected results:

If BPMS is running on 8180 with "com.redhat.bpms.examples.mortgage.TestProcess" available in "com.redhat.bpms.examples:mortgage:1", the process should be instantiated.

Additional info:

Adding kie-services-client to the classpath does not appear straight-forward. Adding it to the kie module takes us down a rabbit hole of dependencies and deploying it as a jar does not seem to work as it would not be declaring a dependency on the kie module.

Comment 2 Patrick Steiner 2014-08-07 15:03:29 UTC
Just as an addition to the previous stated

If one wraps the switchyard composite as a war-file, one needs to
 - add the kie.jar's as runtime dependencies in the pom.xml
 - exclude all other jars like jackson-*.jar, etc
 - create a manifest to define the dependency to all other required jars

This, at the end, still brings some kind of class-loader issue

Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.kie.services.client.api.command.AcceptedCommands
	at org.kie.services.client.api.command.AbstractRemoteCommandObject.execute(AbstractRemoteCommandObject.java:92) [kie-services-client-6.0.2-redhat-6.jar:6.0.2-redhat-6]
	at org.drools.core.command.impl.CommandBasedStatefulKnowledgeSession.startProcess(CommandBasedStatefulKnowledgeSession.java:232) [drools-core-6.0.0-redhat-9.jar:6.0.0-redhat-9]


which could be caused by a mixup of 6.0.0 ( from FSW ) and 6.0.2 ( from BPM for RestAPI ) libraries.

This can be reproduced with https://github.com/PatrickSteiner/Calling_BPM_from_FSW


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