Two thorntail microservices have been deployed on my localhost ports 8080 [as rest api server] and 8180 [as rest-client one]. The client microservice can access the rest api on server if client project is deployed using $java -jar client-thorntail.jar
and everything looks OK. But if client project is deployed using $mvn thorntail:run
then client service is deployed without errors; but throws following exception when the rest api on itself that internally calls rest api via proxy interface on server microservice:
UT005023: Exception handling request to /client/getSum/70/10: org.jboss.resteasy.spi.UnhandledException: java.util.ServiceConfigurationError: org.eclipse.microprofile.rest.client.spi.RestClientBuilderResolver: Provider org.jboss.resteasy.microprofile.client.BuilderResolver not a subtype
I tried it using both thorntail version 2.5.0.Final and 2.6.0.Final. But, not fixed. Any fixes or workarounds would be helpful.
Unfortunately, mvn thorntail:run
suffers from classloading problems, because it doesn't run the application from an uberjar, but from classpath. There's a JIRA somewhere for this exact problem (RestClient not working). I'd recommend always using mvn thorntail:run -Dthorntail.useUberJar
, that should work.