java.sql.BatchUpdateException: Batch entry 0 delete from cwd_app_dir_group_mapping where id=262145 was aborted. Call getNextException to see the cause.

Atlassian JIRA | Michael Duong [Atlassian] | 2 years ago
  1. 0

    h3. Summary System error occurs when deleting Crowd Internal Directory that was set up during install when logged in as System Administrator defined in other directory. h3. Environment * Crowd 2.8.0 connected to Apache Directory Server 1.5.X * java version "1.8.0_45" h3. Steps to Reproduce # Log in as a user with System Administrator permissions. # Navigate to directories by clicking on Directories tab. # View the directory that has type "Crowd Internal Directory" and remove checkmark from Active field # Remove directory by clicking on Remove directory on the side bar. # Press Continue to remove the directory. h3. Expected Results Crowd Internal Directory would be deleted from the directories of Crowd. h3. Actual Results System error is seen in the browser. The below exception is thrown in the atlassian-crowd.log file: {code} 2015-05-08 12:04:46,447 http-bio-8095-exec-17 WARN [engine.jdbc.spi.SqlExceptionHelper] SQL Error: 0, SQLState: 23503 2015-05-08 12:04:46,447 http-bio-8095-exec-17 ERROR [engine.jdbc.spi.SqlExceptionHelper] Batch entry 0 delete from cwd_app_dir_group_mapping where id=262145 was aborted. Call getNextException to see the cause. 2015-05-08 12:04:46,447 http-bio-8095-exec-17 WARN [engine.jdbc.spi.SqlExceptionHelper] SQL Error: 0, SQLState: 23503 2015-05-08 12:04:46,447 http-bio-8095-exec-17 ERROR [engine.jdbc.spi.SqlExceptionHelper] ERROR: update or delete on table "cwd_app_dir_group_mapping" violates foreign key constraint "fk_permission_group" on table "cwd_granted_perm" Detail: Key (id)=(262145) is still referenced from table "cwd_granted_perm". 2015-05-08 12:04:46,447 http-bio-8095-exec-17 ERROR [jdbc.batch.internal.BatchingBatch] HHH000315: Exception executing batch [could not perform addBatch] 2015-05-08 12:04:46,447 http-bio-8095-exec-17 INFO [crowd.xwork.interceptors.TransactionalInvocation] Invoking rollback for transaction on action '/console/secure/directory/remove.action (RemoveDirectory.default())' due to throwable: org.springframework.dao.DataIntegrityViolationException: could not perform addBatch; SQL [delete from cwd_app_dir_group_mapping where id=?]; constraint [null]; nested exception is org.hibernate.exception.ConstraintViolationException: could not perform addBatch org.springframework.dao.DataIntegrityViolationException: could not perform addBatch; SQL [delete from cwd_app_dir_group_mapping where id=?]; constraint [null]; nested exception is org.hibernate.exception.ConstraintViolationException: could not perform addBatch at org.springframework.orm.hibernate4.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:138) at org.springframework.orm.hibernate4.HibernateTransactionManager.convertHibernateAccessException(HibernateTransactionManager.java:678) at org.springframework.orm.hibernate4.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:560) ... Caused by: org.hibernate.exception.ConstraintViolationException: could not perform addBatch at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:129) at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:49) at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:124) Caused by: java.sql.BatchUpdateException: Batch entry 0 delete from cwd_app_dir_group_mapping where id=262145 was aborted. Call getNextException to see the cause. at org.postgresql.jdbc2.AbstractJdbc2Statement$BatchResultHandler.handleError(AbstractJdbc2Statement.java:2746) ... 2015-05-08 12:04:46,449 http-bio-8095-exec-17 ERROR [crowd.xwork.interceptors.TransactionalInvocation] Action /console/secure/directory/remove.action (RemoveDirectory.default()) is already completed and can not be committed again. 2015-05-08 12:04:46,449 http-bio-8095-exec-17 ERROR [[Catalina].[localhost].[/crowd].[default]] Servlet.service() for servlet [default] in context with path [/crowd] threw exception [org.springframework.dao.DataIntegrityViolationException: could not perform addBatch; SQL [delete from cwd_app_dir_group_mapping where id=?]; constraint [null]; nested exception is org.hibernate.exception.ConstraintViolationException: could not perform addBatch] with root cause java.sql.BatchUpdateException: Batch entry 0 delete from cwd_app_dir_group_mapping where id=262145 was aborted. Call getNextException to see the cause. at org.postgresql.jdbc2.AbstractJdbc2Statement$BatchResultHandler.handleError(AbstractJdbc2Statement.java:2746) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1887) ... 2015-05-08 12:04:46,450 http-bio-8095-exec-17 ERROR [500ErrorPage] Exception caught in 500 page could not perform addBatch; SQL [delete from cwd_app_dir_group_mapping where id=?]; constraint [null]; nested exception is org.hibernate.exception.ConstraintViolationException: could not perform addBatch org.springframework.dao.DataIntegrityViolationException: could not perform addBatch; SQL [delete from cwd_app_dir_group_mapping where id=?]; constraint [null]; nested exception is org.hibernate.exception.ConstraintViolationException: could not perform addBatch at org.springframework.orm.hibernate4.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:138) at org.springframework.orm.hibernate4.HibernateTransactionManager.convertHibernateAccessException(HibernateTransactionManager.java:678) ... Caused by: org.hibernate.exception.ConstraintViolationException: could not perform addBatch at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:129) ... Caused by: java.sql.BatchUpdateException: Batch entry 0 delete from cwd_app_dir_group_mapping where id=262145 was aborted. Call getNextException to see the cause. at org.postgresql.jdbc2.AbstractJdbc2Statement$BatchResultHandler.handleError(AbstractJdbc2Statement.java:2746) ... {code} h3. Notes Attached pdf of System error seen in the browser. Also tested in Crowd 2.8.2

    Atlassian JIRA | 2 years ago | Michael Duong [Atlassian]
    java.sql.BatchUpdateException: Batch entry 0 delete from cwd_app_dir_group_mapping where id=262145 was aborted. Call getNextException to see the cause.
  2. 0

    h3. Summary System error occurs when deleting Crowd Internal Directory that was set up during install when logged in as System Administrator defined in other directory. h3. Environment * Crowd 2.8.0 connected to Apache Directory Server 1.5.X * java version "1.8.0_45" h3. Steps to Reproduce # Log in as a user with System Administrator permissions. # Navigate to directories by clicking on Directories tab. # View the directory that has type "Crowd Internal Directory" and remove checkmark from Active field # Remove directory by clicking on Remove directory on the side bar. # Press Continue to remove the directory. h3. Expected Results Crowd Internal Directory would be deleted from the directories of Crowd. h3. Actual Results System error is seen in the browser. The below exception is thrown in the atlassian-crowd.log file: {code} 2015-05-08 12:04:46,447 http-bio-8095-exec-17 WARN [engine.jdbc.spi.SqlExceptionHelper] SQL Error: 0, SQLState: 23503 2015-05-08 12:04:46,447 http-bio-8095-exec-17 ERROR [engine.jdbc.spi.SqlExceptionHelper] Batch entry 0 delete from cwd_app_dir_group_mapping where id=262145 was aborted. Call getNextException to see the cause. 2015-05-08 12:04:46,447 http-bio-8095-exec-17 WARN [engine.jdbc.spi.SqlExceptionHelper] SQL Error: 0, SQLState: 23503 2015-05-08 12:04:46,447 http-bio-8095-exec-17 ERROR [engine.jdbc.spi.SqlExceptionHelper] ERROR: update or delete on table "cwd_app_dir_group_mapping" violates foreign key constraint "fk_permission_group" on table "cwd_granted_perm" Detail: Key (id)=(262145) is still referenced from table "cwd_granted_perm". 2015-05-08 12:04:46,447 http-bio-8095-exec-17 ERROR [jdbc.batch.internal.BatchingBatch] HHH000315: Exception executing batch [could not perform addBatch] 2015-05-08 12:04:46,447 http-bio-8095-exec-17 INFO [crowd.xwork.interceptors.TransactionalInvocation] Invoking rollback for transaction on action '/console/secure/directory/remove.action (RemoveDirectory.default())' due to throwable: org.springframework.dao.DataIntegrityViolationException: could not perform addBatch; SQL [delete from cwd_app_dir_group_mapping where id=?]; constraint [null]; nested exception is org.hibernate.exception.ConstraintViolationException: could not perform addBatch org.springframework.dao.DataIntegrityViolationException: could not perform addBatch; SQL [delete from cwd_app_dir_group_mapping where id=?]; constraint [null]; nested exception is org.hibernate.exception.ConstraintViolationException: could not perform addBatch at org.springframework.orm.hibernate4.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:138) at org.springframework.orm.hibernate4.HibernateTransactionManager.convertHibernateAccessException(HibernateTransactionManager.java:678) at org.springframework.orm.hibernate4.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:560) ... Caused by: org.hibernate.exception.ConstraintViolationException: could not perform addBatch at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:129) at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:49) at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:124) Caused by: java.sql.BatchUpdateException: Batch entry 0 delete from cwd_app_dir_group_mapping where id=262145 was aborted. Call getNextException to see the cause. at org.postgresql.jdbc2.AbstractJdbc2Statement$BatchResultHandler.handleError(AbstractJdbc2Statement.java:2746) ... 2015-05-08 12:04:46,449 http-bio-8095-exec-17 ERROR [crowd.xwork.interceptors.TransactionalInvocation] Action /console/secure/directory/remove.action (RemoveDirectory.default()) is already completed and can not be committed again. 2015-05-08 12:04:46,449 http-bio-8095-exec-17 ERROR [[Catalina].[localhost].[/crowd].[default]] Servlet.service() for servlet [default] in context with path [/crowd] threw exception [org.springframework.dao.DataIntegrityViolationException: could not perform addBatch; SQL [delete from cwd_app_dir_group_mapping where id=?]; constraint [null]; nested exception is org.hibernate.exception.ConstraintViolationException: could not perform addBatch] with root cause java.sql.BatchUpdateException: Batch entry 0 delete from cwd_app_dir_group_mapping where id=262145 was aborted. Call getNextException to see the cause. at org.postgresql.jdbc2.AbstractJdbc2Statement$BatchResultHandler.handleError(AbstractJdbc2Statement.java:2746) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1887) ... 2015-05-08 12:04:46,450 http-bio-8095-exec-17 ERROR [500ErrorPage] Exception caught in 500 page could not perform addBatch; SQL [delete from cwd_app_dir_group_mapping where id=?]; constraint [null]; nested exception is org.hibernate.exception.ConstraintViolationException: could not perform addBatch org.springframework.dao.DataIntegrityViolationException: could not perform addBatch; SQL [delete from cwd_app_dir_group_mapping where id=?]; constraint [null]; nested exception is org.hibernate.exception.ConstraintViolationException: could not perform addBatch at org.springframework.orm.hibernate4.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:138) at org.springframework.orm.hibernate4.HibernateTransactionManager.convertHibernateAccessException(HibernateTransactionManager.java:678) ... Caused by: org.hibernate.exception.ConstraintViolationException: could not perform addBatch at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:129) ... Caused by: java.sql.BatchUpdateException: Batch entry 0 delete from cwd_app_dir_group_mapping where id=262145 was aborted. Call getNextException to see the cause. at org.postgresql.jdbc2.AbstractJdbc2Statement$BatchResultHandler.handleError(AbstractJdbc2Statement.java:2746) ... {code} h3. Notes Attached pdf of System error seen in the browser. Also tested in Crowd 2.8.2

    Atlassian JIRA | 2 years ago | Michael Duong [Atlassian]
    java.sql.BatchUpdateException: Batch entry 0 delete from cwd_app_dir_group_mapping where id=262145 was aborted. Call getNextException to see the cause.
  3. 0

    heroku grails bootstrap error

    Stack Overflow | 3 years ago | Cotrariello
    java.sql.BatchUpdateException: Batch entry 0 insert into user (version, cognome, data_registrazione, data_ultima_visita, email, nome, password, id) values ('0', 'pagliaro', '2014-01-15 11:02:02.721000 +00:00:00', '2014-01-15 11:02:02.721000 +00:00:00', 'cotra@hotmail.com', 'carmine', 'carmine', '13') was aborted. Call getNextException to see the cause.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    PostgreSQL Database Performance - the JPA Benchmark

    jpab.org | 8 months ago
    java.sql.BatchUpdateException: Batch entry 0 DELETE FROM NODE WHERE (ID = '129912') was aborted. Call getNextException to see the cause. Error Code: 0 Call: DELETE FROM NODE WHERE (ID = ?) bind => [130000]
  6. 0

    [HIVE-9720] Metastore does not properly migrate column stats when renaming a table across databases. - ASF JIRA

    apache.org | 1 year ago
    java.sql.BatchUpdateException: Batch entry 0 DELETE FROM WHERE ='1621' was aborted. Call getNextException to see the cause.

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.sql.BatchUpdateException

      Batch entry 0 delete from cwd_app_dir_group_mapping where id=262145 was aborted. Call getNextException to see the cause.

      at org.postgresql.jdbc2.AbstractJdbc2Statement$BatchResultHandler.handleError()
    2. PostgreSQL JDBC Driver
      QueryExecutorImpl.processResults
      1. org.postgresql.jdbc2.AbstractJdbc2Statement$BatchResultHandler.handleError(AbstractJdbc2Statement.java:2746)
      2. org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1887)
      2 frames