javax.persistence.PersistenceException: ERROR executing DML bindLog[] error[Duplicate entry '19' for key 'PRIMARY']

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

Samebug tips


Check whether privilege has the "not null" restriction. If so it always has to have a value and can never be null.

A different reason could be a wrong implementation of a foreign key. Check whether you always correctly insert/update in both tables.


Nothing is wrong with the database. When it gives you those errors, it's telling you that you are trying to input "nothing" (null) into a column that doesn't allow it. Fix it by removing the not null constraint or by passing a value to that field.

Solutions on the web

via GitHub by Vilican
, 1 year ago
ERROR executing DML bindLog[] error[Duplicate entry '19' for key 'PRIMARY']
via GitHub by HashSploit
, 1 year ago
ERROR executing DML bindLog[] error[[SQLITE_CONSTRAINT] Abort due to constraint violation (PRIMARY KEY must be unique)]
via by Unknown author, 2 years ago
ERROR executing DML bindLog[Binding Insert [list_data] set[listId=1, name=test, ]] error[Duplicate entry '1' for key 1]
via Google Groups by sunkid, 6 months ago
ERROR executing DML bindLog[Binding Insert [list_data] set[listId=1, name=test, ]] error[Duplicate entry '1' for key 1]
via Google Groups by Juan, 6 months ago
ERROR executing DML bindLog[] error[Violación de indice de Unicidad ó Clave primaria: "PRIMARY_KEY_5 ON PUBLIC.LOCATIONS(ID)"\n Unique index or primary key violation: "PRIMARY_KEY_5 ON PUBLIC.LOCATIONS(ID)"; SQL statement:\n insert into locations (id, slug, parent_location_id) values (?,?,?) [23505-157]]
via GitHub by PinoyLifeCraft
, 1 year ago
ERROR executing DML bindLog[] error[assertion failure: param count (11) != value count (22)]
com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '19' for key 'PRIMARY'
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(
at com.mysql.jdbc.Util.handleNewInstance(
at com.mysql.jdbc.Util.getInstance(
at com.mysql.jdbc.SQLError.createSQLException(
at com.mysql.jdbc.MysqlIO.checkErrorPacket(
at com.mysql.jdbc.MysqlIO.checkErrorPacket(
at com.mysql.jdbc.MysqlIO.sendCommand(
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(
at com.mysql.jdbc.ConnectionImpl.execSQL(
at com.mysql.jdbc.PreparedStatement.executeInternal(
at com.mysql.jdbc.PreparedStatement.executeUpdateInternal(
at com.mysql.jdbc.PreparedStatement.executeUpdateInternal(
at com.mysql.jdbc.PreparedStatement.executeLargeUpdate(
at com.mysql.jdbc.PreparedStatement.executeUpdate(
at com.avaje.ebeaninternal.server.lib.sql.ExtendedPreparedStatement.executeUpdate(
at com.avaje.ebeaninternal.server.type.DataBind.executeUpdate(
at com.avaje.ebeaninternal.server.persist.dml.InsertHandler.execute(
at com.avaje.ebeaninternal.server.persist.dml.DmlBeanPersister.execute(
at com.avaje.ebeaninternal.server.persist.dml.DmlBeanPersister.insert(
at com.avaje.ebeaninternal.server.persist.DefaultPersistExecute.executeInsertBean(
at com.avaje.ebeaninternal.server.core.PersistRequestBean.executeNow(
at com.avaje.ebeaninternal.server.core.PersistRequestBean.executeOrQueue(
at com.avaje.ebeaninternal.server.persist.DefaultPersister.insert(
at com.avaje.ebeaninternal.server.persist.DefaultPersister.saveVanillaInsert(
at com.avaje.ebeaninternal.server.persist.DefaultPersister.saveVanillaRecurse(
at com.avaje.ebeaninternal.server.persist.DefaultPersister.saveRecurse(
at com.avaje.ebeaninternal.server.persist.DefaultPersister.saveAssocOne(
at com.avaje.ebeaninternal.server.persist.DefaultPersister.update(
at com.avaje.ebeaninternal.server.persist.DefaultPersister.saveEnhanced(
at com.avaje.ebeaninternal.server.persist.DefaultPersister.saveRecurse(
at com.lenis0012.bukkit.loginsecurity.session.PlayerSession$
at java.util.concurrent.ThreadPoolExecutor.runWorker(
at java.util.concurrent.ThreadPoolExecutor$

Users with the same issue

6 times, 1 week ago
Once, 1 week ago
5 times, 4 weeks ago
4 times, 1 month ago
2 times, 1 month ago

Write tip

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