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

Error while trying to parse #36

Closed
FMusic opened this issue Aug 3, 2021 · 3 comments
Closed

Error while trying to parse #36

FMusic opened this issue Aug 3, 2021 · 3 comments
Assignees

Comments

@FMusic
Copy link

FMusic commented Aug 3, 2021

Hello,
I get an error while trying to upload file using this library.

java.lang.NoSuchMethodError: 'okhttp3.RequestBody okhttp3.RequestBody.create(java.lang.String, okhttp3.MediaType)' at com.sovren.SovrenClient.parseResume(SovrenClient.java:248) ~[sovren-java-1.2.0.jar:1.2.0] at demos.sovren.CvService.saveAndParse(CvService.java:41) at demos.sovren.Controller.saveCv(Controller.java:29) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[na:na] at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke at org.springframework.web.method.support.InvocableHandlerMethod.invoke at org.springframework.web.servlet.mvc.method.annotation.ServletInvocab at org.springframework.web.servlet.mvc.method.annotation.RequestMapping at org.springframework.web.servlet.mvc.method.annotation.RequestMapping at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1064) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909) at javax.servlet.http.HttpServlet.service(HttpServlet.java:681) ~[tomcat-embed-core-9.0.50.jar:4.0.FR] at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883) at java.base/java.lang.Thread.run(Thread.java:829) ~[na:na]

Is there any way to solve this?
I am using JDK11 and Intellij. Dependency included with pom.xml, and I am using Spring Boot..

@sovren-jwesson
Copy link
Contributor

Frane,
I believe this is related to: auth0/auth0-java#324

It seems that Spring Boot forces the okhttp3 version to v3 while this SDK requires v4. Some solutions have been posted in that thread that you might try. Also, I see a code change that was made at the end of that thread to resolve the issue which I am going to try to implement.

Thanks for all the info. Please post any updates here, and I will do the same.

@sovren-jwesson sovren-jwesson self-assigned this Aug 3, 2021
sovren-jwesson added a commit that referenced this issue Aug 3, 2021
Do this for users of Spring Boot where it forces the okhttp library to v3 instead of the v4 that this SDK specifies. #36
@sovren-jwesson
Copy link
Contributor

This should be fixed in v1.2.1 which is available in Maven, now. If it still does not work for you, you might have to try some of the dependency solutions mentioned in that thread I linked.

Thanks again.

@FMusic
Copy link
Author

FMusic commented Aug 4, 2021

Thank you very much, it works with new version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants