users@jersey.java.net

[Jersey] Re: Jersey error with 0.7-SNAPSHOT + Glassfish 3.1 (Jersey issue)

From: Paul Sandoz <Paul.Sandoz_at_oracle.com>
Date: Tue, 25 Jan 2011 14:54:00 +0100

Hi,

I presume the exception is not stopping the app from functioning?

What is the build revision of GF 3.1? Does it have Jersey 1.5 in it?

I suspect it might and the 1.5 version in the war is clashing with the
1.5 version in GF, sigh... isolation in wars is so broken. If this is
the case the thing to do here is change the sun-web.xml class loader
delegation to false, otherwise include the jersey-mulitpart dependency
in the pom:

<dependency>
     <groupId>com.sun.jersey.contribs</groupId>
     <artifactId>jersey-multipart</artifactId>
     <version>1.5</version>
</dependency>

But remember that if atmosphere starts to use a later version of
Jersey than GF then to reset your modifications.

Paul.

On Jan 21, 2011, at 2:39 PM, jfarcand wrote:

> Salut,
>
> forwarding to the Jersey user list as it sound like a problem with
> GlassFish + Jersey.
>
> A+
>
> -- Jeanfrancois
>
> On 11-01-21 2:04 AM, Phill wrote:
>> I get the following exception whilst trying the 0.7-SNAPSHOT
>> atmosphere-jquery-pubsub sample in Glassfish 3.1
>>
>> [#|2011-01-21T07:57:04.714+0100|SEVERE|glassfish3.1|
>> com.sun.jersey.core.spi.component.ProviderFactory|
>> _ThreadID=23;_ThreadName=Thread-5;|The provider class, class
>> com.sun.jersey.multipart.impl.MultiPartReaderClientSide, could not
>> be instantiated. Processing will continue but the class will not be
>> utilized
>> java.lang.IllegalArgumentException: The MultiPartConfig instance we
>> expected is not present. Have you registered the
>> MultiPartConfigProvider class?
>> at
>> com
>> .sun
>> .jersey
>> .multipart
>> .impl
>> .MultiPartReaderClientSide.<init>(MultiPartReaderClientSide.java:102)
>> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
>> Method)
>> at
>> sun
>> .reflect
>> .NativeConstructorAccessorImpl
>> .newInstance(NativeConstructorAccessorImpl.java:39)
>> at
>> sun
>> .reflect
>> .DelegatingConstructorAccessorImpl
>> .newInstance(DelegatingConstructorAccessorImpl.java:27)
>> at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
>> at
>> com
>> .sun
>> .jersey
>> .core
>> .spi
>> .component
>> .ComponentConstructor._getInstance(ComponentConstructor.java:198)
>> ...
>>
>> -Phill