Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Critical
-
Resolution: Unresolved
-
Affects Version/s: 2.0-M2
-
Fix Version/s: 2.3-M2
-
Component/s: Persistence
-
Labels:
-
Environment:grails-2.0.0.BUILD-SNAPSHOT #1457
Description
Hoping to find some cues here, I copy this issue over from StackOverflow (http://stackoverflow.com/questions/7447922/):
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 flawlessly. However, there now seems to be an error with a very specific token, which fails the user.save() of this snippet:
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)
Note that I can create additional users in the same running instance - but the error (so far) only occurs with that code.
Any ideas on how to resolve that?
Versions in use:
PostgreSQL: 9.1beta3
JDBC-driver: postgresql:9.1-901.jdbc4
Grails: 2.0.0.BUILD-SNAPSHOT (Build #1457)
(Due to being on development builds for those parts, it might be a bug, but I am unsure about that.)
can you please attach an example that reproduces the problem, or at least the SQL that is causing the issue from the logs