Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

7
  • Are you sure that types of columns in database match types of your properties in entity class? Commented Oct 13, 2018 at 19:54
  • Database type for the question field where the error occurs is listed as varchar(255) in mysql. Commented Oct 13, 2018 at 19:57
  • So how could Java convert varchar to long? Either change column to NUMBER (or any other numeric integer type specific for your database) or change type for property to String Commented Oct 13, 2018 at 19:59
  • If you look at my entity, the question field is listed as a String and the corresponding field in MySql is varchar(255) so the types do match in those regards. I just don't understand why it's trying to convert when it shouldn't need to. Commented Oct 13, 2018 at 20:01
  • For some reason it's attempting to convert when processing the post. Commented Oct 13, 2018 at 20:02