title: jersey mapMappableContainerException
body: <p>I have a REST WS exposed as</p>
  
  <pre><code> @GET 
       @Produces(MediaType.APPLICATION_JSON) 
       @Path("/getListValues")
       public Response getListValues(
                       @QueryParam("code") String code,
                        @QueryParam("orgId") int orgId) throws Exception {
                        System.out.println("in:----getListValues");       
  // String code="100";
   // int orgId=2000;         
              System.out.println("code:---" + code);
              System.out.println("orgId:---" + orgId); 
  //EXCEPTION AT BELOW LINE
             List&lt;MyData&gt; MyDataList = commonService.getListValues(code, orgId);
              return Response.status(200).entity(MyDataList).build();
              }
  
  
  
     @Override
      @Transactional
      public List&lt;MyData&gt; getListValues(String code,int orgId) {
          List&lt;MyData&gt; myDataList=commonDao.getListValues(codeTypeIds,buId);//call to Store Procedure
          return myDataList;
  
  }
  </code></pre>
  
  <blockquote>
    <p>I am getting exception as:</p>
    
    <p>in:----getListValues code:---100 org:---2000</p>
    
    <p><strong>com.sun.jersey.spi.container.ContainerResponse
    mapMappableContainerException SEVERE: The RuntimeException could not</strong>
    be mapped to a response, re-throwing to the HTTP container
    java.lang.NullPointerException    at
    in.ram.common.facade.CommonController.getListValues(CommonController.java:55)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  at
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)     at
    com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
      at
    com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205)
      at
    com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
      at
    com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:288)
      at
    com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
      at
    com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
      at
    com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
      at
    com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
      at
    com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1469)
      at
    com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1400)
      at
    com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1349)
      at
    com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1339)
      at
    com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416)
      at
    com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:537)
      at
    com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:699)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)     at
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
      at
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      at
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
      at
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      at
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      at
    org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
      at
    org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
      at
    org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
      at
    org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
      at
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
      at
    org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
      at
    org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
      at
    org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
      at
    org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)
      at
    org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
      at
    org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:315)
      at
    java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      at
    java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      at java.lang.Thread.run(Thread.java:744)</p>
    
    <p>Apr 02, 2014 3:47:26 PM org.apache.catalina.core.StandardWrapperValve
    invoke SEVERE: Servlet.service() for servlet [jersey-serlvet] in
    context with path [/RAM-APP] threw exception
    java.lang.NullPointerException    at
    in.ram.common.facade.CommonController.getListValues(CommonController.java:55)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  at
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)     at
    com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
      at
    com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205)
      at
    com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
      at
    com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:288)
      at
    com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
      at
    com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
      at
    com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
      at
    com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
      at
    com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1469)
      at
    com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1400)
      at
    com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1349)
      at
    com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1339)
      at
    com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416)
      at
    com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:537)
      at
    com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:699)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)     at
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
      at
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      at
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
      at
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      at
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      at
    org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
      at
    org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
      at
    org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
      at
    org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
      at
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
      at
    org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
      at
    org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
      at
    org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
      at
    org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)
      at
    org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
      at
    org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:315)
      at
    java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      at
    java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      at java.lang.Thread.run(Thread.java:744)</p>
  </blockquote>
  
  <pre><code>My web.xml
  &lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:javaee="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" id="WebApp_ID" version="2.4"&gt;
    &lt;display-name&gt;FIINFRA-APP&lt;/display-name&gt;
  
    &lt;context-param&gt;
          &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt;
          &lt;param-value&gt;classpath:applicationContext.xml&lt;/param-value&gt;
      &lt;/context-param&gt;
  
      &lt;listener&gt;
          &lt;listener-class&gt;org.springframework.web.context.ContextLoaderListener&lt;/listener-class&gt;
      &lt;/listener&gt;
  
      &lt;servlet&gt;
          &lt;servlet-name&gt;jersey-serlvet&lt;/servlet-name&gt;
          &lt;servlet-class&gt;com.sun.jersey.spi.spring.container.servlet.SpringServlet&lt;/servlet-class&gt;
          &lt;init-param&gt;
              &lt;param-name&gt;com.sun.jersey.config.property.packages&lt;/param-name&gt;
              &lt;param-value&gt;in.ram.common.facade&lt;/param-value&gt;
          &lt;/init-param&gt;
          &lt;init-param&gt;
              &lt;param-name&gt;com.sun.jersey.api.json.POJOMappingFeature&lt;/param-name&gt;
              &lt;param-value&gt;true&lt;/param-value&gt;
          &lt;/init-param&gt;
  
          &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
      &lt;/servlet&gt;
  
      &lt;servlet-mapping&gt;
          &lt;servlet-name&gt;jersey-serlvet&lt;/servlet-name&gt;
          &lt;url-pattern&gt;/services/*&lt;/url-pattern&gt;
      &lt;/servlet-mapping&gt;
    &lt;welcome-file-list&gt;
      &lt;welcome-file&gt;/WEB-INF/pages/welcome.jsp&lt;/welcome-file&gt;
    &lt;/welcome-file-list&gt;
  &lt;/web-app&gt;
  
  
  My Jersey and Jackson dependencies
  &lt;!-- Jersey --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.sun.jersey&lt;/groupId&gt;
              &lt;artifactId&gt;jersey-server&lt;/artifactId&gt;
              &lt;version&gt;1.8&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.sun.jersey&lt;/groupId&gt;
              &lt;artifactId&gt;jersey-core&lt;/artifactId&gt;
              &lt;version&gt;1.8&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.fasterxml.jackson.jaxrs&lt;/groupId&gt;
              &lt;artifactId&gt;jackson-jaxrs-json-provider&lt;/artifactId&gt;
              &lt;version&gt;2.3.2&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.codehaus.jackson&lt;/groupId&gt;
              &lt;artifactId&gt;jackson-mapper-asl&lt;/artifactId&gt;
              &lt;version&gt;1.9.11&lt;/version&gt;
          &lt;/dependency&gt;
  </code></pre>
  
  <p>Finally commonDao.getListValues is calling a store procedure. I am getting this exception at very first call where I have exposed my WS where I have written //EXCEPTION AT THIS LINE
  I tried searching on google and StackOverflow, many of them have came across this issue. Bt no one have mentioned concrete solution.</p>