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)

incubator-ranger-user | Hanish Bansal | 2 years ago
  1. 0

    Issues in Delete Rest Api

    incubator-ranger-user | 2 years ago | Hanish Bansal
    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)
  2. 0

    Issues in Delete Rest Api

    incubator-ranger-user | 2 years ago | Hanish Bansal
    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)
  3. 0

    Connection to AWS RDS Postgres with a JAVA Web App

    Stack Overflow | 2 years ago | user3617131
    containerjavax.persistence.PersistenceException: Unable to build entity manager factory
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. 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()
    2. Java RT
      Method.invoke
      1. sun.reflect.GeneratedMethodAccessor46.invoke(Unknown Source)
      2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      3. java.lang.reflect.Method.invoke(Method.java:606)
      3 frames
    3. Spring ORM
      SharedEntityManagerCreator$SharedEntityManagerInvocationHandler.invoke
      1. org.springframework.orm.jpa.SharedEntityManagerCreator$SharedEntityManagerInvocationHandler.invoke(SharedEntityManagerCreator.java:240)
      1 frame
    4. com.sun.proxy
      $Proxy20.flush
      1. com.sun.proxy.$Proxy20.flush(Unknown Source)
      1 frame
    5. org.apache.ranger
      XUserREST.deleteXGroupByGroupName
      1. org.apache.ranger.common.db.BaseDao.remove(BaseDao.java:106)
      2. org.apache.ranger.common.db.BaseDao.remove(BaseDao.java:97)
      3. org.apache.ranger.biz.XUserMgr.deleteXGroup(XUserMgr.java:77)
      4. org.apache.ranger.rest.XUserREST.deleteXGroupByGroupName(XUserREST.java:545)
      4 frames