tableau / rest-api-samples

Samples for the Tableau REST API
MIT License
394 stars 273 forks source link

Java: Worbook Sample Upload: Fails by com.sun.jersey.api.client.ClientHandlerException #63

Closed ascen02 closed 3 years ago

ascen02 commented 3 years ago

Hi everyone,

the Workbookupload fails: I use the unmodified code. Do you have an advice for me? API Version is 3.12.

Exception in thread "main" com.sun.jersey.api.client.ClientHandlerException: com.sun.jersey.api.client.ClientHandlerException: A message body writer for Java type, class com.sun.jersey.multipart.MultiPart, and MIME media type, multipart/mixed;boundary=Boundary_1_1389432760_1636705591685, was not found 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.put(WebResource.java:539) at com.tableausoftware.documentation.api.rest.util.RestApiUtils.putMultipart(RestApiUtils.java:994) at com.tableausoftware.documentation.api.rest.util.RestApiUtils.invokeAppendFileUpload(RestApiUtils.java:621) at com.tableausoftware.documentation.api.rest.util.RestApiUtils.invokePublishWorkbookChunked(RestApiUtils.java:692) at com.tableausoftware.documentation.api.rest.util.RestApiUtils.invokePublishWorkbook(RestApiUtils.java:284) at com.tableausoftware.documentation.api.rest.Test.main(Test.java:96) Caused by: com.sun.jersey.api.client.ClientHandlerException: A message body writer for Java type, class com.sun.jersey.multipart.MultiPart, and MIME media type, multipart/mixed;boundary=Boundary_1_1389432760_1636705591685, was not found at com.sun.jersey.api.client.RequestWriter.writeRequestEntity(RequestWriter.java:288) at com.sun.jersey.client.urlconnection.URLConnectionClientHandler._invoke(URLConnectionClientHandler.java:217) at com.sun.jersey.client.urlconnection.URLConnectionClientHandler.handle(URLConnectionClientHandler.java:153) ... 9 more

Regards, Fabian

ascen02 commented 3 years ago

An upgrade of the libs fixed the issue.

com.sun.jersey jersey-client 1.19.4 org.glassfish.jersey.core jersey-client 3.0.3 com.sun.jersey.contribs jersey-multipart 1.19.4 com.sun.jersey jersey-server 1.19.4