Hi Awasum,
This error we had for all existing micro-services with more than one
feign client service registered, so we were looking for a more general
solution and we found one.
The exception is thrown by
com.netflix.hystrix.strategy.HystrixPlugins.registerConcurrencyStrategy
because for each feign client a new
HystrixConcurrencyStrategy
is to be registered with null key.
Our solution now is to check if the strategy was already registered and
if it was then do not try to add it again. So we have changed the
condition within
org.apache.fineract.cn.api.util.CustomFeignClientsConfiguration.configureHystrixConcurrencyStrategy
if (!wrappers.isEmpty())
to
if (HystrixPlugins.getInstance().getConcurrencyStrategy() ==null)
If you would check the code here, you would see that the original condition
does not really make much sense since/wrappers/ was just initialized right in
the previous line.
What I do not see how you were able to deploy the multi-feign-client services
this way. Maybe I do miss something here?
Thank you very much for your help,
Márti
On 2019. 01. 16. 9:46, Awasum Yannick wrote:
Hey Marta,
Looking at the logs, there is a Dependency Injection error somewhere
in your code base. Make sure you mark all beans with @Component or the
right stereotype and Autowire the right constructors or properties.
Make sure you have imported the libraries or services containing the
feign clients.
if you shared your repo, I could probably give you more pointers but
now the error log is insufficient for me to help solve the problem.
Thanks.
On Tue, Jan 15, 2019 at 2:20 PM Marta Jankovics
<[email protected] <mailto:[email protected]>> wrote:
Hi Awasum,
Attached the error that we are getting each time when we try to
deploy a service with more than one feign-client dependencies.
The attached error is for
org.apache.fineract.cn
<http://org.apache.fineract.cn>.teller.TellerConfiguration
@EnableFeignClients(
clients = {
OrganizationManager.class,
LedgerManager.class,
DepositAccountManager.class,
PortfolioManager.class,
ChequeManager.class }
)
reaching more than one feign REST service like
org.apache.fineract.cn.cheque.api.v1.client.ChequeManager from
org.apache.fineract.cn.teller.service.internal.service.helper.ChequeService
and the others from another services.
The same issue we have with each similar service like
fineract-cn-portfolio, fineract-cn-cheque,
fineract-cn-deposit-account-management...
I've created a new microservice with several feign-client connections and
have the same issue with that. The other modules we did not touch, only we do
not run all the services. For deploy we run the
deploy-server-0.1.0-BUILD-SNAPSHOT.jar. Do you have any idea how to solve
this issue?
Thank you,
Márti
On 2019. 01. 14. 12:43, Awasum Yannick wrote:
Hello Peter,
Please paste your logs here containing the error message and
share the piece of code you have modified or trying to modify.
Also tell us what you have done to try to fix the issue.
This will help anyone who wish to help you.
Thanks.
Awasum
On Mon, Jan 14, 2019 at 11:15 AM Peter Santa <[email protected]
<mailto:[email protected]>> wrote:
Hello Everyone!
We are working on integrating Fineract CN with Mojaloop.
Has someone faced the problem with feign client, that when
more than 1 client is referred by a microservice, then an
exception is thrown during provisioning (when running
ServiceRunner), by hystrix?
Is there any best practice to solve this?
Thank you.
Péter Sánta
DPC Consulting Ltd.