users@glassfish.java.net

Re: Jersey Failure

From: Paul Sandoz <Paul.Sandoz_at_oracle.com>
Date: Tue, 5 Oct 2010 11:32:22 +0200

Hi,

I think this is a conflict with the version of Jersey client you are
using in the WEB-INF/lib and the version of Jersey distributed with
GlassFish.

Have you enabled class loader delegation to be false?

You will also need to set a system property, see the following, until
we resolve a proper white lease of classes in javax.* packages that
can be delegated:

https://jersey.dev.java.net/nonav/documentation/latest/user-
guide.html#glassfish

Paul.


On Sep 20, 2010, at 11:47 AM, glassfish_at_javadesktop.org wrote:

> Hello Everyone ,
> I am trying to run a Jersey client from Glassfish v3. I seem to
> always get this error no matter what I do. I am running this from a
> servlet if that helps. Here is a snippet , I can post the whole
> thing if you like as well as a list of jars in the app and the
> server if that would help. I am using Jersey client and core 1.5.
>
> WARNING: StandardWrapperValve[CreditServlet]: PWC1406:
> Servlet.service() for servlet CtServlet threw exception
> java.lang.AbstractMethodError
> at
> com
> .sun
> .jersey
> .core
> .spi
> .factory
> .MessageBodyFactory._getMessageBodyReader(MessageBodyFactory.java:229)
> at
> com
> .sun
> .jersey
> .core
> .spi
> .factory
> .MessageBodyFactory.getMessageBodyReader(MessageBodyFactory.java:215)
> ...
>
> Here is the source code , its quite small to be throwing such large
> errors
> ClientConfig config = new DefaultClientConfig();
> Client client = Client.create(config);
> WebResource webResource = client.resource("http://glootverify.somepath.com
> ");
> webResource.path("/rest/service");
> String s = webResource.get(String.class);
> ...
> [Message sent by forum member 'ubuntupenguin']
>
> http://forums.java.net/jive/thread.jspa?messageID=483129
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>