After registering with my Grails application, the user receives a confirmation email. By clicking on this link, it goes to the corresponding "enable" action.
It worked flawlessly. However, now there is an error with a very specific token that user.save () of this fragment does not execute:
assert !user.isDirty() // assertion is ok user.enabled = true user.confirmationToken = null assert user.isDirty() // assertion is ok if (user.save()) { // FAILS WITH ERROR BELOW // ... }
Stacktrace:
[ 16.09.2011 11:57:47.591] [http-bio-localhost/127.0.0.1-8080-exec-3] ERROR org.codehaus.groovy.grails.web.errors.GrailsExceptionResolver org.apache.commons.logging.impl.SLF4JLog Exception occurred when processing request: [GET] /user/enable/bc73701c-d280-4de0-8951-7af9f2a3d636 Stacktrace follows: org.postgresql.util.PSQLException: No value specified for parameter 1. at org.postgresql.core.v3.SimpleParameterList.checkAllParametersSet(SimpleParameterList.java:178) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:246) at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:500) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:388) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:273) at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96) at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96) at myproj.UserService.enableUser(UserService.groovy:234) at myproj.UserController$_closure8.doCall(UserController.groovy:244) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907) at java.lang.Thread.run(Thread.java:619)
Please note that I can create additional users in the same running instance, but an error (so far) occurs only with this code.
Any ideas on how to resolve this?
Used Versions:
- PostgreSQL: 9.1beta3
- JDBC driver: postgresql: 9.1-901.jdbc4
- Grails: 2.0.0.BUILD-SNAPSHOT (Build # 1378)
(Due to the fact that there are assemblies on these parts, this may be a mistake, but I'm not sure about that.)
source share