我是Docusign的新手,并且在我的Java代码中生成docusign令牌时遇到以下问题:
例外:
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)
我的球衣版本为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());