我收到以下例外:
java.lang.ClassFormatError: Absent Code attribute in method that is
not native or abstract in class file javax/ws/rs/core/MediaType
日志如下:
java.lang.ClassLoader.defineClass(ClassLoader.java:621) 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:2484) at
java.lang.Class.getDeclaredMethods(Class.java:1827) 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)