title: Websphere Application Server - Spring MVC - java.lang.NoSuchMethodError: org/codehaus/jackson/map/type/TypeFactory.type
body: <p>I am using WAS 8.0 due to client restrictions to deploy a Spring MVC application.
  I have some controllers defining a tiny web service. </p>
  
  <p>I tried to deploy in some common servers and it runs properly, but when i try to deploy into WAS this is the situation:</p>
  
  <ul>
  <li>I can use GET services, not depending of what elements are getting.</li>
  <li>I can render the GET calls in XML.</li>
  <li>I can render the GET calls in JSON using jackson annotations.</li>
  </ul>
  
  <p>But when I try to use some of the POST calls, the application throws this error (got from WAS JVM System Out):</p>
  
  <pre><code>0000002c webapp        E com.ibm.ws.webcontainer.webapp.WebApp logServletError SRVE0293E: [Servlet Error]-[myApp]: java.lang.NoSuchMethodError: org/codehaus/jackson/map/type/TypeFactory.type(Ljava/lang/reflect/Type;Lorg/codehaus/jackson/type/JavaType;)Lorg/codehaus/jackson/type/JavaType;
  at org.springframework.http.converter.json.MappingJacksonHttpMessageConverter.getJavaType(MappingJacksonHttpMessageConverter.java:219)
  at org.springframework.http.converter.json.MappingJacksonHttpMessageConverter.canRead(MappingJacksonHttpMessageConverter.java:134)
  at org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodArgumentResolver.readWithMessageConverters(AbstractMessageConverterMethodArgumentResolver.java:130)
  at org.springframework.web.servlet.mvc.method.annotation.RequestResponseBodyMethodProcessor.readWithMessageConverters(RequestResponseBodyMethodProcessor.java:180)
  at org.springframework.web.servlet.mvc.method.annotation.RequestResponseBodyMethodProcessor.resolveArgument(RequestResponseBodyMethodProcessor.java:95)
  at org.springframework.web.method.support.HandlerMethodArgumentResolverComposite.resolveArgument(HandlerMethodArgumentResolverComposite.java:77)
  at org.springframework.web.method.support.InvocableHandlerMethod.getMethodArgumentValues(InvocableHandlerMethod.java:162)
  at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:123)
  at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)
  at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:745)
  at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:686)
  at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80)
  at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:925)
  at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856)
  at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:936)
  at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:838)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
  at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:812)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
  at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1225)
  at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:775)
  at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:457)
  at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
  at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1032)
  at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3763)
  at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:304)
  at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:975)
  at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1662)
  at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:195)
  at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:453)
  at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:515)
  at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:306)
  at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:277)
  at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
  at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
  at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:166)
  at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
  at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
  at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
  at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
  at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
  at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
  at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1691)
  </code></pre>
  
  <p>In the last version of the org.codehaus.jackson.mapper library, the function the error is refering is deprecated. So I tried to switch from version 1.0 to 1.9.12 of the library clean deploying it with every change (to avoid class version collision).</p>
  
  <p>After some Googling i find a post that sais it must be a class loader problem, so I select <code>PARENT_LAST</code> config in WAS. But nothing happened.</p>
  
  <p>I dont realy now what is happening in there. There is no more info in the logs.</p>
  
  <p>EDIT>>> I forgot to append the controller's function associated to the HTTP call</p>
  
  <pre><code>@RequestMapping(method = RequestMethod.POST)
  @ResponseBody
  public Map&lt;String, String&gt; addIncidence(@RequestBody Incidence incidence) {
      incidenceService.addIncidence(incidence);
  
      Map&lt;String, String&gt; response = new HashMap&lt;String, String&gt;();
  
      response.put("token", incidence.getToken().toString());
      response.put("service_request_id",
              incidence.getServiceRequestIdString());
      response.put("service_notice", "some text from server");
      response.put("account_id", null);
  
      return response;
  }
  </code></pre>
  
  <p>Thanks in advance.</p>