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

后端 未结 2 650
死守一世寂寞
死守一世寂寞 2021-01-25 10:01

Upon registration to my Grails app, the user receives an email with a confirmation link. Clicking that link, takes her to the according \'enable\' action.

This worked fl

相关标签:
2条回答
  • 2021-01-25 10:49

    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.

    0 讨论(0)
  • 2021-01-25 10:58

    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.

    0 讨论(0)
提交回复
热议问题