当我点击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
答案 0 :(得分:0)
我遇到了同样的问题。我发生的事情是我已经为试图进行验证的用户插入了UserRole条目。因此,导致重复的条目异常。
尝试检查您是否未插入控制器也插入数据库的条目。