递归验证错误

Recurly authentication error

我正在使用 Recurly 客户端 Maven 依赖项,我在 recurlyclient.java

中遇到错误

错误说

"java.lang.NoSuchMethodError: com.ning.http.client.AsyncHttpClientConfig$Builder.setMaximumConnectionsPerHost(I)Lcom/ning/http/client/AsyncHttpClientConfig$Builder"

这是关于 recurlyClient.open()

请帮我解决这个问题

这很可能是 async-http-client 库的版本不匹配。

您在运行时可用的 async-http-client 版本是什么? setMaximumConnectionsPerHost(int)中的方法v1.8.0 (and the versions prior) was renamed to setMaxConnectionsPerHost(int) in v1.9.0.

因此,您的代码或您使用的某些库的特定版本被编码为使用 v1.8.0 或更少的 async-http-client,但在运行时您拥有它的 v1.9.0可供您使用。查看您的 Maven 依赖关系树以解决问题。