annotationsatharvard / catcha

Catch-A - Catching Annotation: An annotation backend and API.
http://catcha.readthedocs.io
20 stars 9 forks source link

Admin Dashboard: Can't Edit a User #45

Closed ferthalangur closed 9 years ago

ferthalangur commented 9 years ago

Actions to Reproduce

  1. Create a new user with /catch/dashboard/createUser
  2. Assign to Roles: Administrator, Manager and User
  3. Click on Save User ... A new user will be created in the database, but disabled
  4. Click on List Users and then the new user, and then Edit User
  5. Make any change to the user -- I tried to Activate, but changing anything else also causes a Grails exception, as follows:
Error 500: Internal Server Error
URI /catch/dashboard/index
Class com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException
Message Duplicate entry '1-2c9fa1b34b57b377014b6f5be6590001' for key 'PRIMARY'

Trace:

    Line | Method
->>  411 | handleNewInstance    in com.mysql.jdbc.Util
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
|    386 | getInstance          in     ''
|   1039 | createSQLException . in com.mysql.jdbc.SQLError
|   3597 | checkErrorPacket     in com.mysql.jdbc.MysqlIO
|   3529 | checkErrorPacket . . in     ''
|   1990 | sendCommand          in     ''
|   2151 | sqlQueryDirect . . . in     ''
|   2625 | execSQL              in com.mysql.jdbc.ConnectionImpl
|   2119 | executeInternal . .  in com.mysql.jdbc.PreparedStatement
|   2415 | executeUpdate        in     ''
|   1976 | executeBatchSerially in     ''
|   1449 | executeBatch         in     ''
|     55 | create . . . . . . . in org.mindinformatics.ann.framework.module.security.users.UserRole
|    863 | updateUserRole       in org.mindinformatics.ann.framework.module.dashboard.DashboardController
|    742 | doCall . . . . . . . in org.mindinformatics.ann.framework.module.dashboard.DashboardController$_closure42
|     47 | doFilter             in grails.plugins.httplogger.filters.HttpLoggerFilter
|     53 | doFilter . . . . . . in grails.plugin.springsecurity.web.filter.GrailsAnonymousAuthenticationFilter
|     49 | doFilter             in grails.plugin.springsecurity.web.authentication.RequestHolderAuthenticationFilter
|     82 | doFilter . . . . . . in grails.plugin.springsecurity.web.authentication.logout.MutableLogoutFilter
|     47 | doFilter             in grails.plugins.httplogger.filters.HttpLoggerFilter
|   1145 | runWorker . . . . .  in java.util.concurrent.ThreadPoolExecutor
|    615 | run                  in java.util.concurrent.ThreadPoolExecutor$Worker
^    745 | run . . . . . . . .  in java.lang.Thread