适用于createEnvelope的Docusignapi java.lang.NoSuchMethodError

时间:2019-07-01 12:39:02

标签: java docusignapi

我正在尝试将Docusign的JAVA SDK 2.1的示例代码集成到我的应用程序中。 身份验证过程顺利进行,但是在调用以下代码时:

EnvelopesApi envelopesApi = new EnvelopesApi(apiClient);
envelopesApi.createEnvelope("1111111", envelopeDefinition);

收到异常:

Caused by: java.lang.NoSuchMethodError: com.fasterxml.jackson.databind.ObjectWriter.getConfig()Lcom/fasterxml/jackson/databind/SerializationConfig;
                at com.fasterxml.jackson.jaxrs.json.JsonEndpointConfig.forWriting(JsonEndpointConfig.java:45)
                at com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider._configForWriting(JacksonJsonProvider.java:223)
                at com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider._configForWriting(JacksonJsonProvider.java:45)
                at com.fasterxml.jackson.jaxrs.base.ProviderBase._configForWriting(ProviderBase.java:481)
                at com.fasterxml.jackson.jaxrs.base.ProviderBase._endpointForWriting(ProviderBase.java:694)
                at com.fasterxml.jackson.jaxrs.base.ProviderBase.writeTo(ProviderBase.java:565)
                at com.sun.jersey.api.client.RequestWriter.writeRequestEntity(RequestWriter.java:300)
                at com.sun.jersey.client.urlconnection.URLConnectionClientHandler._invoke(URLConnectionClientHandler.java:217)
                at com.sun.jersey.client.urlconnection.URLConnectionClientHandler.handle(URLConnectionClientHandler.java:153)
                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.getAPIResponse(ApiClient.java:1125)
                at com.docusign.esign.client.ApiClient.invokeAPI(ApiClient.java:1158)
                at com.docusign.esign.api.EnvelopesApi.createEnvelope(EnvelopesApi.java:764)
                at com.docusign.esign.api.EnvelopesApi.createEnvelope(EnvelopesApi.java:714)
                at com.hlf.plateforme.webservice.DocusignWrapper.sendEnvelope(DocusignWrapper.java:160)
                at com.hlf.plateforme.web.action.demande.EcontratAction.esignature(EcontratAction.java:246)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                at java.lang.reflect.Method.invoke(Method.java:601)
                at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:270)
                ... 36 more

有人可以协助吗?

1 个答案:

答案 0 :(得分:2)

我正在回答我的问题,以防它可以帮助某人:) 最后,这是一个依赖项的版本问题。 com.fasterxml.jackson.core 我将版本更新为最新版本,从而解决了该问题。