也许有人可以帮忙,我该如何解决这个问题? 我正在使用 hibernate、spring 和 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]
最佳答案
看来您正在插入无法验证约束的对象。 (可能使用相同的 key )
关于java - 数据完整性违规异常 : could not insert,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6097037/