org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update

Atlassian JIRA | Adam Laskowski [Atlassian] | 5 years ago
  1. 0

    If you change the case of a username in LDAP, the next time the directory syncs, Crowd will throw this error about a duplicate entry in the cwd_membership table, and the user will disappear from the directory cache: {code} 2012-05-25 18:07:26,433 scheduler_Worker-1 ERROR [org.hibernate.util.JDBCExceptionReporter] Batch entry 0 insert into cwd_membership (parent_id, child_id, membership_type, group_type, parent_name, lower_parent_name, child_name, lower_child_name, directory_id, id) values ('720898', '65545', 'GROUP_USER', 'GROUP', 'Durarara', 'durarara', 'celty', 'celty', '32770', '786433') was aborted. Call getNextException to see the cause. 2012-05-25 18:07:26,433 scheduler_Worker-1 WARN [org.hibernate.util.JDBCExceptionReporter] SQL Error: 0, SQLState: 23505 2012-05-25 18:07:26,433 scheduler_Worker-1 ERROR [org.hibernate.util.JDBCExceptionReporter] ERROR: duplicate key value violates unique constraint "cwd_membership_parent_id_key" 2012-05-25 18:07:26,434 scheduler_Worker-1 ERROR [hibernate.event.def.AbstractFlushingEventListener] Could not synchronize database state with session org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:71) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43) at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:254) {code} In this example, user 'celty' was changed to user 'CeltY' when the error occurred. The next time the directory syncs, the username will not exist in the database, so they will be added with the new casing of the username, however, there is no error in the UI or indication that this happened, so to the end user, it simply appears as failed logins to the applications backed by Crowd.

    Atlassian JIRA | 5 years ago | Adam Laskowski [Atlassian]
    org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
  2. 0

    If you change the case of a username in LDAP, the next time the directory syncs, Crowd will throw this error about a duplicate entry in the cwd_membership table, and the user will disappear from the directory cache: {code} 2012-05-25 18:07:26,433 scheduler_Worker-1 ERROR [org.hibernate.util.JDBCExceptionReporter] Batch entry 0 insert into cwd_membership (parent_id, child_id, membership_type, group_type, parent_name, lower_parent_name, child_name, lower_child_name, directory_id, id) values ('720898', '65545', 'GROUP_USER', 'GROUP', 'Durarara', 'durarara', 'celty', 'celty', '32770', '786433') was aborted. Call getNextException to see the cause. 2012-05-25 18:07:26,433 scheduler_Worker-1 WARN [org.hibernate.util.JDBCExceptionReporter] SQL Error: 0, SQLState: 23505 2012-05-25 18:07:26,433 scheduler_Worker-1 ERROR [org.hibernate.util.JDBCExceptionReporter] ERROR: duplicate key value violates unique constraint "cwd_membership_parent_id_key" 2012-05-25 18:07:26,434 scheduler_Worker-1 ERROR [hibernate.event.def.AbstractFlushingEventListener] Could not synchronize database state with session org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:71) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43) at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:254) {code} In this example, user 'celty' was changed to user 'CeltY' when the error occurred. The next time the directory syncs, the username will not exist in the database, so they will be added with the new casing of the username, however, there is no error in the UI or indication that this happened, so to the end user, it simply appears as failed logins to the applications backed by Crowd.

    Atlassian JIRA | 5 years ago | Adam Laskowski [Atlassian]
    org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
  3. 0

    Hibernate Persistence issue with BOGO offer

    GitHub | 3 years ago | phillipuniverse
    org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Getting duplicate entry errors from Hibernate, is MySQL to blame?

    Stack Overflow | 7 years ago | Nik Reiman
    org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
  6. 0

    Play framework on tomcat+lighttpd - jpa

    Stack Overflow | 5 years ago | Skyrocket Rocketsky
    org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update

    1 unregistered visitors
    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. org.hibernate.exception.ConstraintViolationException

      Could not execute JDBC batch update

      at org.hibernate.exception.SQLStateConverter.convert()
    2. Hibernate
      AbstractBatcher.executeBatch
      1. org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:71)
      2. org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
      3. org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:254)
      3 frames