Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] I am getting below ERROR while trying to fetch indices from opensearch #11854

Open
lijie123bes opened this issue Jan 11, 2024 · 2 comments
Labels
bug Something isn't working Clients Clients within the Core repository such as High level Rest client and low level client Other

Comments

@lijie123bes
Copy link

Describe the bug

Exception in thread "main" java.lang.BootstrapMethodError: bootstrap method initialization exception at java.base/java.lang.invoke.BootstrapMethodInvoker.invoke(BootstrapMethodInvoker.java:194) at java.base/java.lang.invoke.CallSite.makeSite(CallSite.java:307) at java.base/java.lang.invoke.MethodHandleNatives.linkCallSiteImpl(MethodHandleNatives.java:258) at java.base/java.lang.invoke.MethodHandleNatives.linkCallSite(MethodHandleNatives.java:248) at org.opensearch.client.RestClient.convertResponse(RestClient.java:361) at org.opensearch.client.RestClient.performRequest(RestClient.java:345) at org.opensearch.client.RestClient.performRequest(RestClient.java:320) at org.opensearch.client.RestHighLevelClient.internalPerformRequest(RestHighLevelClient.java:1918) at org.opensearch.client.RestHighLevelClient.performRequest(RestHighLevelClient.java:1901) at org.opensearch.client.RestHighLevelClient.performRequestAndParseEntity(RestHighLevelClient.java:1865) at org.opensearch.client.IndicesClient.get(IndicesClient.java:768) at com.QueriesTest.main(QueriesTest.java:99) 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.base/java.lang.invoke.AbstractValidatingLambdaMetafactory.validateMetafactoryArgs(AbstractValidatingLambdaMetafactory.java:254) at java.base/java.lang.invoke.LambdaMetafactory.metafactory(LambdaMetafactory.java:328) at java.base/java.lang.invoke.BootstrapMethodInvoker.invoke(BootstrapMethodInvoker.java:127) ... 11 more

Related component

Other

To Reproduce

static RestHighLevelClient client = new RestHighLevelClient(RestClient.builder(new HttpHost(domainUrl, port, protocol)));

//QueriesTest.java:99
GetIndexRequest request = new GetIndexRequest(indexName);
GetIndexResponse response = client.indices().get(request, RequestOptions.DEFAULT);

Expected behavior

no error

Additional Details

Versions: jdk 11
plugins { id:'org.springframework.boot' version '1.5.6.RELEASE' }
opensearch-java:2.6.0 opensearch-rest-high-level-client:2.9.0

@lijie123bes lijie123bes added bug Something isn't working untriaged labels Jan 11, 2024
@github-actions github-actions bot added the Other label Jan 11, 2024
@VachaShah
Copy link
Collaborator

@lijie123bes Can you check what versions of org.apache.httpcomponents.httpclient and org.apache.httpcomponents.httpcore are you using? The rest high level client uses 4.5.14 and 4.4.16 respectively but if there are any conflicts in your classpath for their versions?

@peternied peternied added Clients Clients within the Core repository such as High level Rest client and low level client and removed untriaged labels Jan 24, 2024
@peternied
Copy link
Member

[Triage - attendees 1 2]
@lijie123bes Thanks for filing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Clients Clients within the Core repository such as High level Rest client and low level client Other
Projects
None yet
Development

No branches or pull requests

3 participants