Skip to content

ElasticSearch 8.12.1 with HighLevelRestClient/JavaClient combination not working #752

@frank-montyne

Description

@frank-montyne

Java API client version

8.12.1

Java version

21

Elasticsearch Version

8.12.1

Problem description

I'm trying to use Elasticsearch 8.12.1 with both the 7.17.18 HighLevelRestClient and the new 8.12.1 JavaClient.

I am using the 7.17.18 artifacts for all the org.elasticsearch and org.elasticsearch.client artifacts and the 8.12.1 version for the co.elastic.clients elasticsearch-java artifact.

When I try to connect I get the following error:

java.lang.NoSuchMethodError: 'org.elasticsearch.client.RequestOptions$Builder org.elasticsearch.client.RequestOptions$Builder.setHttpAsyncResponseConsumerFactory(org.elasticsearch.client.HttpAsyncResponseConsumerFactory)'
	at co.elastic.clients.transport.rest_client.SafeResponseConsumer.<clinit>(SafeResponseConsumer.java:52)
	at co.elastic.clients.transport.rest_client.RestClientOptions.initialOptions(RestClientOptions.java:191)
	at co.elastic.clients.transport.rest_client.RestClientOptions.of(RestClientOptions.java:52)
	at co.elastic.clients.transport.rest_client.RestClientHttpClient.createOptions(RestClientHttpClient.java:84)
	at co.elastic.clients.transport.rest_client.RestClientHttpClient.createOptions(RestClientHttpClient.java:48)
	at co.elastic.clients.transport.ElasticsearchTransportBase.<init>(ElasticsearchTransportBase.java:109)
	at co.elastic.clients.transport.rest_client.RestClientTransport.<init>(RestClientTransport.java:36)
	at co.elastic.clients.transport.rest_client.RestClientTransport.<init>(RestClientTransport.java:32)
	at com.bynubian.elasticsearch.ByNeuronElasticSearch.connect(ByNeuronElasticSearch.java:191)
        ...

When I downgrade for the JavaClient to 8.11.4 I can connect without any problem.
All 8.12.x versions produce the NoSuchMethodError

Am i doing something wrong?

I also saw that for all the org.elasticsearch and org.elasticsearch.client artifacts there are now 8.12.1 versions except for the elasticsearch-rest-high-level-client. Am I supposed to use these versions together with the elasticsearch-rest-high-level-client 7.17.18 version?
I tried that out but when I use the 8.12.1 versions there are a lot of changes/omissions in the aggregations. AutoDateHistogramBuilder is not present, movingFuncton and normalize is missing...
Even when doing a simple connect I get an error stating that the class org.elasticsearch.action.admin.indices.flush.SyncedFlushRequest is not found.
Is this a work in progress?

All help is welcome

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions