users@jersey.java.net

Re: [Jersey] Jersey 1.2 / Glassfish 3

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Fri, 04 Jun 2010 10:48:45 +0200

Hi Daniel,

[Not sure why the email has a date of April 8th]

On Apr 8, 2010, at 6:43 PM, Daniel Mischler wrote:

> Hi all
>
> I'm trying to get jersey version 1.2 up and running on my glassfish
> v3.0. I've
> updated everything according to https://jersey.dev.java.net/nonav/documentation/latest/user-guide.html
> #d4e1730 -> Chapter 9.
>
> It seems to be working but I getting the error message below:
>
> INFO: Initiating Jersey application, version 'Jersey: 1.2 05/07/2010
> 02:11 PM'
> INFO: Adding the following classes declared in META-INF/services/
> jersey-server-components to the resource configuration:
> class com.sun.jersey.multipart.impl.FormDataMultiPartDispatchProvider
> class com.sun.jersey.multipart.impl.MultiPartConfigProvider
> class com.sun.jersey.multipart.impl.MultiPartReader
> class com.sun.jersey.multipart.impl.MultiPartWriter
> SEVERE: The provider class, class
> com.sun.jersey.core.impl.provider.xml.SAXParserContextProvider,
> could not be instantiated. Processing will continue but the class
> will not be utilized
> java.lang.NullPointerException
>

Is that the only error message?

Are you sure you removed all the previous jersey related jars in the
GF distribution?



>
> What (obvious :-) point am I missing? I'm working with maven and
> eclipse so I guess all dependencies should be haldled automatically,
> right?
>
> Is it crucial to use the exact same version for glassfish and the
> project itself, i.e. jersey 1.2, or is it ok to have glassfish
> running on jersey 1.2 and the project on jersey 1.2 snapshot?
>

If you move from say Jersey 1.1.5.1 to 1.2 you should recompile your
app. If say we release Jersey 1.2.1 you should not have to recompile
an app compile against 1.2, it should be binary backwards compatible.
So in general 1.x releases are not binary compatible with 1.y releases
where x < y.

For 1.2 i recommend using the same version of Jersey for the app as in
GF and there is any way no need to use the 1.2-SNAPSHOT since it is
defunct. The latest unstable release is 1.3-SNAPSHOT.

For 1.3-SNAPSHOT you can use that version of Jersey for the app and
have a different version of Jersey in GF as long as you define class
loader delegation to false.


> Thanks for your help
>
> Daniel
>
>
> PS. I'm also going to need atmosphere and I know I'm in the wrong
> list ;-) But maybe it could be answered in the same post if jersey
> 1.2 is ok with it (atmosphere 0.6.0 snapshot or another version)
>

Yes.

Paul.