Avatar para usuário
08/12/2011 05:36
Error 500: Executing action [uploadAvatar] of controller [UsuarioController] caused exception: Object of class [Usuario] with identifier [5]: optimistic locking failed; nested exception is org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [Usuario#5]
Servlet: grails
URI: /App/grails/usuario/uploadAvatar.dispatch
Exception Message: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [Usuario#5]
Caused by: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [Usuario#5]
Class: UsuarioController
At Line: [44]
usuarioInstance = usuarioInstance.merge()
Error 500: Executing action [uploadAvatar] of controller [UsuarioController] caused exception: a different object with the same identifier value was already associated with the session: [Usuario#5]; nested exception is org.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the session: [Usuario#5]
Servlet: grails
URI: /App/grails/usuario/uploadAvatar.dispatch
Exception Message: a different object with the same identifier value was already associated with the session: [Usuario#5]
Caused by: a different object with the same identifier value was already associated with the session: [UsuarioController#5]
Class: UsuarioController
At Line: [46]
if (!usuarioInstance.save(flush: true)) {
redirect(controller:'usuario', action:'create'
}
Para se registrar, clique aqui.