users@jersey.java.net

[Jersey] Re: How to upgrade Jersey 2.2 to Glassfish 4?

From: Miroslav Fuksa <miroslav.fuksa_at_oracle.com>
Date: Mon, 26 Aug 2013 16:28:59 +0200

Hi Charlee,

I do not know about correctly working solution how to use newest Jersey
with GF 4.0. In GF 3 there was a possibility to deploy WAR with newest
Jersey jars and configure Glassfish to use jars from the WAR file but I
am not sure this would work:

https://jersey.java.net/documentation/1.17/user-guide.html#d4e1938

If this works you will need to add also Jersey dependencies like HK2.

So, I am sorry but you will have to stay with Jersey 2.0 for some time
or use one of the GF night builds.

Mira


On 08/26/2013 05:18 AM, Charlee Chitsuk wrote:
> Hi Mira and All,
>
> Thank you very much for your help and explanation. Since the Glassfish
> 4.0.1 has not been released yet. Do we have an chance to use the
> Jersey 2.2 within the Glassifish 4.0.0? Should I stick with the Jersey
> 2.0? Could you please help to advise further?
>
> --
> Best Regards,
>
> Charlee Chitsuk
>
>
> 2013/8/23 Miroslav Fuksa <miroslav.fuksa_at_oracle.com
> <mailto:miroslav.fuksa_at_oracle.com>>
>
> Hi,
>
> the approach you did is correct. The problem is that Glassfish 4.0
> might not work with newest Jersey version (there might be
> incompatibilites). You can try using one of the Glassfish night
> builds which have already Jersey 2.2 integrated.
>
> http://dlc.sun.com.edgesuite.net/glassfish/4.0.1/nightly/
>
> The link is accessible from http://glassfish.org (Download->Work
> in progress). The night build versions might be unstable.
>
> You can try for example build:
> http://dlc.sun.com.edgesuite.net/glassfish/4.0.1/nightly/glassfish-4.0.1-b02-08_22_2013.zip
>
> Mira
>
>
>
>
>
> On 08/23/2013 08:53 AM, Charlee Chitsuk wrote:
>> Hi All,
>>
>> I've tried to upgrade the Jersey 2.2 to the Glassfish 4 by
>> replacing the following jars at the [gf_home]/glassfish/modules
>> with version 2.2
>>
>> 1. jersey-bean-validation.jar
>> 2. jersey-client.jar
>> 3. jersey-common.jar
>> 4. jersey-container-grizzly2-http.jar
>> 5. jersey-container-servlet-core.jar
>> 6. jersey-container-servlet.jar
>> 7. jersey-gf-cdi.jar
>> 8. jersey-gf-ejb.jar
>> 9. jersey-media-json-jackson.jar
>> 10. jersey-media-json-jettison.jar
>> 11. jersey-media-json-processing.jar
>> 12. jersey-media-moxy.jar
>> 13. jersey-media-multipart.jar
>> 14. jersey-media-sse.jar
>> 15. jersey-mvc-connector.jar
>> 16. jersey-mvc-jsp.jar
>> 17. jersey-mvc.jar
>> 18. jersey-server.jar
>>
>> After clearing the
>> [gf_home]/glassfish/glassfish/domains/domain1/osgi-cache and I
>> cannot start the glassfish anymore. Could you please help to
>> advise further? Thank you very much for your help in advance.
>>
>> --
>> Best Regards,
>>
>> Charlee Chitsuk
>
>