]
Edson Tirelli reassigned DROOLS-1122:
-------------------------------------
Assignee: Maciej Swiderski (was: Edson Tirelli)
KieServicesClientImpl init not thread-safe
------------------------------------------
Key: DROOLS-1122
URL:
https://issues.jboss.org/browse/DROOLS-1122
Project: Drools
Issue Type: Bug
Components: kie server
Affects Versions: 6.3.0.Final
Reporter: Marek Schmidt
Assignee: Maciej Swiderski
Creating separate clients via KieServicesFactory.newKieServicesClient in separate threads
sometimes fails due to unsafe use of ServiceLoader (which by itself is not safe to use
from separate threads per
https://docs.oracle.com/javase/8/docs/api/java/util/ServiceLoader.html ) in
droolsjbpm-integration/kie-server-parent/kie-server-remote/kie-server-client/src/main/java/org/kie/server/client/impl/KieServicesClientImpl.java
The following can be seen in the logs of the failed threads
{noformat}
No builder found for 'BPM' capability
{noformat}
instead of the normal
{noformat}
Builder 'org.kie.server.client.helper.JBPMServicesClientBuilder@7a988e48' for
capability 'BPM'
{noformat}
Which is likely caused by ServiceLoader returning incorrect output in some race
condition.