Reputation: 859
Maybe someone can help, how do I fix this? I'm using hibernate, spring and gwt.
com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public abstract void
com.yeah.client.service.PictureService.saveItem(com.yeah.shared.model.Picture)' threw an unexpected exception: org.springframework.dao.DataIntegrityViolationException: could not insert: [com.yeah.shared.model.Picture]; SQL [insert into YeaH.Picture (albumID, picLocation) values (?, ?)]; constraint [null]; nested exception is org.hibernate.exception.ConstraintViolationException: could not insert:
[com.yeah.shared.model.Picture]
Upvotes: 0
Views: 7511
Reputation: 240996
It seems you are inserting the object which fails to validate the constraint. (may be with same key)
Upvotes: 1