0 Replies Latest reply on Nov 28, 2013 4:54 AM by Yashvi Patel

    java.lang.ClassFormatError: Absent Code attribute in method that is not native or abstract in class file javax/ws/rs/core/MediaType

    Yashvi Patel Newbie

      Hi, I am using jersey server-client for REST webservice on jboss. I am getting this exception when I try to run the client.

      Exception in thread "main" java.lang.ClassFormatError: Absent Code attribute in method that is not native or abstract in class file javax/ws/rs/core/MediaType

          at java.lang.ClassLoader.defineClass1(Native Method)

          at java.lang.ClassLoader.defineClass(ClassLoader.java:634)

          at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)

          at java.net.URLClassLoader.defineClass(URLClassLoader.java:277)

          at java.net.URLClassLoader.access$000(URLClassLoader.java:73)

          at java.net.URLClassLoader$1.run(URLClassLoader.java:212)

          at java.security.AccessController.doPrivileged(Native Method)

          at java.net.URLClassLoader.findClass(URLClassLoader.java:205)

          at java.lang.ClassLoader.loadClass(ClassLoader.java:321)

          at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)

          at java.lang.ClassLoader.loadClass(ClassLoader.java:266)

          at java.lang.Class.getDeclaredMethods0(Native Method)

          at java.lang.Class.privateGetDeclaredMethods(Class.java:2482)

          at java.lang.Class.getDeclaredMethods(Class.java:1838)

          at com.sun.jersey.core.reflection.MethodList.getAllDeclaredMethods(MethodList.java:70)

          at com.sun.jersey.core.reflection.MethodList.<init>(MethodList.java:64)

          at com.sun.jersey.core.spi.component.ComponentConstructor.getPostConstructMethods(ComponentConstructor.java:131)

          at com.sun.jersey.core.spi.component.ComponentConstructor.<init>(ComponentConstructor.java:123)

          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:342)

          at com.sun.jersey.api.client.Client.access$000(Client.java:118)

          at com.sun.jersey.api.client.Client$1.f(Client.java:191)

          at com.sun.jersey.api.client.Client$1.f(Client.java:187)

          at com.sun.jersey.spi.inject.Errors.processWithErrors(Errors.java:193)

          at com.sun.jersey.api.client.Client.<init>(Client.java:187)

          at com.sun.jersey.api.client.Client.<init>(Client.java:159)

          at com.sun.jersey.api.client.Client.create(Client.java:669)

          at com.ussd.client.JerseyClientPost.main(JerseyClientPost.java:13)