docusign / docusign-esign-java-client

The Official Docusign Java Client Library used to interact with the eSignature REST API. Send, sign, and approve documents using this client.
https://javadoc.io/doc/com.docusign/docusign-esign-java/latest/index.html
MIT License
105 stars 96 forks source link

ApiClient.requestJWTUserToken throws javax.ws.rs.ProcessingException #182

Closed AugustZellmer closed 3 years ago

AugustZellmer commented 3 years ago

Okay, tbh I don't know if this is an issue with Docusign or with Resteasy or with Jakarta, but I figured I'd ask here first.

Whenever I call ApiClient.requestJWTUserToken, it throws

javax.ws.rs.ProcessingException: RESTEASY003215: could not find writer for content-type application/x-www-form-urlencoded type: javax.ws.rs.core.Form
 at org.jboss.resteasy.core.interception.jaxrs.ClientWriterInterceptorContext.throwWriterNotFoundException(ClientWriterInterceptorContext.java:50)
 at org.jboss.resteasy.core.interception.jaxrs.AbstractWriterInterceptorContext.getWriter(AbstractWriterInterceptorContext.java:302)
 at org.jboss.resteasy.core.interception.jaxrs.AbstractWriterInterceptorContext.syncProceed(AbstractWriterInterceptorContext.java:240)
 at org.jboss.resteasy.core.interception.jaxrs.AbstractWriterInterceptorContext.proceed(AbstractWriterInterceptorContext.java:224)
 at org.jboss.resteasy.client.jaxrs.internal.ClientInvocation.writeRequestBody(ClientInvocation.java:444)
 at org.jboss.resteasy.client.jaxrs.engines.ManualClosingApacheHttpClient43Engine.writeRequestBodyToOutputStream(ManualClosingApacheHttpClient43Engine.java:601)
 at org.jboss.resteasy.client.jaxrs.engines.ManualClosingApacheHttpClient43Engine.buildEntity(ManualClosingApacheHttpClient43Engine.java:560)
 at org.jboss.resteasy.client.jaxrs.engines.ManualClosingApacheHttpClient43Engine.loadHttpMethod(ManualClosingApacheHttpClient43Engine.java:465)
 at org.jboss.resteasy.client.jaxrs.engines.ManualClosingApacheHttpClient43Engine.invoke(ManualClosingApacheHttpClient43Engine.java:275)

Do you know what could cause this? Have I configured something wrong?

ivdinkovds commented 3 years ago

@AugustZellmer, I do not remember seeing this error before, but the exception it looks like is thrown by RESTEASY003215.

AugustZellmer commented 3 years ago

yeah, it seems to be impossible to use this jar alongside RestEasy (afaict), so I just hit the raw endpoints. but it'd be nice if this jar wasn't dependent on the Jersey implementation of jax-rs.

finnMasurat commented 2 years ago

hello there, the problem still exists:

javax.ws.rs.ProcessingException: RESTEASY004655: Unable to invoke request: javax.ws.rs.ProcessingException: RESTEASY003215: could not find writer for content-type application/x-www-form-urlencoded type: javax.ws.rs.core.Form
  at org.jboss.resteasy.client.jaxrs.engines.ApacheHttpClient4Engine.invoke(ApacheHttpClient4Engine.java:341)
  at org.jboss.resteasy.client.jaxrs.internal.ClientInvocation.invoke(ClientInvocation.java:464)
  at org.jboss.resteasy.client.jaxrs.internal.ClientInvocation.invoke(ClientInvocation.java:65)
  at org.jboss.resteasy.client.jaxrs.internal.ClientInvocationBuilder.post(ClientInvocationBuilder.java:232)
  at com.docusign.esign.client.ApiClient.requestJWTUserToken(ApiClient.java:914)

We've discovered that docusign-ensign-java-client uses JAX-RS, but also JAX-RS implementation specifics from Jersey which enforces Jersey as a library onto consumers. Would it be possible to make use of the JAX-RS spec only, i.e. without Jersey? This way a consumer could use its own JAX-RS implementation, whichever it may be..