You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you look at the link above, in version 2.10.3, the SimpleEndpoint class imports org.apache.http.client.utils.URLEncodedUtils.
How can one reproduce the problem?
In Spring Boot 3.x, when a request is sent to the Opensearch java client without the org.apache.httpcomponents:httpclient:4.x.x dependency, the SimpleEndpoint cannot get the method of URLEncodedUtils and an error occurs.
Caused by: java.lang.NoSuchMethodError: 'java.lang.String org.apache.http.client.utils.URLEncodedUtils.formatSegments(java.lang.String[])'
at org.opensearch.client.transport.endpoints.SimpleEndpoint.pathEncode(SimpleEndpoint.java:137) ~[opensearch-java-2.10.0.jar:na]
at org.opensearch.client.opensearch.core.SearchRequest.lambda$static$2(SearchRequest.java:2293) ~[opensearch-java-2.10.0.jar:na]
at org.opensearch.client.transport.endpoints.SimpleEndpoint.requestUrl(SimpleEndpoint.java:86) ~[opensearch-java-2.10.0.jar:na]
at org.opensearch.client.transport.endpoints.DelegatingJsonEndpoint.requestUrl(DelegatingJsonEndpoint.java:55) ~[opensearch-java-2.10.0.jar:na]
at org.opensearch.client.transport.httpclient5.ApacheHttpClient5Transport.prepareLowLevelRequest(ApacheHttpClient5Transport.java:565) ~[opensearch-java-2.10.0.jar:na]
at org.opensearch.client.transport.httpclient5.ApacheHttpClient5Transport.performRequestAsync(ApacheHttpClient5Transport.java:169) ~[opensearch-java-2.10.0.jar:na]
at org.opensearch.client.opensearch.OpenSearchAsyncClient.search(OpenSearchAsyncClient.java:1400) ~[opensearch-java-2.10.0.jar:na]
at com.kurly.orderreceipt.core.infrastructure.repository.customerfrequentpurchase.CustomerFrequentPurchaseOSRepositoryImpl.aggregateOrderCompleted(CustomerFrequentPurchaseOSRepositoryImpl.kt:104) ~[main/:na]
at com.kurly.orderreceipt.core.infrastructure.repository.customerfrequentpurchase.CustomerFrequentPurchaseOSRepositoryImpl.aggregateByDealProductNo(CustomerFrequentPurchaseOSRepositoryImpl.kt:68) ~[main/:na]
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) ~[na:na]
at java.base/java.lang.reflect.Method.invoke(Method.java:580) ~[na:na]
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:351) ~[spring-aop-6.1.4.jar:6.1.4]
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:196) ~[spring-aop-6.1.4.jar:6.1.4]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) ~[spring-aop-6.1.4.jar:6.1.4]
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:765) ~[spring-aop-6.1.4.jar:6.1.4]
...
What is the problem?
https://github.com/opensearch-project/opensearch-java/blob/2.10.3/java-client/src/main/java/org/opensearch/client/transport/endpoints/SimpleEndpoint.java
If you look at the link above, in version 2.10.3, the SimpleEndpoint class imports org.apache.http.client.utils.URLEncodedUtils.
How can one reproduce the problem?
In Spring Boot 3.x, when a request is sent to the Opensearch java client without the
org.apache.httpcomponents:httpclient:4.x.x
dependency, theSimpleEndpoint
cannot get the method ofURLEncodedUtils
and an error occurs.What do you want us to do?
Please improve the part that uses
HttpClient
so that it can be done without usingHttpClient
. If there is no immediate alternative, please modify it to useorg.apache.hc.core5.net.URLEncodedUtils
like the file in the main branch.https://github.com/opensearch-project/opensearch-java/blob/main/java-client/src/main/java/org/opensearch/client/transport/endpoints/SimpleEndpoint.java
I want to completely remove the
org.apache.httpcomponents:httpclient:4.x.x
dependency from Spring boot 3.What is your host/environment?
The text was updated successfully, but these errors were encountered: