hapi-fhir-client-okhttp uses internal functions of okhttp which are not exposed after version 4.0.0. Last working okhttp version is 3.14.9 from May 2020.
java.lang.NoSuchMethodError: 'java.lang.String okhttp3.internal.Version.userAgent()'
at ca.uhn.fhir.okhttp.client.OkHttpRestfulClient.addUserAgentHeader(OkHttpRestfulClient.java:130) ~[hapi-fhir-client-okhttp-6.0.1.jar:na]
at ca.uhn.fhir.okhttp.client.OkHttpRestfulClient.addHeadersToRequest(OkHttpRestfulClient.java:123) ~[hapi-fhir-client-okhttp-6.0.1.jar:na]
at ca.uhn.fhir.okhttp.client.OkHttpRestfulClient.initBaseRequest(OkHttpRestfulClient.java:76) ~[hapi-fhir-client-okhttp-6.0.1.jar:na]
at ca.uhn.fhir.okhttp.client.OkHttpRestfulClient.createGetRequest(OkHttpRestfulClient.java:112) ~[hapi-fhir-client-okhttp-6.0.1.jar:na]
at ca.uhn.fhir.rest.client.impl.BaseHttpClientInvocation.createHttpRequest(BaseHttpClientInvocation.java:77) ~[hapi-fhir-client-6.0.1.jar:na]
at ca.uhn.fhir.rest.client.method.HttpGetClientInvocation.asHttpRequest(HttpGetClientInvocation.java:106) ~[hapi-fhir-client-6.0.1.jar:na]
hapi-fhir-client-okhttp uses internal functions of okhttp which are not exposed after version 4.0.0. Last working okhttp version is 3.14.9 from May 2020.
Please look at: Upgrading to OkHttp 4
Applications fail with: