Hi Prachi,
It sounds like you're missing asm-3.1.jar on your classpath.
Gili
On 23/09/2013 4:51 AM, PRACHI DESAI wrote:
> Hi,
> I have used simple REST web service using jersey for xml responses.
> web.xml:
> <servlet>
> <servlet-name>jersey-servlet</servlet-name>
> <servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class>
> <init-param>
> <param-name>com.sun.jersey.config.property.packages</param-name>
> <param-value>com.efl.efms.restful</param-value>
> </init-param>
> <load-on-startup>1</load-on-startup>
> </servlet>
>
> <servlet-mapping>
> <servlet-name>jersey-servlet</servlet-name>
> <url-pattern>/rest/*</url-pattern>
> </servlet-mapping>
>
> And m getting servlet start error as follows-
>
>
> HTTP Status 500 - Servlet.init() for servlet jersey-servlet threw
> exception
>
> ------------------------------------------------------------------------
> *type* Exception report
> *message* _Servlet.init() for servlet jersey-servlet threw exception_
> *description* _The server encountered an internal error
> (Servlet.init() for servlet jersey-servlet threw exception) that
> prevented it from fulfilling this request._
> *exception*
> javax.servlet.ServletException: Servlet.init() for servlet jersey-servlet threw exception
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
> org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1001)
> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
> org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> java.lang.Thread.run(Thread.java:662)
> *root cause*
> java.lang.NoClassDefFoundError: org/objectweb/asm/ClassVisitor
> com.sun.jersey.api.core.ScanningResourceConfig.init(ScanningResourceConfig.java:79)
> com.sun.jersey.api.core.PackagesResourceConfig.init(PackagesResourceConfig.java:104)
> com.sun.jersey.api.core.PackagesResourceConfig.<init>(PackagesResourceConfig.java:78)
> com.sun.jersey.api.core.PackagesResourceConfig.<init>(PackagesResourceConfig.java:89)
> com.sun.jersey.spi.container.servlet.WebComponent.createResourceConfig(WebComponent.java:700)
> com.sun.jersey.spi.container.servlet.WebComponent.createResourceConfig(WebComponent.java:678)
> com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:203)
> com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:374)
> com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:557)
> javax.servlet.GenericServlet.init(GenericServlet.java:160)
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
> org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1001)
> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
> org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> java.lang.Thread.run(Thread.java:662)
> *root cause*
> java.lang.ClassNotFoundException: org.objectweb.asm.ClassVisitor
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1711)
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1556)
> com.sun.jersey.api.core.ScanningResourceConfig.init(ScanningResourceConfig.java:79)
> com.sun.jersey.api.core.PackagesResourceConfig.init(PackagesResourceConfig.java:104)
> com.sun.jersey.api.core.PackagesResourceConfig.<init>(PackagesResourceConfig.java:78)
> com.sun.jersey.api.core.PackagesResourceConfig.<init>(PackagesResourceConfig.java:89)
> com.sun.jersey.spi.container.servlet.WebComponent.createResourceConfig(WebComponent.java:700)
> com.sun.jersey.spi.container.servlet.WebComponent.createResourceConfig(WebComponent.java:678)
> com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:203)
> com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:374)
> com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:557)
> javax.servlet.GenericServlet.init(GenericServlet.java:160)
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
> org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1001)
> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
> org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> java.lang.Thread.run(Thread.java:662)
> *note* _The full stack trace of the root cause is available in the
> Apache Tomcat/7.0.29 logs._
>
>
>
>
> I request you to please help me if you can._
> _
> Regards,
> Prachi Desai