Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9141649
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T09:40:23+00:00 2026-06-17T09:40:23+00:00

I am doing CRUD using spring jdbc template. insert,select and delete operations are working

  • 0

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.

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.<init>()

here is my controller:

@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";
        }
    }

I have used @Autowired annotation for the controller too.
How to resolve it? any kind of help is appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T09:40:24+00:00Added an answer on June 17, 2026 at 9:40 am

    I changed my Post method to following and it worked.

    public String save(@ModelAttribute("company")Company company,BindingResult result, ModelMap map)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am doing some CRUD operations using JPA. For updating an object which is
I have a problem here using .dbf files. I can make CRUD operations but
I am writing simple CRUD(Create, Remove ,Update ,Delete) application using Spring MVC and hibernate.
I am doing a CRUD operation on Database generated class(using LINQ2SQL) in my WPF
I am using Entity framework 5 and using repository pattern. Say I got these
I'm learning spring hibernate zk stack, and doing my first crud following this tutorial
Doing an ajax get request works as expected using the following code: $.ajax({ type:
Doing a simple Squeryl database lookup, but trying to exclude a value. I've tried:
I don't do a lot of SQL,and most of the time, I'm doing CRUD
We are looking for a way of automatically filtering all CRUD operations by a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.