users@jersey.java.net

Re: [Jersey] Websphere 6.1 integration

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Thu, 04 Feb 2010 11:24:45 +0100

On Feb 4, 2010, at 10:41 AM, VINCENT Matthieu (Prestataire) wrote:

> Hi Paul,
>
> Thanks for this quick answer :)
>
> Attached are:
> * Log file when deploying application
> * Log file when websphere starts
> (sorry there're in french)
>

Pas problem.

 From the deploy log i see that the Jersey application deployed OK:

[04/02/10 10:40:20:345 CET] 00000027 ServletWrappe I SRVE0242I: [xxx-
client_war] [/xxx-client] [xxxClientMessaging] : L'initialisation a
abouti.
[04/02/10 10:40:20:361 CET] 00000027 ClasspathReso I Scanning for
root resource and provider classes in the paths:
   D:\Outils\IBM\SDP70\runtimes\base_v61\profiles\xxx\installedApps
\FREIFDKT0012845Node04Cell\xxx-client_war.ear\xxx-client.war\WEB-INF\lib
   D:\Outils\IBM\SDP70\runtimes\base_v61\profiles\xxx\installedApps
\FREIFDKT0012845Node04Cell\xxx-client_war.ear\xxx-client.war\WEB-INF
\classes
[04/02/10 10:40:21:282 CET] 00000027 ClasspathReso I Root resource
classes found:
   class fr.yyy.xxx.client.service.Service
[04/02/10 10:40:21:282 CET] 00000027 ClasspathReso I Provider
classes found:
[04/02/10 10:40:21:736 CET] 00000027 ServletWrappe I SRVE0242I: [xxx-
client_war] [/xxx-client] [xxxClientService] : L'initialisation a
abouti.
[04/02/10 10:40:21:736 CET] 00000027 VirtualHost I SRVE0250I:
Module Web xxx Client li? ? xxx_host[*:9780].
[04/02/10 10:40:21:736 CET] 00000027 ApplicationMg A WSVR0221I:
L'application est lanc�e : xxx-client_war


However i notice in the start log a slightly different deployment:

[03/02/10 14:09:09:697 CET] 00000018 ServletWrappe I SRVE0242I: [xxx-
client] [/xxx-client] [xxxClientMessaging] : L'initialisation a abouti.
[03/02/10 14:09:09:822 CET] 00000018 ClasspathReso I Scanning for
root resource and provider classes in the paths:
   D:\Outils\IBM\SDP70\runtimes\base_v61\profiles\xxx\installedApps
\FREIFDKT0012845Node04Cell\xxx-client.ear\xxx-client.war\WEB-INF\lib
\xxx-client-service-SNAPSHOT.jar
[03/02/10 14:09:09:932 CET] 00000018 ClasspathReso I Root resource
classes found:
   class fr.yyy.xxx.client.service.Service
[03/02/10 14:09:09:932 CET] 00000018 ClasspathReso I Provider
classes found:
[03/02/10 14:09:10:650 CET] 00000018 ServletWrappe I SRVE0242I: [xxx-
client] [/xxx-client] [xxxClientService] : L'initialisation a abouti.
[03/02/10 14:09:10:650 CET] 00000018 VirtualHost I SRVE0250I:
Module Web xxx Client li? ? xxx_host[*:9780].


Is that intended?


> The context path should be ok because I've another servlet running
> on this web-app and I can call it without any problem unless
> websphere may have several?
>
> I think it may be a configuration problem... I saw yesterday an
> article explaining that a fix was needed to make it work (actually,
> I'm running websphere on version 6.1.0.9 whereas article tells to
> update to 6.1.0.25) but as it's a critical application I would be
> rather sure that this is compulsory before doing it.
>

Given that the application deploys OK and an vanilla servlet works OK
it does indicate a configuration issue, most likely with paths.

Can you send me the web.xml?


 From the information it is hard to tell if the request URI is being
matched against the Jersey servlet or not i.e. is Jersey returning a
404 response or is WebSphere.

Are you deploying a war inside an ear, if so can you try an experiment
deploying the war directly. Also you can experiment by deploying a
very simple hello world example, see here:

   http://download.java.net/maven/2/com/sun/jersey/samples/helloworld-webapp/

and pick the Jersey version you are using.


Unfortunately I do not know much about WebSphere nor how to work
around issues in particular versions.

Paul.


> Thanks for your return
>
> PS: I added my colleague in copy of this mail because he's
> interested in the subject too ;)
>
> Matthieu
>
> -----Message d'origine-----
> De : Paul.Sandoz_at_Sun.COM [mailto:Paul.Sandoz_at_Sun.COM]
> Envoyé : jeudi 4 février 2010 10:07
> À : users_at_jersey.dev.java.net
> Cc : VINCENT Matthieu (Prestataire)
> Objet : Re: [Jersey] Websphere 6.1 integration
>
> Hi Matthieu,
>
> Can you send the log output from WebSphere when you deploy the Jersey-
> base web application?
>
> Also you might want to double check the context path that WebSphere
> uses when deploying the web application as it might be different to
> that when deployed by GlassFish v2.
>
> Paul.
>
> On Feb 3, 2010, at 3:24 PM, VINCENT Matthieu (Prestataire) wrote:
>
>> Hi,
>>
>> I'm actually developing a web application using services REST with
>> Jersey.
>> When I deploy my application on Glassfish (v2), I've no problem to
>> communicate between my 2 parts.
>> Problems come when trying on Websphere 6_1, I receive a 404 error
>> when calling my service.
>>
>> com.sun.jersey.api.client.UniformInterfaceException: POST http://localhost:9780/xxx/service/
>> returned a response status of 404
>> at
>> com.sun.jersey.api.client.WebResource.handle(WebResource.java:562)
>> at com.sun.jersey.api.client.WebResource.access
>> $300(WebResource.java:68)
>> at com.sun.jersey.api.client.WebResource
>> $Builder.post(WebResource.java:498)
>>
>> So I'm looking for any feedback on jersey integration and deployment
>> on a Websphere server.
>>
>> Thanks in advance
>>
>> Matthieu
>> Java/J2EE Consultant
>
> <
> was_start
> .log
> >
> <
> was_deploy
> .log
> >---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net