users@jersey.java.net

Re: [Jersey] ClassCastException from ProviderServices

From: Imran M Yousuf <imyousuf_at_smartitengineering.com>
Date: Mon, 25 Oct 2010 18:11:12 +0600

Hi Paul,

I tried out 1.5-SNAPSHOT as well without any luck, but will try again
to be sure.

Regards,

Imran

On Mon, Oct 25, 2010 at 5:41 PM, Paul Sandoz <Paul.Sandoz_at_oracle.com> wrote:
>
> On Oct 25, 2010, at 1:08 PM, Imran M Yousuf wrote:
>
>> Hi Paul,
>>
>> I wanted to say "embedded jetty" :). And yes the I was loading jersey
>> from 2 class loaders, I guessed it, tried loading the war-classes as
>> direct dependency and thus avoiding the exception. Thanks for the
>> confirmation. Is there any workaround for 2 classloaders loading same
>> version of jersey for such cases?
>>
>
> I am fairly sure Pavel has fixed this Jersey 1.5-ea01.
>
> Basically when we load the class from the META-INF/service file we check for
> assignability. Previously we did not because we assumed it was a redundant
> check.
>
> The META-INF/services thing is a right PITA. If anyone has any better
> suggestions for each jar to declare components i am all ears. Of course OSGi
> could be a solution but we cannot statically depend on that.
>
> Paul.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>
>



-- 
Imran M Yousuf
Entrepreneur & CEO
Smart IT Engineering Ltd.
25/5B, Block F, Haji Chinu Miah Road Bylane
Joint Quarter, Mohammadpur
Dhaka - 1207, Bangladesh
Email: imran_at_smartitengineering.com
Twitter: @imyousuf - http://twitter.com/imyousuf
Blog: http://imyousuf-tech.blogs.smartitengineering.com/
Mobile: +880-1711402557