Grails Runtime Exception

G

grailsX

Guest
When i try to save one diplome instance i have a grails runtime exception, this is the trace
Code:
Error 500: Executing action [save] of controller [DiplomeController] caused exception: a different object with the same identifier value was already associated with the session: [Diplome#9]; nested exception is org.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the session: [Diplome#9]
Servlet: grails
URI: /hremploi/grails/diplome/save.dispatch
Exception Message: a different object with the same identifier value was already associated with the session: [Diplome#9] 
Caused by: a different object with the same identifier value was already associated with the session: [Diplome#9] 
Class: DiplomeController 
At Line: [42]

Code:
41: log.debug("diplomeInstance.code = ${diplomeInstance.code} ")
42: if (diplomeInstance.save()) {
43: flash.message = "${message(code: 'default.created.message', args: [message(code: 'diplome.label', default: 'Diplome'), diplomeInstance.id])}"
 

robmorning

New member
When i try to save one diplome instance i have a grails runtime exception, this is the trace
Code:
Error 500: Executing action [save] of controller [DiplomeController] caused exception: a different object with the same identifier value was already associated with the session: [Diplome#9]; nested exception is org.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the session: [Diplome#9]
Servlet: grails
URI: /hremploi/grails/diplome/save.dispatch
Exception Message: a different object with the same identifier value was already associated with the session: [Diplome#9] 
Caused by: a different object with the same identifier value was already associated with the session: [Diplome#9] 
Class: DiplomeController 
At Line: [42]

Code:
41: log.debug("diplomeInstance.code = ${diplomeInstance.code} ")
42: if (diplomeInstance.save()) {
43: flash.message = "${message(code: 'default.created.message', args: [message(code: 'diplome.label', default: 'Diplome'), diplomeInstance.id])}"



Can you let me see how you've defined the domain class 'Diplome' ?
 
Top