users@jersey.java.net

Re: java.lang.NullPointerException on Android

From: Lucas Ventura <useyour.mind_at_gmail.com>
Date: Wed, 9 Jun 2010 00:16:34 -0700 (PDT)

Paul Sandoz wrote:
>
>
> On May 28, 2010, at 11:21 AM, Lucas Ventura wrote:
>
> I would be surprised if ClassLoader.getResources ceased to function
> correctly to load resources (that method is used to load the META-INF/
> services files). But a quick search does indicate others are having
> similar issues with packaging and META-INF/services.
>

The problem after inspecting a little bit, is that the ClassLoader created
by Google neither can't find services files, nor the class implementations.


Paul Sandoz wrote:
>
> There might be a way. It is possible to override the META-INF/services
> lookup by using the following method:
>
> https://jersey.dev.java.net/nonav/apidocs/latest/jersey/com/sun/jersey/spi/service/ServiceFinder.html
> #setIteratorProvider
> %28com.sun.jersey.spi.service.ServiceFinder.ServiceIteratorProvider%29
>
> So you could provide your own implementation.
>
> Paul.
>

So I've provided a hardcoded implementation with the names of the classes
indicateds in the META-INF/services files.
The question is: when I should do this call to serIteratorProvider()?
Because if I do before the Client creation it is looking for service
jersey-client-components. If I do after, it works, but... will be called
again with a that kind of serviceName?

Thanks a lot :)
-- 
View this message in context: http://jersey.576304.n2.nabble.com/java-lang-NullPointerException-on-Android-tp4212447p5157052.html
Sent from the Jersey mailing list archive at Nabble.com.