com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Cannot add or update a child row: a foreign key constraint fails (`kms`.`kms_wrk_list_itm_stat_t`, CONSTRAINT `fk_itm_stat_cd` FOREIGN KEY (`itm_stat_cd`) REFERENCES `kms_itm_stat_cd_t` (`itm_stat_cd`) ON DELETE NO ACTION ON UPDATE NO ACTION)

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

Samebug tips

,

Check whether privilege has the "not null" restriction. If so it always has to have a value and can never be null.

A different reason could be a wrong implementation of a foreign key. Check whether you always correctly insert/update in both tables.

Solutions on the web

via Kuali JIRA by Mike Riley, 1 year ago
Cannot add or update a child row: a foreign key constraint fails (`kms`.`kms_wrk_list_itm_stat_t`, CONSTRAINT `fk_itm_stat_cd` FOREIGN KEY (`itm_stat_cd`) REFERENCES `kms_itm_stat_cd_t` (`itm_stat_cd`) ON DELETE NO ACTION ON UPDATE NO ACTION)
via Kuali JIRA by Mike Riley, 1 year ago
Cannot add or update a child row: a foreign key constraint fails (`kms`.`kms_wrk_list_itm_stat_t`, CONSTRAINT `fk_itm_stat_cd` FOREIGN KEY (`itm_stat_cd`) REFERENCES `kms_itm_stat_cd_t` (`itm_stat_cd`) ON DELETE NO ACTION ON UPDATE NO ACTION)
via Kuali JIRA by Erik Meade, 1 year ago
Column 'ACTN_RQST_ID' cannot be null Error Code: 1048 Call: INSERT INTO KREW_ACTN_RQST_T (ACTN_RQST_ID, ACTN_RQST_CD, ACTN_RQST_ANNOTN_TXT, APPR_PLCY, CRTE_DT, CUR_IND, DLGN_TYP, DOC_VER_NBR, DOC_HDR_ID, FRC_ACTN, GRP_ID, VER_NBR, PRNCPL_ID
via Kuali JIRA by Erik Meade, 11 months ago
Column 'ACTN_RQST_ID' cannot be null Error Code: 1048 Call: INSERT INTO KREW_ACTN_RQST_T (ACTN_RQST_ID, ACTN_RQST_CD, ACTN_RQST_ANNOTN_TXT, APPR_PLCY, CRTE_DT, CUR_IND, DLGN_TYP, DOC_VER_NBR, DOC_HDR_ID, FRC_ACTN, GRP_ID, VER_NBR, PRNCPL_ID
com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Cannot add or update a child row: a foreign key constraint fails (`kms`.`kms_wrk_list_itm_stat_t`, CONSTRAINT `fk_itm_stat_cd` FOREIGN KEY (`itm_stat_cd`) REFERENCES `kms_itm_stat_cd_t` (`itm_stat_cd`) ON DELETE NO ACTION ON UPDATE NO ACTION)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
at com.mysql.jdbc.Util.getInstance(Util.java:386)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1039)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3609)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3541)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2002)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2163)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2624)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2127)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2427)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2345)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2330)
at org.apache.ojb.broker.accesslayer.JdbcAccessImpl.executeUpdate(Unknown Source)
at org.apache.ojb.broker.core.PersistenceBrokerImpl.storeToDb(Unknown Source)
at org.apache.ojb.broker.core.PersistenceBrokerImpl.store(Unknown Source)
at org.apache.ojb.broker.core.PersistenceBrokerImpl.store(Unknown Source)
at org.apache.ojb.broker.core.PersistenceBrokerImpl.store(Unknown Source)
at org.apache.ojb.broker.core.DelegatingPersistenceBroker.store(Unknown Source)
at org.springmodules.orm.ojb.PersistenceBrokerTemplate$9.doInPersistenceBroker(PersistenceBrokerTemplate.java:246)
at org.springmodules.orm.ojb.PersistenceBrokerTemplate.execute(PersistenceBrokerTemplate.java:141)
at org.springmodules.orm.ojb.PersistenceBrokerTemplate.store(PersistenceBrokerTemplate.java:244)
at org.kuali.rice.kns.dao.impl.BusinessObjectDaoOjb.save(BusinessObjectDaoOjb.java:217)
at org.kuali.rice.kns.dao.proxy.BusinessObjectDaoProxy.save(BusinessObjectDaoProxy.java:213)
at sun.reflect.GeneratedMethodAccessor537.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at undefined.$Proxy38.save(Unknown Source)
at org.kuali.rice.kns.service.impl.BusinessObjectServiceImpl.save(BusinessObjectServiceImpl.java:74)
at sun.reflect.GeneratedMethodAccessor536.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at undefined.$Proxy39.save(Unknown Source)
at org.kuali.kits.kms.bo.KmsDocumentRevisionPostProcessor.updateItemStatusesOnActiveWorkLists(KmsDocumentRevisionPostProcessor.java:137)
at org.kuali.kits.kms.bo.KmsDocumentRevisionPostProcessor.doRouteStatusChange(KmsDocumentRevisionPostProcessor.java:68)
at org.kuali.rice.kew.actions.ActionTakenEvent.notifyStatusChange(ActionTakenEvent.java:210)
at org.kuali.rice.kew.actions.CancelAction.recordAction(CancelAction.java:134)
at org.kuali.rice.kew.routeheader.service.impl.WorkflowDocumentServiceImpl.cancelDocument(WorkflowDocumentServiceImpl.java:186)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.kuali.rice.kew.service.impl.WorkflowDocumentActionsWebServiceImpl.cancelDocument(WorkflowDocumentActionsWebServiceImpl.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.kuali.rice.kew.service.WorkflowDocument.cancel(WorkflowDocument.java:526)
at org.kuali.rice.kns.workflow.service.impl.KualiWorkflowDocumentImpl.cancel(KualiWorkflowDocumentImpl.java:212)
at org.kuali.rice.kns.workflow.service.impl.WorkflowDocumentServiceImpl.cancel(WorkflowDocumentServiceImpl.java:226)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at undefined.$Proxy42.cancel(Unknown Source)
at org.kuali.rice.kns.service.impl.DocumentServiceImpl.cancelDocument(DocumentServiceImpl.java:283)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.kuali.rice.kns.web.struts.action.KualiDocumentActionBase.cancel(KualiDocumentActionBase.java:948)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.kuali.rice.kns.web.struts.action.KualiAction.dispatchMethod(KualiAction.java:172)
at org.kuali.rice.kns.web.struts.action.KualiAction.execute(KualiAction.java:123)
at org.kuali.rice.kns.web.struts.action.KualiDocumentActionBase.execute(KualiDocumentActionBase.java:118)
at org.kuali.kits.kms.web.KmsDocumentAction.execute(KmsDocumentAction.java:97)
at org.kuali.rice.kns.web.struts.action.KualiRequestProcessor$1.doInTransaction(KualiRequestProcessor.java:503)
at org.kuali.rice.kns.web.struts.action.KualiRequestProcessor.processActionPerform(KualiRequestProcessor.java:499)
at org.kuali.rice.kns.web.struts.action.KualiRequestProcessor.process(KualiRequestProcessor.java:101)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.kuali.rice.kew.web.UserLoginFilter.doFilter(UserLoginFilter.java:92)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.kuali.rice.kew.web.BootstrapFilterChain.doFilter(BootstrapFilter.java:273)
at org.kuali.rice.kew.web.DummyLoginFilter.doFilter(DummyLoginFilter.java:86)
at org.kuali.rice.kew.web.BootstrapFilterChain.doFilter(BootstrapFilter.java:266)
at org.kuali.rice.kew.web.BootstrapFilter.doFilter(BootstrapFilter.java:164)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.displaytag.filter.ResponseOverrideFilter.doFilter(ResponseOverrideFilter.java:125)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.kuali.rice.kns.web.filter.HideWebInfFilter.doFilter(HideWebInfFilter.java:69)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 2 years ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Once, 1 year ago
Once, 4 days ago
150 times, 4 months ago
70 more bugmates

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