Auth0 Home Blog Docs

Error while blocking a user



Problems processing event: java.lang.NoSuchMethodError: okhttp3.HttpUrl$Builder.addPathSegments(Ljava/lang/String;)Lokhttp3/HttpUrl$Builder;

The code is as follows -
ManagementAPI mgmt = new ManagementAPI(domain, token);
Request request = mgmt.users().update(userId, data);

I tried adding different versions of okhttp jars but still I am unable to resolve the issue.
Any help will be greatly appreciated.
Thanks in advance.,


I have just tried to use very similar code in a sample Java application and had no such issues; the Auth0 Java SDK currently requests OkHttp 3.7.0 and the method in question addPathSegments seems to exist since the 3.2.0 version. In conclusion, that seems to be an issue very specific to how you built/run your application so if you don’t resolve the issue yourself I would advise to either do a test in a sample application like the Java quickstart.


Thank you so much for the reply.
I did research on the right versions so I also updated my OkHttp jar with version 3.7.0 before asking this question.

But since you were not facing the same issue, I will try to look into my implementation again.

Meanwhile, it would be great if you can point out my mistake in the code. :slight_smile:


I also tried using the latest auth0-1.4.0 jar but still, I am facing the same issue.


Thank you so much for the help. I appreciate the quick response from the community.
I was able to resolve the issue by updating all by dependency jars to the latest versions.

Not sure which one was erroneous but this solved my problem.
Thanks, everyone.