0

当我单击验证注册 Spring Security UI 插件发送链接到电子邮件时,我收到此错误。

Error 2013-07-20 01:12:14,684 [http-bio-8080-exec-6] ERROR errors.GrailsExceptionResolver  - MySQLIntegrityConstraintViolationException occurred when processing request: [GET] /Professionals.az/register/verifyRegistration - parameters:
t: 4dc5d16cb60742809c7ef270f41cecdc
Duplicate entry '2-25' for key 'PRIMARY'. Stacktrace follows:
Message: Duplicate entry '2-25' for key 'PRIMARY'
    Line | Method
->>  411 | handleNewInstance    in com.mysql.jdbc.Util
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
|    386 | getInstance          in     ''
|   1039 | createSQLException . in com.mysql.jdbc.SQLError
|   4096 | checkErrorPacket     in com.mysql.jdbc.MysqlIO
|   4028 | checkErrorPacket . . in     ''
|   2490 | sendCommand          in     ''
|   2651 | sqlQueryDirect . . . in     ''
|   2683 | execSQL              in com.mysql.jdbc.ConnectionImpl
|   2144 | executeInternal . .  in com.mysql.jdbc.PreparedStatement
|   2444 | executeUpdate        in     ''
|   1997 | executeBatchSerially in     ''
|   1468 | executeBatch         in     ''
|    297 | executeBatch . . . . in org.apache.commons.dbcp.DelegatingStatement
|    687 | withTransaction      in org.grails.datastore.gorm.GormStaticApi
|    158 | doCall . . . . . . . in az.com.controllers.register.RegisterController$_closure3$$EOC4Qhoo
|    195 | doFilter             in grails.plugin.cache.web.filter.PageFragmentCachingFilter
|     63 | doFilter . . . . . . in grails.plugin.cache.web.filter.AbstractFilter
|   1110 | runWorker            in java.util.concurrent.ThreadPoolExecutor
|    603 | run . . . . . . . .  in java.util.concurrent.ThreadPoolExecutor$Worker
^    722 | run                  in java.lang.Thread
4

1 回答 1

0

我遇到了同样的问题。发生在我身上的是我已经为尝试进行验证的用户插入了 UserRole 条目。因此,导致重复条目异常。

尝试检查您是否没有插入控制器也插入数据库的条目。

于 2014-02-10T10:27:31.500 回答