users@jersey.java.net

Re: [Jersey] Using Jersey on Android

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Wed, 10 Jun 2009 06:37:23 +0200

Hi Martin,

Hard for me to tell what is going on without more information.

Can you present the exception in more detail?

Any details on how you ported things to Android?

Do you know if there is a "white list" of supported classes on the
Android platform?

Paul.

On Jun 9, 2009, at 8:05 PM, Martin Mörner wrote:

> Hello everybody!
>
> I'm a student in a mobile development group and we are trying to
> build a
> REST Client for Android. Our first thougt, was using Jersey cause to
> the
> easy use and parsing of XML <-> Object. But since we ported this on
> android it seems to cause a NullPointerException:
>
> private Client client = new Client();
> private WebResource wr = new WebResource();
> private OwnObjectType object = new OwnObjectType();
> ...
>
> wr = client.resource(URL);
> try {
> wr.accept(MediaType.APPLICATION_XML_TYPE);
> object = wr.get(OwnObjectType.class);
> }
>
> Building this with the included Jersey Libs is working fine, but when
> executed the wr.get() throws a NullPointerExecption from internal
> Jersey Libs @getMediaType. The same code runs fine in a "normal"
> Java-App.
>
> Does anyone know, how to get this working?
>
> Best Regards,
>
> Martin
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>