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

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 Coderanch by Kris Reid, 11 months ago
Duplicate entry 'GC Boys' for key 2
via GitHub by augepang
, 2 years ago
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)
via GitHub by sonalgoyal
, 2 years ago
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)
via Stack Overflow by lassejl
, 2 years ago
Duplicate entry '4' for key 'mealEntries_id'
via Stack Overflow by Rocko
, 2 years ago
Duplicate entry '145985' for key 'PRIMARY'
java.sql.BatchUpdateException: Duplicate entry 'GC Boys' for key 2
at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:1693)
at com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:1108)
at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:48)
at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:246)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:235)
at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
at filter.SessionFilter.doFilter(SessionFilter.java:42)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at java.lang.Thread.run(Unknown Source)

Users with the same issue

32 times, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 2 years ago
Samebug visitor profile picture
Unknown user
Once, 2 years ago
Once, 5 months ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
6 more bugmates

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