title: org.springframework.web.util.NestedServletException: Request processing failed
body: <p>I am doing CRUD using spring jdbc template.
  insert,select and delete operations are working fine but I got these following exception in update process.</p>
  
  <pre><code>org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [java.lang.Integer]: No default constructor found; nested exception is java.lang.NoSuchMethodException: java.lang.Integer.&lt;init&gt;()
  </code></pre>
  
  <p>here is my controller: </p>
  
  <pre><code>@RequestMapping(value="/editCompany/{companyId}", method= RequestMethod.GET)
      public String edit(@PathVariable(value="companyId")Integer companyId,ModelMap map) {
  
          Company company=companyService.get(companyId);
          map.addAttribute("company", company);
          map.put("companyId", companyId);
          return "editCompany"; 
      }
  
      @RequestMapping(value="/editCompany/{companyId}", method= RequestMethod.POST)
          public String save(@ModelAttribute("company")Integer companyId,Company company,BindingResult result, ModelMap map) {
  
          companyValidator.validate(company, result);
          if (result.hasErrors()) {
              return "editCompany";
          } else {
              Integer i=companyService.save(company);
  
              return "status";
          }
      }
  </code></pre>
  
  <p>I have used <code>@Autowired</code> annotation for the controller too.
  How to resolve it? any kind of help is appreciated.</p>