Exception in thread “main” java.lang.BootstrapMethodError: call site initialization exception
at java.lang.invoke.CallSite.makeSite(CallSite.java:341)
at java.lang.invoke.MethodHandleNatives.linkCallSiteImpl(MethodHandleNatives.java:307)
at java.lang.invoke.MethodHandleNatives.linkCallSite(MethodHandleNatives.java:297)
at org.opensearch.client.RestClient.convertResponse(RestClient.java:330)
at org.opensearch.client.RestClient.performRequest(RestClient.java:314)
at org.opensearch.client.RestClient.performRequest(RestClient.java:289)
at org.opensearch.client.base.RestClientTransport.performRequest(RestClientTransport.java:77)
at org.opensearch.client.opensearch.api.indices.IndicesClient.create(IndicesClient.java:284)
at com.morningstar.indexbuild.rdb.main.GetVersion.main(GetVersion.java:52)
Caused by: java.lang.invoke.LambdaConversionException: Invalid receiver type interface org.apache.http.Header; not a subtype of implementation type interface org.apache.http.NameValuePair
at java.lang.invoke.AbstractValidatingLambdaMetafactory.validateMetafactoryArgs(AbstractValidatingLambdaMetafactory.java:233)
at java.lang.invoke.LambdaMetafactory.metafactory(LambdaMetafactory.java:303)
at java.lang.invoke.CallSite.makeSite(CallSite.java:302)
… 8 more
I am facing the same issue. Been stuck with this error since a while now.
Opensearch rest-client java version: 1.2.4
httpclient: 4.5.13
httpcore: 4.4.12/4.4.13 (Both have correct receiver type interface implementations)
I removed all conflicting httpcore/httpclient imports from dependency tree. Still facing this issue.