0 Replies Latest reply on Apr 4, 2012 2:03 PM by sumitgcl

    org.jboss.resteasy.spi.UnhandledException: java.lang.NullPointerException

    sumitgcl

      Hi,

       

      I am creating a maven resteasy web service project integrated spring. My project name is filterservice. It is having two methods in service, which is responsible

      to give me data from mysql database in json and xml format. Now the problem is sometimes same code is running well but sometimes same code is giving null

      pointer exception. I am not able to understand, when i am not doing any changes in my code why it is sometimes running  and giving expected output and sometimes

      giving errors. Error in logs are:

       

      Servlet.service() for servlet [Resteasy] in context with path [/resteasy] threw exception

      org.jboss.resteasy.spi.UnhandledException: java.lang.NullPointerException

                at org.jboss.resteasy.core.SynchronousDispatcher.handleApplicationException(SynchronousDispatcher.java:323)

                at org.jboss.resteasy.core.SynchronousDispatcher.handleException(SynchronousDispatcher.java:199)

                at org.jboss.resteasy.core.SynchronousDispatcher.handleInvokerException(SynchronousDispatcher.java:175)

                at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:529)

                at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:491)

                at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:120)

                at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:200)

                at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:48)

                at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:43)

                at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)

                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)

                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

                at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)

                at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)

                at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)

                at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)

                at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)

                at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)

                at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)

                at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)

                at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)

                at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579)

                at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:307)

                at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:679)

                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:704)

       

      Thanks

      Sumit Tomar