title: Spring Exception: MethodArgumentTypeMismatchException
body: <p>I'm getting and exception that I do not understand. I have a controller, it gives me back a news object and it appears in the Console, so getting the actual news object is not the problem, </p>
  
  <pre><code>@RequestMapping(value ="/viewonestatus/{id}")
  public ModelAndView viewOneStatus(@PathVariable("id") Long id) {
  
      System.out.println("!!!!!! STATUSUPDATECONTROLLER: viewOneStatus : Empezamos con el ID del Anuncio: " + id);
  
      StatusUpdate status = statusUpdateService.get(id);
  
      ModelAndView modelAndView = new ModelAndView();
      System.out.println("!!!!!! STATUSUPDATECONTROLLER: viewOneStatus : Empezamos con el ID del Anuncio: " + status);
  
      modelAndView.getModel().put("status", status);
  
      modelAndView.setViewName("viewonestatus");
  
      return modelAndView;
  }
  </code></pre>
  
  <p>.... but when try to execute the JSP it gives me the following error, even with an almost empty JSP, like....</p>
  
  <pre><code>&lt;%@ page language="java" contentType="text/html; charset=UTF-8"
  pageEncoding="UTF-8"%&gt; 
  &lt;%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%&gt;
  &lt;%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%&gt;
  &lt;%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%&gt;
  
  hello world
  
  Exception: Exception: org.springframework.web.method.annotation.MethodArgumentTypeMismatchException: Failed to convert value of type [java.lang.String] to required type [java.lang.Long]; nested exception is java.lang.NumberFormatException: For input string: &amp;#034;viewonestatus&amp;#034;
          Failed URL: http://localhost:8080/viewonestatus/viewonestatus
          Exception message: Failed to convert value of type [java.lang.String] to required type [java.lang.Long]; nested exception is java.lang.NumberFormatException: For input string: &amp;#034;viewonestatus&amp;#034;
  </code></pre>
  
  <p>Thanks a lot for your help</p>