title: Failed to convert value of type 'java.lang.String' to required type 'long'; nested exception is java.lang.NumberFormatException: For input string: ""
body: <p>I have this error but I don't have any idea where is the problem:</p>
  
  <p><strong>This application has no explicit mapping for /error, so you are seeing this as a fallback.
  Mon Sep 02 12:57:36 CEST 2019
  There was an unexpected error (type=Bad Request, status=400).
  Failed to convert value of type 'java.lang.String' to required type 'long'; nested exception is java.lang.NumberFormatException: For input string: ""
  org.springframework.web.method.annotation.MethodArgumentTypeMismatchException: Failed to convert value of type 'java.lang.String' to required type 'long'; nested exception is java.lang.NumberFormatException: For input string: ""</strong></p>
  
  <p><strong><em>AgentController</em></strong> </p>
  
  <pre><code>@RequestMapping(value="/saveOperation", method=RequestMethod.POST)
      public String saveOperation(Model model, String typeOperation,long codeCompte,double montant, long codeCompte2){
          try {
              if(typeOperation.equals("VERS")){
                  agentServices.verser(codeCompte, montant);
              }
              else if(typeOperation.equals("RETR")){
                  agentServices.retirer(codeCompte, montant);
              } 
              else if (typeOperation.equals("VIR")){
                  agentServices.virement(codeCompte,codeCompte2,montant);
              }
          }catch (Exception e){
              model.addAttribute("error",e);  
          }
          return "redirect:/consulterCompte?codeCompte="+codeCompte;
      }
  </code></pre>
  
  <p><strong><em>agent.html</em></strong></p>
  
  <pre><code>&lt;form th:action="@{/saveOperation}" method="post"&gt;
  &lt;div&gt;
  &lt;label&gt;Compte: &lt;/label&gt;
  &lt;input  type="hidden" name="codeCompte" th:value="${codeCompte}"/&gt;
  &lt;label th:text="${codeCompte}"&gt;&lt;/label&gt;
  &lt;/div&gt;
  &lt;div&gt;
  &lt;input type="radio" name="typeOperation" value="VERS" checked="checked"  onchange="document.getElementById('forVirement').style.display='none'"/&gt;
  &lt;label&gt;Versement&lt;/label&gt;
  &lt;input type="radio" name="typeOperation" value="RETR" onchange="document.getElementById('forVirement').style.display='none'"/&gt;
  &lt;label&gt;Retrait&lt;/label&gt;
  &lt;input type="radio" name="typeOperation" value="VIR" onchange="document.getElementById('forVirement').style.display='block'"/&gt;
  &lt;label&gt;Virement&lt;/label&gt;
  &lt;/div&gt;
  &lt;div id="forVirement" style="display:none"&gt;
  &lt;label&gt;Transféré à:&lt;/label&gt;
  &lt;input type="text" name="codeCompte2" /&gt;
  &lt;/div&gt;
  &lt;div&gt;
  &lt;label&gt;Montant:&lt;/label&gt;
  &lt;input type="text" name="montant"/&gt;
  &lt;/div&gt;
  &lt;button type="submit" class="btn btn-primary"&gt;OK&lt;/button&gt;
  &lt;/form&gt;
  </code></pre>