Guest User

Untitled

a guest
Jan 17th, 2019
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.08 KB | None | 0 0
  1. <form:input type="hidden" path="timeStamp" />
  2.  
  3. private Timestamp timeStamp;
  4.  
  5. public final Timestamp getTimeStamp() {
  6. return (timeStamp == null)
  7. ? null : (Timestamp) timeStamp.clone();
  8. }
  9.  
  10. public final void setTimeStamp(Timestamp timeStamp) {
  11. this.timeStamp = (timeStamp == null)
  12. ? null : (Timestamp) timeStamp.clone();
  13. }
  14.  
  15. public final void doActionDelete(DumyBean bean, Errors errors, ActionRequest actionrequest...)
  16.  
  17. @InitBinder
  18. public final void initBinder(WebDataBinder binder) {
  19.  
  20. SimpleDateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy");
  21. dateFormat.setLenient(false);
  22.  
  23. binder.registerCustomEditor(Date.class, new CustomDateEditor(dateFormat, true));
  24. }
  25.  
  26. "Failed to convert property value of type 'java.lang.String' to required type 'java.sql.Timestamp' for property 'timeStamp';
  27. nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [java.lang.String] to required type
  28. [java.sql.Timestamp] for property 'timeStamp': PropertyEditor [org.springframework.beans.propertyeditors.CustomDateEditor]
  29. returned inappropriate value of type [java.util.Date]
Add Comment
Please, Sign In to add comment