Hello,
I use ES 7.6.1. with APM Server 7.6.1 and apm-java agent 1.14.0.
In my jakarta application, when I`m fetching data from ES via RestHighLevelClient I get some exception to server.log
java.lang.ClassCastException: co.elastic.apm.agent.es.restclient.ElasticsearchRestClientInstrumentationHelperImpl cannot be cast to co.elastic.apm.agent.es.restclient.ElasticsearchRestClientInstrumentationHelper
at org.elasticsearch.client.RestClient.performRequest(RestClient.java:234)
at org.elasticsearch.client.RestHighLevelClient.internalPerformRequest(RestHighLevelClient.java:1514)
at org.elasticsearch.client.RestHighLevelClient.performRequest(RestHighLevelClient.java:1484)
at org.elasticsearch.client.RestHighLevelClient.performRequestAndParseEntity(RestHighLevelClient.java:1454)
at org.elasticsearch.client.RestHighLevelClient.search(RestHighLevelClient.java:970)
or
java.lang.ClassCastException: co.elastic.apm.agent.httpclient.helper.RequestHeaderAccessor cannot be cast to co.elastic.apm.agent.impl.transaction.TextHeaderSetter
at org.apache.http.impl.nio.client.InternalHttpAsyncClient.execute(InternalHttpAsyncClient.java:123)
at org.elasticsearch.client.RestClient.performRequest(RestClient.java:244)
at org.elasticsearch.client.RestClient.performRequest(RestClient.java:235)
at org.elasticsearch.client.RestHighLevelClient.internalPerformRequest(RestHighLevelClient.java:1514)
at org.elasticsearch.client.RestHighLevelClient.performRequest(RestHighLevelClient.java:1484)
at org.elasticsearch.client.RestHighLevelClient.performRequestAndParseEntity(RestHighLevelClient.java:1454)
at org.elasticsearch.client.RestHighLevelClient.search(RestHighLevelClient.java:970)
Finally, I`m able to fetch data, but exceptions are little bit annoying.
How can I fix these problems?