0
  @Temporal(javax.persistence.TemporalType.DATE)
  private Date docDate;
  public Date getDocDate() {
    return docDate;
}
public void setDocDate(Date docDate) {
    this.docDate = docDate;
}

但错误显示如下

Error setting expression 'docDate' with value '[Ljava.lang.String;@843f72'
ognl.MethodFailedException: Method "setDocDate" failed for object net.top.app.entity.document.Document@291a66 [java.lang.NoSuchMethodException: net.top.app.entity.document.Document_$$_javassist_4.setDocDate([Ljava.lang.String;)]
    at ognl.OgnlRuntime.callAppropriateMethod(OgnlRuntime.java:1285)
    at ognl.OgnlRuntime.setMethodValue(OgnlRuntime.java:1474)
4

2 回答 2

0

As per the Error , setDocDate() is having Date field as input type.

You are setting the docDate in UI it self, try to convert the field to Date and set it to docDate

于 2012-12-06T15:14:13.013 回答
0

您的代码正在尝试将 String 传递给setDocDate(). 更改它以传递日期。

于 2012-12-06T14:58:35.007 回答