2013-07-19 105 views
0

當我點擊Spring Security UI插件發送的電子郵件鏈接驗證註冊時出現此錯誤。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

它在你的堆棧跟蹤 - 你試圖插入相同的數據兩次。你的意思是做更新vs插入還是有一些你沒有刪除的舊數據。 – ikumen

+0

它發生在這裏registrationCode.delete() –

+0

這個代碼在這裏 –

回答

0

我跑過這個相同的問題。發生在我身上的是我已經爲正在嘗試驗證的用戶插入UserRole條目。因此,導致重複的條目異常。

嘗試檢查您是否未插入控制器也會插入到數據庫中的條目。