Fix Java.lang.NumberFormatException:For input string: "id"

Source: Internet
Author: User

Today, the project suddenly reported "Java.lang.NumberFormatException:For input string:" id "", Project framework is spring,springmvc,hibernate, roughly meaning type conversion error, My id is an integer type, error in <c:foreach> in the option to get a problem, the data type is wrong, go to the background DAO to find, check my SQL, I looked at the table is part of the field, with the Hibernate framework, Return a list<object[]> type, I have defined the type of list< specified, and want it to return the specified object type, after querying Google, found that the query part of the field with the corresponding class constructor, the perfect solution to this exception. Refer to http://blog.csdn.net/yaerfeng/article/details/8514008, thank you for sharing with bloggers.

Fix Java.lang.NumberFormatException:For input string: "id"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.