users@jersey.java.net

[Jersey] Re: Jersey not working with WLS 10.3.4 but works under 10.3

From: Pavel Bucek <pavel.bucek_at_oracle.com>
Date: Tue, 22 Feb 2011 19:05:28 +0100

On 02/22/2011 05:45 PM, Yu, Xiaohui wrote:
> Hi Pavel,
>
> I was able to get it going by making changes to same place you pointed out.
>
> Looks like I cannot just use a Context type but rather a more specific ServletContext. That did kick in and worked.
>
fine.
> One thing I'm not sure is Spring DI still didn't work, but from what I read, it seems I need to use an integration piece which I didn't include. I also didn't find the place to download that jar directly but there's some Maven instructions. Is that right?
>
exactly. You'll probably need jersey-spring [1] module, you might find
useful spring-annotations sample [2].

Other download location can be found in jersey user guide, see
dependencies chapter [3]

Regards,
Pavel

[1] http://download.java.net/maven/2/com/sun/jersey/contribs/jersey-spring/
[2]
http://download.java.net/maven/2/com/sun/jersey/samples/spring-annotations/
[3] http://jersey.java.net/nonav/documentation/latest/chapter_deps.html
> Thanks,
> - John
>
> -----Original Message-----
> From: Pavel Bucek [mailto:pavel.bucek_at_oracle.com]
> Sent: Tue 2/22/2011 9:06 AM
> To: users_at_jersey.java.net
> Subject: [Jersey] Re: Jersey not working with WLS 10.3.4 but works under 10.3
>
>
> Hello John,
>
> sorry for late reply..
>
> SEVERE: The following errors and warnings have been detected with resource and/or provider classes:
> SEVERE: Missing dependency for field: private javax.ws.rs.core.Context com.onstar.asd.partnerservices.webservices.impl.AuthenticationServicesImpl.wsContext
>
>
> this indicates that you have somewhere "private @Context
> AuthenticationServicesImpl.wsContext" which Jersey can't inject, most
> likely because it doesn't know about
> AuthenticationServicesImpl.wsContext instance. You might want try to
> remove this field and try again.
>
> Regards,
> Pavel
>
>
>
> On 02/11/2011 09:15 PM, Yu, Xiaohui wrote:
>
>> I switched to Jersey 1.5 - the bundled jar, now I'm getting (No provider classes found):
>>
>> Feb 11, 2011 3:08:51 PM com.sun.jersey.api.core.ScanningResourceConfig init
>> INFO: No provider classes found.
>> Feb 11, 2011 3:08:52 PM com.sun.jersey.server.impl.application.WebApplicationImpl _initiate
>> INFO: Initiating Jersey application, version 'Jersey: 1.5 01/14/2011 12:44 PM'
>> Feb 11, 2011 3:08:53 PM com.sun.jersey.spi.inject.Errors processErrorMessages
>> SEVERE: The following errors and warnings have been detected with resource and/or provider classes:
>> SEVERE: Missing dependency for field: private javax.ws.rs.core.Context com.onstar.asd.partnerservices.webservices.impl.AuthenticationServicesImpl.wsContext
>>
>> I'm still researching, but certainly would appreciate if anyone knows about this.
>>
>> - John
>>
>> -----Original Message-----
>> From: Yu, Xiaohui [mailto:Xiaohui.Yu_at_onstar.com]
>> Sent: Thu 2/10/2011 3:40 PM
>> To: users_at_jersey.java.net
>> Subject: [Jersey] Jersey not working with WLS 10.3.4 but works under 10.3
>>
>> Hi,
>>
>> Our application is using both Jersey and JAX-WS. We also used Spring for DI. When invoked under REST protocol, it works under WLS 10.3 as Spring DI happened. However, when deployed under WLS 10.3.4, neither Spring DI or @Context kicked in, thus service fails. JAX-WS works under both server environments.
>>
>> For Jersey, we used PackageResourceConfig and I did see all services being identified.
>>
>> Feb 10, 2011 2:31:57 PM com.sun.jersey.api.core.PackagesResourceConfig init
>> INFO: Provider classes found:
>> Feb 10, 2011 2:31:57 PM com.sun.jersey.server.impl.application.WebApplicationImpl initiate
>> INFO: Initiating Jersey application, version 'Jersey: 1.1.2-ea 08/25/2009 04:39 PM'
>>
>> What could be the problem? Really appreciate the clarification.
>>
>> Thanks,
>> - John
>>
>>
>>
>>
>
>