2016-02-09 15:00:18,699 ERROR http-bio-8080-exec-7 errors.GrailsExceptionResolver处理请求时出现TypeMismatchException:[POST]

时间:2016-02-09 20:44:45

标签: grails

我在尝试将数据从前端表单保存到后端时遇到了问题。 请从下面的调试器中找到日志

Provided id of the wrong type for class com.xxx.yyy.domain.vendor.Product. Expected: class java.lang.Long, got class java.lang.String. Stacktrace follows:
org.hibernate.TypeMismatchException: Provided id of the wrong type for class com.xxx.yyy.domain.vendor.Product. Expected: class java.lang.Long, got class java.lang.String
at com.xxx.yyy.web.controller.DNISCodeController$$EPcFV7Qu.validateElements(DNISCodeController.groovy:198)
at com.xxx.yyy.web.controller.DNISCodeController$_closure10$$EPcFV7Qu.doCall(DNISCodeController.groovy:150)
at com.xxx.yyy.filter.RetainAnchorFilter.doFilter(RetainAnchorFilter.java:57)
at com.xxx.yyy.filter.ExpiryFilter.doFilterInternal(ExpiryFilter.groovy:27)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
at java.lang.Thread.run(Thread.java:695)

你能帮忙解决这个问题吗?

1 个答案:

答案 0 :(得分:-1)

尝试:

^
|
hard to explain easy to actually understand