users@jersey.java.net

Re: [Jersey] fastinfoset support

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Tue, 19 Jan 2010 10:40:14 +0000

On Jan 19, 2010, at 7:45 AM, Florian Hehlen wrote:

> Hi,
>
> Your tip was good. It also allowed me to discover how to log all the
> request/response traffic on the server… great
>
> I am now having a problem in the client which is claiming that I
> need to implement a message body reader.
>
> Exception in thread "main"
> com.sun.jersey.api.client.ClientHandlerException: A message body
> reader for Java type, class [Lcom.imc.ids.dto.IdsSymbol;, and MIME
> media type, application/fastinfoset, was not found
> at
> com
> .sun.jersey.api.client.ClientResponse.getEntity(ClientResponse.java:
> 526)
> at
> com
> .sun.jersey.api.client.ClientResponse.getEntity(ClientResponse.java:
> 491)
> at
> com.sun.jersey.api.client.WebResource.handle(WebResource.java:561)
> at com.sun.jersey.api.client.WebResource.access
> $300(WebResource.java:69)
> at com.sun.jersey.api.client.WebResource
> $Builder.get(WebResource.java:451)
> at
> com
> .imc
> .ids
> .client
> .resources.SymbolResourceProxy.findAll(SymbolResourceProxy.java:98)
> at
> com.imc.ids.client.service.SymbolService.findAll(SymbolService.java:
> 82)
> at
> com.imc.ids.example.browser.tests.SymbolTest.loadAll(SymbolTest.java:
> 36)
> at
> com.imc.ids.example.browser.tests.SymbolTest.test(SymbolTest.java:29)
> at
> com.imc.ids.example.browser.Browser.main(Browser.java:38)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun
> .reflect
> .NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun
> .reflect
> .DelegatingMethodAccessorImpl
> .invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at
> com.intellij.rt.execution.application.AppMain.main(AppMain.java:110)
>
> I have included the fast infoset and jersey-fastinfoset libraries in
> my client. Is that not enough?
>

It should be, as per the dependencies documented here:

   https://jersey.dev.java.net/nonav/documentation/latest/user-guide.html
#d4e863

The components are declared in appropriate META-INF/services files
such that they will be automatically included on the client or server
if in the class path.

What is your client side environment?

Some developers have found it necessary to set the thread context
class loader to classloader of the class that is responsible for
creating the Client before that Client is created.

Paul.