How to cope with 'org.postgresql.util.PSQLException: No value specified for parameter 1'?

北战南征 提交于 2019-12-02 04:03:47

As outlined in the mentioned JIRA issue the problem stemmed from a unique-constraint which was set for a mapped class.

Moving the unique-contraint into the Mapping DC resolved the issue.

It does look like a bug. Somehow a parameter on the underlying SQL PreparedStatement didn't get set. Grails/GORM is supposed to do that. Are you able to run your app on a more stable version of Grails and/or the JDBC driver? It might help you troubleshoot and would give you the specifics to open a bug report.

EDIT: Another possibility just occurred to me. Perhaps you have a type mismatch somewhere, such as a String value that's trying to go into an INTEGER column? The driver might interpret "bad data" as "no data". Just a shot in the dark before you go too far down the other path.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!