org.springframework.dao.DataIntegrityViolationException: OJB operation; SQL []; Cannot add or update a child row: a foreign key constraint fails (`kms`.`kms_doc_t`, CONSTRAINT `FK_FIL_DOC_ID` FOREIGN KEY (`DOC_ID`) REFERENCES `kms_fil_nm_t` (`DOC_ID`)); nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Cannot add or update a child row: a foreign key constraint fails (`kms`.`kms_doc_t`, CONSTRAINT `FK_FIL_DOC_ID` FOREIGN KEY (`DOC_ID`) REFERENCES `kms_fil_nm_t` (`DOC_ID`))

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via Kuali JIRA by Mike Riley, 1 year ago
OJB operation; SQL []; Cannot add or update a child row: a foreign key constraint fails (`kms`.`kms_doc_t`, CONSTRAINT `FK_FIL_DOC_ID` FOREIGN KEY (`DOC_ID`) REFERENCES `kms_fil_nm_t` (`DOC_ID`)); nested exception is com.mysql.jdbc.exceptions.jdbc4
via Kuali JIRA by Mike Riley, 1 year ago
OJB operation; SQL []; Cannot add or update a child row: a foreign key constraint fails (`kms`.`kms_doc_t`, CONSTRAINT `FK_FIL_DOC_ID` FOREIGN KEY (`DOC_ID`) REFERENCES `kms_fil_nm_t` (`DOC_ID`)); nested exception is com.mysql.jdbc.exceptions.jdbc4
via GitHub by flyway
, 2 years ago
PreparedStatementCallback; SQL [INSERT INTO public.schema_version (version, description, type, script, checksum, installed_by, execution_time, state, current_version) VALUES (?, ?, ?, ?, ?, current_user, ?, ?, TRUE)]; ERROR: value too long for type character varying(20); nested exception is org.postgresql.util.PSQLException: ERROR: value too long for type character varying(20)
via Atlassian JIRA by Renan Battaglin, 1 year ago
membership_type = 'GROUP_USER' AND directory_id = ?]; Column 'directory_id' in where clause is ambiguous; nested exception is java.sql.SQLException: Column 'directory_id' in where clause is ambiguous
via Atlassian JIRA by Renan Battaglin, 1 year ago
membership_type = 'GROUP_USER' AND directory_id = ?]; Column 'directory_id' in where clause is ambiguous; nested exception is java.sql.SQLException: Column 'directory_id' in where clause is ambiguous
via Kuali JIRA by Mike Riley, 4 months ago
OJB operation; SQL []; ORA-01400: cannot insert NULL into ("KMS"."KMS_VR_T"."SVN_PATH") ; nested exception is java.sql.SQLIntegrityConstraintViolationException: ORA-01400: cannot insert NULL into ("KMS"."KMS_VR_T"."SVN_PATH")
org.springframework.dao.DataIntegrityViolationException: OJB operation; SQL []; Cannot add or update a child row: a foreign key constraint fails (`kms`.`kms_doc_t`, CONSTRAINT `FK_FIL_DOC_ID` FOREIGN KEY (`DOC_ID`) REFERENCES `kms_fil_nm_t` (`DOC_ID`)); nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Cannot add or update a child row: a foreign key constraint fails (`kms`.`kms_doc_t`, CONSTRAINT `FK_FIL_DOC_ID` FOREIGN KEY (`DOC_ID`) REFERENCES `kms_fil_nm_t` (`DOC_ID`))
at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.doTranslate(SQLStateSQLExceptionTranslator.java:100)
at org.springmodules.orm.ojb.OjbAccessor.convertJdbcAccessException(OjbAccessor.java:107)
at org.springmodules.orm.ojb.OjbAccessor.convertOjbAccessException(OjbAccessor.java:89)
at org.springmodules.orm.ojb.PersistenceBrokerTemplate.execute(PersistenceBrokerTemplate.java:144)
at org.springmodules.orm.ojb.PersistenceBrokerTemplate.store(PersistenceBrokerTemplate.java:244)

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 1 year ago

Know the solutions? Share your knowledge to help other developers to debug faster.