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 228949
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T19:43:30+00:00 2026-05-11T19:43:30+00:00

I am using Spring MVC’s SimpleFormController in conjunction with Spring MVC’s form JTL to

  • 0

I am using Spring MVC’s SimpleFormController in conjunction with Spring MVC’s form JTL to create a form to edit a Generic object.

On my form I have a drop down where the user can specify a server via a drop down.

<form:form commandName="generic">
    <form:select path="server">
        <form:options items="${servers}" itemValue="id" itemLabel="name"/>
    </form:select>
</form:form>

Servers here is propagated by a database call for all available servers. server is a Server ORM pojo, that is a sub-object of another ORM pojo (Generic) that serves as my form backing object.

My goal here is to change Generic’s server reference, which is represented on the database level as a Foreign Key to the server table.

I am using JPA as my persistence layer and JPA generated entity classes as my ORM pojos.

Unfortunately this doesn’t seem to be binding properly when my form submits, as it can’t translate from String to Server.

Field error in object 'generic' on field 'server': rejected value [1]; codes [typeMismatch.generic.server,typeMismatch.server,typeMismatch.com.generic.orm.jpa.Server,typeMismatch]; arguments [org.springframework.context.support.DefaultMessageSourceResolvable: codes [generic.server,server]; arguments []; default message [server]]; default message [Failed to convert property value of type [java.lang.String] to required type [com.generic.orm.jpa.Server] for property 'server'; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [java.lang.String] to required type [com.generic.orm.jpa.Server] for property 'server': no matching editors or conversion strategy found], generic=com.generic.orm.jpa.generic[id=3]} and static attributes {}

I’ve been looking for an example of how to accomplish this with no luck. I believe I need to overwrite something within the SimpleFormController, like I did in this question, but Spring MVC’s documentation is light on details. Can anyone help me out here?

  • 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-05-11T19:43:30+00:00Added an answer on May 11, 2026 at 7:43 pm

    I think you are correct. You need to register a custom editor on the binder like you done before so you can convert a String to a Server instance. There is an example of a custom PropertyEditor here in the Spring reference docs that should get you started.

    I agree that the MVC documentation is not the best. I have had to do a lot of Googling and searching on the Spring forums.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 122k
  • Answers 122k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer If you're developing on Windows, don't forget there's a .NET… May 12, 2026 at 12:46 am
  • Editorial Team
    Editorial Team added an answer You want openssl_sign(). EDIT: Make sure the message digest is… May 12, 2026 at 12:46 am
  • Editorial Team
    Editorial Team added an answer Your can change what you consider a fact value in… May 12, 2026 at 12:46 am

Related Questions

I am using Spring MVC to build my web application, and I have a
I am using Spring MVC's SimpleFormController in conjunction with Spring MVC's form JTL to
I am trying to create a form to edit an existing database row. I
So I've got a simple web application using Spring MVC + Hibernate and am
I am using my own implementation of the UserDetailsService interface to load a User

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.