I have tried way too many Elasticsearch/Opensearch java rest client versions but running into issues with all of them.
Opensearch – 1.0.0, 1.1.0, 1.2.4
Invalid receiver type interface org.apache.http.Header; not a subtype of implementation type interface org.apache.http.NameValuePair
Elasticsearch Rest high level client – 7.10.2, 7.11.2, 7.12.0
java.lang.NoClassDefFoundError: Could not initialize class org.elasticsearch.client.ml.dataframe.OutlierDetection
Elasticsearch Rest high level client – 7.15.0, 7.17.4
java.lang.NoClassDefFoundError: Could not initialize class org.elasticsearch.client.analytics.InferencePipelineAggregationBuilder
Elasticsearch Rest high level client – 7.13.2
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
Pretty standard way of loading the dependency
<dependency>
<groupId>org.elasticsearch.client</groupId>
<artifactId>elasticsearch-rest-high-level-client</artifactId>
<version>x.x.x</version>
</dependency>
I’m writing to an opensearch cluster via a spark streaming application. What could be the issue?