users@glassfish.java.net

Re: RE: Jersey Failure

From: <glassfish_at_javadesktop.org>
Date: Mon, 20 Sep 2010 17:23:57 PDT

Thanks for the help Martin. I got it working but something even weirder happened. This is the code.

            ClientConfig config = new DefaultClientConfig();
            Client client = Client.create(config);
            WebResource webResource = client.resource("https://someurl.com");

            ClientResponse response2 = webResource.path("/somepath").get(ClientResponse.class);
            System.out.println( response2.getStatus() );
            System.out.println( response2.getHeaders().get("Content-Type") );
            String entity = response2.getEntity(String.class);
            System.out.println(entity);

In a Main file it works like a charm , however , in a servlet I continue to get the
java.lang.AbstractMethodError at com.sun.jersey.core.spi.factory.MessageBodyFactory._getMessageBodyReader(MessageBodyFactory.java:229)


Any reason this code would work in a Main file but fail catastrophically in a servlet ? I am using Glassfish v3 if that helps.
[Message sent by forum member 'ubuntupenguin']

http://forums.java.net/jive/thread.jspa?messageID=483197