containerjavax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.5.2.v20131113-a7346c6): org.eclipse.persistence.exceptions.DatabaseExceptionInternal Exception: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Cannot delete or update a parent row: a foreign key constraint fails (`ranger`.`x_perm_map`, CONSTRAINT `x_perm_map_FK_group_id` FOREIGN KEY (`group_id`) REFERENCES `x_group` (`id`))Error Code: 1451Call: DELETE FROM x_group WHERE (ID = ?) bind => [1 parameter bound]Query: DeleteObjectQuery(XXGroup={XXDBBase={createTime={Thu Dec 25 12:41:06 IST 2014} updateTime={Thu Dec 25 12:41:06 IST 2014} addedByUserId={1} updatedByUserId={1} }name={Group5} description={} status={0} groupType={0} credStoreId={null} groupSrc={0} }) at org.eclipse.persistence.internal.jpa.EntityManagerImpl.flush(EntityManagerImpl.java:868)

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 incubator-ranger-user by Hanish Bansal, 1 year ago
bound]Query: DeleteObjectQuery(XXGroup={XXDBBase={createTime={Thu Dec 25 12:41:06 IST 2014} updateTime={Thu Dec 25 12:41:06 IST 2014} addedByUserId={1} updatedByUserId={1} }name={Group5} description={} status={0} groupType={0} credStoreId={null} groupSrc={0} }) at org.eclipse.persistence.internal.jpa.EntityManagerImpl.flush(EntityManagerImpl.java:868)
via incubator-ranger-user by Hanish Bansal, 1 year ago
bound]Query: DeleteObjectQuery(XXGroup={XXDBBase={createTime={Thu Dec 25 12:41:06 IST 2014} updateTime={Thu Dec 25 12:41:06 IST 2014} addedByUserId={1} updatedByUserId={1} }name={Group5} description={} status={0} groupType={0} credStoreId={null} groupSrc={0} }) at org.eclipse.persistence.internal.jpa.EntityManagerImpl.flush(EntityManagerImpl.java:868)
containerjavax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.5.2.v20131113-a7346c6): org.eclipse.persistence.exceptions.DatabaseExceptionInternal Exception: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Cannot delete or update a parent row: a foreign key constraint fails (`ranger`.`x_perm_map`, CONSTRAINT `x_perm_map_FK_group_id` FOREIGN KEY (`group_id`) REFERENCES `x_group` (`id`))Error Code: 1451Call: DELETE FROM x_group WHERE (ID = ?) bind => [1 parameter bound]Query: DeleteObjectQuery(XXGroup={XXDBBase={createTime={Thu Dec 25 12:41:06 IST 2014} updateTime={Thu Dec 25 12:41:06 IST 2014} addedByUserId={1} updatedByUserId={1} }name={Group5} description={} status={0} groupType={0} credStoreId={null} groupSrc={0} }) at org.eclipse.persistence.internal.jpa.EntityManagerImpl.flush(EntityManagerImpl.java:868)
at sun.reflect.GeneratedMethodAccessor46.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.sun.proxy.$Proxy20.flush(Unknown Source)
at org.apache.ranger.common.db.BaseDao.remove(BaseDao.java:106)
at org.apache.ranger.common.db.BaseDao.remove(BaseDao.java:97)
at org.apache.ranger.biz.XUserMgr.deleteXGroup(XUserMgr.java:77)
at org.apache.ranger.rest.XUserREST.deleteXGroupByGroupName(XUserREST.java:545)

Users with the same issue

You are the first who have seen this exception.

Write tip

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