galaxyproject / blend4j

blend4j is a JVM partial reimplementation of the Python library bioblend for interacting with Galaxy, CloudMan, and BioCloudCentral.
Eclipse Public License 1.0
16 stars 22 forks source link

Registers MultiPartWriter.class with the ClientConfig before creating… #33

Closed ksuderman closed 6 years ago

ksuderman commented 8 years ago

I am attempting to use Blend4J to manipulate Galaxy programmatically. In particular to use the ToolsClient.uploadRequest method to add a file to the current history in Galaxy. However, at runtime this results in the exception:

com.sun.jersey.api.client.ClientHandlerException: A message body writer for Java type, class com.sun.jersey.multipart.FormDataMultiPart, and MIME media type, multipart/form-data, was not found

I found this solution on StackOverflow that does solve the problem for me: http://stackoverflow.com/questions/15585074/jersey-client-exception-a-message-body-writer-was-not-found.

Even though the MultiPartWriter class is available on the CLASSPATH it still needs to be added to the ClientConfig. This PR simply applies the above fix.

apetkau commented 6 years ago

I'm closing this as it is quite old. If it is still an issue, could you please re-submit from the latest code?

We apologize for not getting to this sooner.