users@jersey.java.net

[Jersey] Jersey client errors out on a 204 HTTP status code

From: Jonathan Taub <jtaub_at_book.com>
Date: Mon, 17 Oct 2011 10:51:42 -0400

The 204 status code indicates a successful response with no body (void
"return type").

The service I consumed with my client so far all returned a 200 upon
success.

For whatever reason, the Jersey client throws an error when getting the
204 (see below stack trace).

I searched online but couldn't really find anything. Does anyone has any
clue?

 

com.sun.jersey.api.client.UniformInterfaceException: POST
http://devserver.com:8080/RecommendationService/setProductViewed?custome
rid=000bC3gOo0n4ECK2&ean=9781741798050 returned a response status of 204

       at
com.sun.jersey.api.client.ClientResponse.getEntity(ClientResponse.java:5
27) ~[jersey-client-1.4.jar:1.4]

       at
com.sun.jersey.api.client.ClientResponse.getEntity(ClientResponse.java:5
05) ~[jersey-client-1.4.jar:1.4]

 



This electronic mail message contains information that (a) is or
may be CONFIDENTIAL, PROPRIETARY IN NATURE, OR OTHERWISE
PROTECTED
BY LAW FROM DISCLOSURE, and (b) is intended only for the use of
the addressee(s) named herein. If you are not an intended
recipient, please contact the sender immediately and take the
steps necessary to delete the message completely from your
computer system.

Not Intended as a Substitute for a Writing: Notwithstanding the
Uniform Electronic Transaction Act or any other law of similar
effect, absent an express statement to the contrary, this e-mail
message, its contents, and any attachments hereto are not
intended
to represent an offer or acceptance to enter into a contract and
are not otherwise intended to bind this sender,
barnesandnoble.com
llc, barnesandnoble.com inc. or any other person or entity.