Duplicate entry or ambiguous column reference causing constraint violation

com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException
Javadoc
at com.mysql.jdbc.SQLError.createSQLException
(source)

Typical Exception Messages

  1. com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.upgrade.UpgradeException: com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException: Duplicate entry '24814-DLFE-1752.doc-1' for key 'IX_6C5E6512'
  2. could not insert: [com.mdd.web.pojo.Bank]; nested exception is org.hibernate.exception.ConstraintViolationException: could not insert: [com.mdd.web.pojo.Bank]
  3. could not execute statement
  4. com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.upgrade.UpgradeException: com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException: Duplicate entry '12351' for key 'PRIMARY'
  5. <No message>
  6. Column 'code_value' cannot be null
  7. Duplicate entry '1' for key 'PRIMARY'
  8. Column 'text' cannot be null
  9. Duplicate entry 'ishkur' for key 1
  10. Cannot add or update a child row: a foreign key constraint fails (`vcconf_db`.`floor`, CONSTRAINT `floor_ibfk_1` FOREIGN KEY (`event_db_key`) REFERENCES `event` (`event_db_key`))

Specific cases

External results for this pattern (55)

  1. Unknown authorvia nabble.com5 months ago
    could not update: [org.xinus.m odel.User#-1]
    Show stack trace
  2. kwootvia GitHub5 months ago
    could not update: [org.navalplanner.business.resources.entities.Worker#809]; nested exception is org.hibernate.exception.ConstraintViolationException: could not update: [org.navalplanner.business.resources.entities.Worker#809]
    Show stack trace
  3. Unknown authorvia journaldev.com5 months ago
    Duplicate entry '1' for key 'PRIMARY'
    Show stack trace
  4. Unknown authorvia journaldev.com5 months ago
    Duplicate entry '1' for key 'PRIMARY'
    Show stack trace
  5. Unknown authorvia liferay.com5 months ago
    com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.upgrade.UpgradeException: com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException: Duplicate entry '24814-DLFE-1752.doc-1' for key 'IX_6C5E6512'
    Show stack trace
  6. Unknown authorvia liferay.com5 months ago
    com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.upgrade.UpgradeException: com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException: Duplicate entry '24814-DLFE-1752.doc-1' for key 'IX_6C5E6512'
    Show stack trace
  7. Unknown authorvia liferay.com5 months ago
    com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.upgrade.UpgradeException: com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException: Duplicate entry '24814-DLFE-1752.doc-1' for key 'IX_6C5E6512'
    Show stack trace
  8. Unknown authorvia liferay.com5 months ago
    com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.upgrade.UpgradeException: com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException: Duplicate entry '24814-DLFE-1752.doc-1' for key 'IX_6C5E6512'
    Show stack trace
  9. Unknown authorvia coderanch.com5 months ago
    could not insert: [com.mdd.web.pojo.Bank]; nested exception is org.hibernate.exception.ConstraintViolationException: could not insert: [com.mdd.web.pojo.Bank]
    Show stack trace
  10. Unknown authorvia csdn.net5 months ago
    Cannot add or update a child row: a foreign key constraint fails (`wmw/wmwusertable`, CONSTRAINT `FK_wmw_upopedom_pcode` FOREIGN KEY (`wmw_upopedom`) REFERENCES `wmwpopedomtable` (`wmw_pcode`))
    Show stack trace