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.
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