users@jersey.java.net

Re: [Jersey] question about Client API

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Thu, 30 Apr 2009 18:41:50 +0200

On Apr 30, 2009, at 6:34 PM, Felipe Gaścho wrote:

> My service has this resource:
> http://fgaucho.dyndns.org:8080/footprint-service/user/read/5
>
> then I tried to run a test case using the following code:
>
> @Test
> public void createUser() {
> Client client = Client.create();
> WebResource webResource = client
> .resource("http://fgaucho.dyndns.org:8080/footprint-service/user/read/5
> ");
> FpUserWritable user = webResource.get(FpUserWritable.class);
> }
>
> and the exception:
>
> java.lang.ClassFormatError: Absent Code attribute in method that is
> not native or abstract in class file javax/servlet/http/HttpServlet
> at java.lang.ClassLoader.defineClass1(Native Method)
> at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
> at
> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:
> 124)
> at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
>
> ...
>
> what is wrong ??
>

It looks like another stubbed jar issue you were running into
previously.

The problem being:

  <classpathentry kind="var"
path="M2_REPO/javaee/javaee-api/5/javaee-api-5.jar"/>

Paul.