gpt4 book ai didi

java - 获取 com.sun.jersey.api.client.ClientHandlerException : while generating Docusign API token

转载 作者:行者123 更新时间:2023-12-02 04:51:20 25 4
gpt4 key购买 nike

我是 Docusign 新手,在我的 java 代码中生成 docusign token 时遇到以下问题:

异常(exception):

com.sun.jersey.api.client.ClientHandlerException: 
java.lang.ClassCastException: com.sun.net.ssl.internal.www.protocol.https.HttpsURLConnectionOldImpl cannot be cast to javax.net.ssl.HttpsURLConnection
at com.sun.jersey.client.urlconnection.URLConnectionClientHandler.handle(URLConnectionClientHandler.java:155)
at com.sun.jersey.api.client.Client.handle(Client.java:652)
at com.sun.jersey.api.client.WebResource.handle(WebResource.java:682)
at com.sun.jersey.api.client.WebResource.access$200(WebResource.java:74)
at com.sun.jersey.api.client.WebResource$Builder.post(WebResource.java:570)
at com.docusign.esign.client.ApiClient.requestJWTUserToken(ApiClient.java:732)
at com.esp.quativa.service.DocuSignConfigurationService.configureApiClent(DocuSignConfigurationService.java:245)

我的 Jersey 版本是1.19.0

请让我知道我哪里出错了。以下是供引用的代码片段:

List<String> scopes = new ArrayList<String>();
scopes.add(OAuth.Scope_SIGNATURE);
scopes.add(OAuth.Scope_IMPERSONATION);
byte[] privateKeyBytes = null;
try {
privateKeyBytes = Files.readAllBytes(Paths.get(privateKeyAbsPath));
} catch (IOException ioExcp) {
logger.error("Exception while reading docusign private key :::"+ioExcp);
}
OAuth.OAuthToken oAuthToken = apiClient.requestJWTUserToken(integratorKey, userGUId, scopes, privateKeyBytes, 3600);
apiClient.setAccessToken(oAuthToken.getAccessToken(), oAuthToken.getExpiresIn());

最佳答案

请注意,DocuSign Java SDK 使用 Jersey 版本 1.19.1。这会引起冲突吗?

您是否尝试过使用 Java JWT example

关于java - 获取 com.sun.jersey.api.client.ClientHandlerException : while generating Docusign API token,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56438824/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com