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
After clearing the [gf_home]/glassfish/glassfish/domains/domain1/osgi-cache
and try to start the glassfish but there is no luck. Could you please help to advise further?
the approach you did is correct. The problem is that Glassfish 4.0 might not work with newest Jersey version as there might be incompatibilities. Jersey is used internally in Glassfish and when there is a problem with incompatible Jersey versions, Glassfish might not even start (like in your case).
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). 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
In the following article you can find a script that does the update of Jersey 2 in GlassFish 4.0.1 for you:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With