I'm working on a project using spring hibernate struts2 framework and MySQL database, I have a problem when I wanted to add a field of type Date
does not work, it means when I try to insert a Date field, it sends me this error:
WARNING: Error setting value
ognl.MethodFailedException: Method "setDATE_PANNE" failed for object model.Panne @ 1d055e2 [java.lang.NoSuchMethodException: setDATE_PANNE ([Ljava.lang.String;)]
/ - Encapsulated exception ------------ \
java.lang.NoSuchMethodException: setDATE_PANNE ([Ljava.lang.String;)
NB: (DATE_PANNE -> this is the date fields) and setDATE_PANNE is the setter for this attribute. DATE_PANNE is of type date
apparently the problem is that struts2 has taken my Date as a String thing that he should not do.
I do not know how to convert and where?
Date. Struts usually converts automatically fromStringtoDateif it detects the format (MM-dd-yyyyfor example)