When I'm trying to persist an entity in DB2 database I am receiving the below error..
SQL Error: -803, SQLState: 23505
28 Jan 2021 14:04:06 org.hibernate.engine.jdbc.spi.SqlExceptionHelper - DB2 SQL Error: SQLCODE=-803, SQLSTATE=23505, SQLERRMC=2;USEDCARS.CAR_GROUP, DRIVER=4.24.92
28 Jan 2021 14:04:06 org.hibernate.internal.ExceptionMapperStandardImpl - HHH000346: Error during managed flush [org.hibernate.exception.ConstraintViolationException: could not execute statement]
[err] org.springframework.dao.DataIntegrityViolationException: could not execute statement; SQL [n/a]; constraint [null]; nested exception is org.hibernate.exception.ConstraintViolationException: could not execute statement
[err] at org.springframework.orm.jpa.vendor.HibernateJpaDialect.convertHibernateAccessException(HibernateJpaDialect.java:296)
[err] at org.springframework.orm.jpa.vendor.HibernateJpaDialect.translateExceptionIfPos
question from:
https://stackoverflow.com/questions/65943788/dataintegrityviolationexception 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…