Hi all,
I am planning to build a local app that can call Apps API to add application to Okta. But when I run my application locally I get the below error.
SEVERE: Servlet.service() for servlet [dispatcherServlet] in context with path threw exception [Handler dispatch failed: java.lang.NoSuchMethodError: ‘void org.springframework.http.client.HttpComponentsClientHttpRequestFactory.setHttpClient(org.apache.http.client.HttpClient)’] with root cause
java.lang.NoSuchMethodError: ‘void org.springframework.http.client.HttpComponentsClientHttpRequestFactory.setHttpClient(org.apache.http.client.HttpClient)’
at com.okta.sdk.impl.client.DefaultClientBuilder.requestFactory(DefaultClientBuilder.java:454)
at com.okta.sdk.impl.client.DefaultClientBuilder.restTemplate(DefaultClientBuilder.java:430)
at com.okta.sdk.impl.client.DefaultClientBuilder.build(DefaultClientBuilder.java:352)
My gradle looks like this along with other dependencies :
implementation ‘org.apache.httpcomponents.client5:httpclient5:5.2.1’ | |
---|---|
implementation ‘org.apache.httpcomponents.core5:httpcore5:5.2.1’ | |
implementation ‘org.apache.httpcomponents:httpclient:4.5.14’ | |
implementation ‘com.okta.sdk:okta-sdk-api:10.2.0’ | |
— | — |
implementation ‘com.okta.sdk:okta-sdk-impl:10.2.0’ |
Please let me know if anyone knows the fix for this?
Thanks in advance