java.sql.BatchUpdateException: Duplicate entry 'GC Boys' for key 2

coderanch.com | 4 months ago
  1. 0

    GitHub comment 31#16909049

    GitHub | 4 years ago | sonalgoyal
    java.sql.BatchUpdateException: Cannot delete or update a parent row: a foreign key constraint fails (testCrux.mapping, CONSTRAINT fk_mapping_connectionId FOREIGN KEY (connectionId) REFERENCES connection ( id) ON DELETE NO ACTION ON UPDATE NO ACTION)
  2. 0

    GitHub comment 339#175374213

    GitHub | 10 months ago | zhouxl1989
    org.springframework.jdbc.UncategorizedSQLException: Hibernate flushing: Could not execute JDBC batch update; uncategorized SQLException for SQL [update tb_project set name=?, related_ids=?, group_id=?, mock_num=?, version=?, create_date=?, update_time=?, introduction=?, workspace_mode=?, project_data=?, access_type=?, user_id=? where id=?]; SQL state [S1000]; error code [0]; Packet for query is too large (21278 > 1024). You can change this value on the server by setting the max_allowed_packet' variable.; nested exception is java.sql.BatchUpdateException: Packet for query is too large (21278 > 1024). You can change this value on the server by setting the max_allowed_packet' variable.
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    Hibernate autoincrement in loadbalancing tomcats?

    Stack Overflow | 4 years ago | Rocko
    java.sql.BatchUpdateException: Duplicate entry '145985' for key 'PRIMARY'
  5. 0

    Hibernate entity generates weird sql and tries to save duplicate entries

    Stack Overflow | 5 years ago | fred
    org.springframework.dao.DataIntegrityViolationException: Could not execute JDBC batch update; SQL [insert into mail_event_recipients (mail_event_id, recipients_id) values (?, ?)]; constraint [null]; nested exception is org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update

  1. mortalman7 32 times, last 5 months ago
  2. linxiaolong 36 times, last 3 days ago
  3. linxiaolong 4 times, last 3 months ago
9 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. java.sql.BatchUpdateException

    Duplicate entry 'GC Boys' for key 2

    at com.mysql.jdbc.PreparedStatement.executeBatchSerially()
  2. MySQL jdbc
    PreparedStatement.executeBatch
    1. com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:1693)
    2. com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:1108)
    2 frames
  3. c3p0:JDBC DataSources/Resource Pools
    NewProxyPreparedStatement.executeBatch
    1. com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeBatch(NewProxyPreparedStatement.java:1723)
    1 frame
  4. Hibernate
    ActionQueue.executeActions
    1. org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:48)
    2. org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:246)
    3. org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:235)
    4. org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:140)
    4 frames
  5. Hibernate
    SessionImpl.managedFlush
    1. org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298)
    2. org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
    3. org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
    4. org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:338)
    4 frames
  6. Hibernate
    JDBCTransaction.commit
    1. org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106)
    1 frame
  7. filter
    SessionFilter.doFilter
    1. filter.SessionFilter.doFilter(SessionFilter.java:42)
    1 frame
  8. Glassfish Core
    CoyoteAdapter.service
    1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    3. org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    4. org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    5. org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
    6. org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    7. org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    8. org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
    8 frames
  9. Grizzly HTTP
    JIoEndpoint$Worker.run
    1. org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
    2. org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
    3. org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
    3 frames
  10. Java RT
    Thread.run
    1. java.lang.Thread.run(Unknown Source)
    1 frame