users@jersey.java.net

[Jersey] Re: Bizarre stack trace with jersey-client

From: Gili <cowwoc_at_bbs.darktech.org>
Date: Sun, 13 Mar 2011 19:12:01 -0700 (PDT)

Paul,

I filed a bug report with Netbeans:
http://netbeans.org/bugzilla/show_bug.cgi?id=196647

Have you given more thought to catching ClassFormatError since this issue
originally came up? Here is the exception I am getting using Jersey 1.5. You
will notice it is a bit different from what has been reported above:

java.lang.ClassFormatError: Absent Code attribute in method that is not
native or abstract in class file javax/mail/MessagingException
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
        at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
        at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
        at java.lang.Class.getDeclaredMethods0(Native Method)
        at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
        at java.lang.Class.getDeclaredMethods(Class.java:1791)
        at
com.sun.jersey.core.reflection.MethodList.getAllDeclaredMethods(MethodList.java:70)
        at com.sun.jersey.core.reflection.MethodList.(MethodList.java:64)
        at
com.sun.jersey.core.spi.component.ComponentConstructor.getPostConstructMethod(ComponentConstructor.java:126)
        at
com.sun.jersey.core.spi.component.ComponentConstructor.(ComponentConstructor.java:120)
        at
com.sun.jersey.core.spi.component.ProviderFactory.__getComponentProvider(ProviderFactory.java:165)
        at
com.sun.jersey.core.spi.component.ProviderFactory.getComponentProvider(ProviderFactory.java:137)
        at
com.sun.jersey.core.spi.component.ProviderServices.getComponent(ProviderServices.java:256)
        at
com.sun.jersey.core.spi.component.ProviderServices.getServices(ProviderServices.java:160)
        at
com.sun.jersey.core.spi.factory.MessageBodyFactory.initReaders(MessageBodyFactory.java:176)
        at
com.sun.jersey.core.spi.factory.MessageBodyFactory.init(MessageBodyFactory.java:162)
        at com.sun.jersey.api.client.Client.init(Client.java:329)
[snip]

  I believe Jersey is invoking getAllDeclaredMethods() on
MimeMultipartProvider which, in turn, references JavaMail.

Gili

--
View this message in context: http://jersey.576304.n2.nabble.com/Bizarre-stack-trace-with-jersey-client-tp785445p6167664.html
Sent from the Jersey mailing list archive at Nabble.com.