dev@glassfish.java.net

Re: rest call failing

From: Jason Lee <jason.d.lee_at_oracle.com>
Date: Fri, 07 Dec 2012 16:14:42 -0600

To close the loop on this publicly, we're in the middle of migrating to
a lighter response document format for GlassFish 4. As a part of this,
we will only be supporting JSON encoding. This new document is the
default format (so that new users/clients won't start using
the..."deprecated"/legacy format). The old format and encodings (HTML,
JSON, and XML) are still supported, but must be requested via the header
X-GlassFish-3 (possibly subject to change). The value of the header is
arbitrary.

This change will be documented in its final form with the GlassFish 4
release notes.

On 12/07/2012 02:59 PM, JJ Snyder wrote:
> I am running a client app which is making rest calls to a running
> glassfish server. The 2 calls are:
>
> GET http://localhost:4848/management/domain/servers/server
> GET http://localhost:4848/management/domain/servers/server/server
>
> In GlassFish 3.x this works fine.
>
> In GlassFish trunk the first request works but the second is failing
> with:
>
> HttpResponsePacket (
> status=500
> reason=MessageBodyWriter not found for media type=application/xml,
> type=class java.util.TreeMap, genericType=class java.lang.Object.
> protocol=HTTP/1.1
> content-length=0
> committed=true
> headers=[
> Date=Fri, 07 Dec 2012 20:43:16 GMT
> Connection=close
> Content-Length=0]
> )
>
>
> Where are these resources defined so I can see where the accept types
> are set...I've been looking in the admin module but can't seem to find
> them.
>
> Any pointers would be greatly appreciated!
>
> JJ


-- 
Jason Lee
Principal Member of Technical Staff
GlassFish Team
Oracle Corporation
Phone +1 405-216-3193
Blog http://blogs.steeplesoft.com