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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T22:07:42+00:00 2026-06-12T22:07:42+00:00

I am facing an issue while posting a select box data to spring controller.

  • 0

I am facing an issue while posting a select box data to spring controller.

<form:select path="ContactInfoVO[0].cityId" multiple="single" id="city" class="validate[required] small">       
    <form:option value="-1" label="-- Select City--"></form:option>                     
    <c:forEach var="city" items="${ManagerVO.ContactInfoVO[0].cityList}" varStatus="item">
    <form:option value="${city.cityId}" label="${city.cityName}"/>
</c:forEach> 
</form:select>

Spring’s generic conversion service is adding ‘,’ before the actual value. Looking into logs i saw following –

    23:00:45,511 DEBUG BeanWrapperImpl:579 - Using cached nested BeanWrapper for property 'restaurantContactInfoVO[0]'
23:00:45,512 DEBUG GenericConversionService:139 - Checking if I can convert java.lang.String[] to java.lang.String
23:00:45,516 DEBUG GenericConversionService:358 - Searching for converters indexed by sourceType [[Ljava.lang.String;]
23:00:45,517 DEBUG GenericConversionService:429 - and indexed by targetType [java.lang.String]
23:00:45,519 DEBUG GenericConversionService:429 - and indexed by targetType [java.io.Serializable]
23:00:45,520 DEBUG GenericConversionService:429 - and indexed by targetType [java.lang.Comparable]
23:00:45,521 DEBUG GenericConversionService:429 - and indexed by targetType [java.lang.CharSequence]
23:00:45,523 DEBUG GenericConversionService:429 - and indexed by targetType [java.lang.Object]
23:00:45,524 DEBUG GenericConversionService:358 - Searching for converters indexed by sourceType [[Ljava.lang.Object;]
23:00:45,527 DEBUG GenericConversionService:429 - and indexed by targetType [java.lang.String]
23:00:45,528 DEBUG GenericConversionService:473 - Found matchable converters org.springframework.core.convert.support.ArrayToStringConverter@ba3bff5
23:00:45,530 DEBUG GenericConversionService:560 - Matching org.springframework.core.convert.support.ArrayToStringConverter@ba3bff5
23:00:45,531 DEBUG GenericConversionService:139 - Checking if I can convert java.lang.String to java.lang.String
23:00:45,532 DEBUG GenericConversionService:246 - Matched cached converter org.springframework.core.convert.support.ObjectToStringConverter@6f69b66e
23:00:45,534 DEBUG GenericConversionService:147 - Yes, I can convert
23:00:45,535 DEBUG GenericConversionService:564 - Matched converter org.springframework.core.convert.support.ArrayToStringConverter@ba3bff5
23:00:45,536 DEBUG GenericConversionService:254 - Caching under ConverterCacheKey [sourceType = java.lang.String[], targetType = java.lang.String]
23:00:45,537 DEBUG GenericConversionService:147 - Yes, I can convert
23:00:45,539 DEBUG GenericConversionService:159 - Converting value array<String>['', '145009'] of java.lang.String[] to java.lang.String
23:00:45,542 DEBUG GenericConversionService:246 - Matched cached converter org.springframework.core.convert.support.ArrayToStringConverter@ba3bff5
23:00:45,544 DEBUG GenericConversionService:159 - Converting value '' of java.lang.String to java.lang.String
23:00:45,545 DEBUG GenericConversionService:246 - Matched cached converter org.springframework.core.convert.support.ObjectToStringConverter@6f69b66e
23:00:45,546 DEBUG GenericConversionService:186 - Converted to ''
23:00:45,548 DEBUG GenericConversionService:159 - Converting value '145009' of java.lang.String to java.lang.String
23:00:45,551 DEBUG GenericConversionService:246 - Matched cached converter org.springframework.core.convert.support.ObjectToStringConverter@6f69b66e
23:00:45,552 DEBUG GenericConversionService:186 - Converted to '145009'
23:00:45,554 DEBUG GenericConversionService:186 - Converted to ',145009'

i have one more select box and code for both are identical(almost). Still i do not know why spring treat this one as String[] and not String. Can someone put some light on this?

  • 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-12T22:07:43+00:00Added an answer on June 12, 2026 at 10:07 pm

    There was another parameter on the form with same id causing this issue. It is now fixed.

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

Sidebar

Related Questions

I am facing issue while i load a form on ajax request. i followed
I am facing an issue while trying to use the spring android framework. I
I am facing an issue while trying to fetch data from GoogleAnalytics API on
I am facing keyboard issue in sharekit for iOS5 only.While posting text content to
I'm facing a character discrepancy issue while extracting data from db tables. I've written
I am facing issue while loaidng the data in JQGrid at a later stage
I am trying to get data out of a list,but facing some issue while
We have implemented webservice which generates xml response. I am facing issue while invoking
i am using Codeigniter i am facing an issue while setting the values of
issue facing while loading the messages in to mq channel, recieving an error like

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.