users@jersey.java.net

Re: [Jersey] java.lang.NoSuchMethodError on Websphere

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Mon, 09 Mar 2009 16:39:48 +0100

Hi Sanjay,

WebSphere is using a different version of the ASM jar. Jersey requires
ASM version 3.1.

Unfortunately I do not know enough about WebSphere to resolve the
dependency issue so that the Web application can override the ASM
version supplied with WebSphere.

Paul.

On Mar 6, 2009, at 5:58 PM, Patel, Sanjay wrote:

> Hi,
>
> I am new in Jersey. I developed very small app in Jersey and able to
> deploy/run in jetty server. When I tired to deployed it in Webspher
> Community Edition it gave me following error. Any Idea ?
>
> java.lang.NoSuchMethodError:
> org.objectweb.asm.ClassReader.accept(Lorg/objectweb/asm/
> ClassVisitor;I)V
> at
> com
> .sun
> .jersey
> .server
> .impl
> .container
> .config
> .AnnotatedClassScanner.analyzeClassFile(AnnotatedClassScanner.java:
> 273)
>
> at
> com
> .sun
> .jersey
> .server
> .impl
> .container
> .config.AnnotatedClassScanner.indexDir(AnnotatedClassScanner.java:222)
> at
> com
> .sun
> .jersey
> .server
> .impl
> .container
> .config.AnnotatedClassScanner.index(AnnotatedClassScanner.java:195)
> at
> com
> .sun
> .jersey
> .server
> .impl
> .container
> .config.AnnotatedClassScanner.scan(AnnotatedClassScanner.java:130)
> at
> com
> .sun
> .jersey
> .api.core.PackagesResourceConfig.init(PackagesResourceConfig.java:114)
> at
> com
> .sun
> .jersey
> .api.core.PackagesResourceConfig.<init>(PackagesResourceConfig.java:
> 78)
> at
> com
> .sun
> .jersey
> .api.core.PackagesResourceConfig.<init>(PackagesResourceConfig.java:
> 89)
> at
> com
> .sun
> .jersey
> .spi
> .container
> .servlet.WebComponent.createResourceConfig(WebComponent.java:516)
> at
> com
> .sun
> .jersey.spi.container.servlet.WebComponent.init(WebComponent.java:164)
> at
> com
> .sun
> .jersey
> .spi.container.servlet.ServletContainer.init(ServletContainer.java:
> 197)
> at
> org
> .apache
> .catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1064)
> at
> org
> .apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:
> 782)
> at
> org
> .apache
> .catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:
> 129)
> at
> org
> .apache
> .catalina.core.StandardContextValve.invoke(StandardContextValve.java:
> 191)
> at
> org
> .apache
> .geronimo
> .tomcat.valve.DefaultSubjectValve.invoke(DefaultSubjectValve.java:56)
> at org.apache.geronimo.tomcat.GeronimoStandardContext
> $SystemMethodValve.invoke(GeronimoStandardContext.java:406)
>
> at
> org
> .apache
> .geronimo
> .tomcat
> .valve.GeronimoBeforeAfterValve.invoke(GeronimoBeforeAfterValve.java:
> 47)
> at
> org
> .apache
> .catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
> at
> org
> .apache
> .catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
> at
> org
> .apache
> .catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:
> 109)
> at
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:
> 568)
> at
> org
> .apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:
> 286)
> at
> org
> .apache.coyote.http11.Http11Processor.process(Http11Processor.java:
> 845)
> at org.apache.coyote.http11.Http11Protocol
> $Http11ConnectionHandler.process(Http11Protocol.java:583)
> at org.apache.tomcat.util.net.JIoEndpoint
> $Worker.run(JIoEndpoint.java:447)
> at java.lang.Thread.run(Thread.java:619)
> 2009-03-06 09:25:30,367 ERROR [[Find-A-Doc Jersey Web Application]]
> Allocate exception for servlet Find-A-Doc Jersey Web Application
>
> java.lang.NoSuchMethodError:
> org.objectweb.asm.ClassReader.accept(Lorg/objectweb/asm/
> ClassVisitor;I)V
> at
> com
> .sun
> .jersey
> .server
> .impl
> .container
> .config
> .AnnotatedClassScanner.analyzeClassFile(AnnotatedClassScanner.java:
> 273)
>
> at
> com
> .sun
> .jersey
> .server
> .impl
> .container
> .config.AnnotatedClassScanner.indexDir(AnnotatedClassScanner.java:222)
> at
> com
> .sun
> .jersey
> .server
> .impl
> .container
> .config.AnnotatedClassScanner.index(AnnotatedClassScanner.java:195)
> at
> com
> .sun
> .jersey
> .server
> .impl
> .container
> .config.AnnotatedClassScanner.scan(AnnotatedClassScanner.java:130)
> at
> com
> .sun
> .jersey
> .api.core.PackagesResourceConfig.init(PackagesResourceConfig.java:114)
> at
> com
> .sun
> .jersey
> .api.core.PackagesResourceConfig.<init>(PackagesResourceConfig.java:
> 78)
> at
> com
> .sun
> .jersey
> .api.core.PackagesResourceConfig.<init>(PackagesResourceConfig.java:
> 89)
> at
> com
> .sun
> .jersey
> .spi
> .container
> .servlet.WebComponent.createResourceConfig(WebComponent.java:516)
> at
> com
> .sun
> .jersey.spi.container.servlet.WebComponent.init(WebComponent.java:164)
> at
> com
> .sun
> .jersey
> .spi.container.servlet.ServletContainer.init(ServletContainer.java:
> 197)
> at
> org
> .apache
> .catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1064)
> at
> org
> .apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:
> 782)
> at
> org
> .apache
> .catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:
> 129)
> at
> org
> .apache
> .catalina.core.StandardContextValve.invoke(StandardContextValve.java:
> 191)
> at
> org
> .apache
> .geronimo
> .tomcat.valve.DefaultSubjectValve.invoke(DefaultSubjectValve.java:56)
> at org.apache.geronimo.tomcat.GeronimoStandardContext
> $SystemMethodValve.invoke(GeronimoStandardContext.java:406)
>
> at
> org
> .apache
> .geronimo
> .tomcat
> .valve.GeronimoBeforeAfterValve.invoke(GeronimoBeforeAfterValve.java:
> 47)
> at
> org
> .apache
> .catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
> at
> org
> .apache
> .catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
> at
> org
> .apache
> .catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:
> 109)
> at
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:
> 568)
> at
> org
> .apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:
> 286)
> at
> org
> .apache.coyote.http11.Http11Processor.process(Http11Processor.java:
> 845)
> at org.apache.coyote.http11.Http11Protocol
> $Http11ConnectionHandler.process(Http11Protocol.java:583)
> at org.apache.tomcat.util.net.JIoEndpoint
> $Worker.run(JIoEndpoint.java:447)
> at java.lang.Thread.run(Thread.java:619)
>
>
>
>
>
> -Sanjay
>