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

  1. ,

    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.

  2. ,

    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 ProgrammerDan
, 1 year ago
Duplicate entry '23068d2b-9421-44a4-8db5-745ff921bad9-1' for key 'PRIMARY'
via Stack Overflow by Mykhailo Seniutovych
, 1 year ago
Cannot add or update a child row: a foreign key constraint fails (`grades_book_db`.`grades`, CONSTRAINT `FK_Grades_Subject` FOREIGN KEY (`Subject_Id`) REFERENCES `subjects` (`Subject_Id`))
via Stack Overflow by Milos Vulic
, 3 months ago
Cannot add or update a child row: a foreign key constraint fails (`projekatbaze`.`pesmica`, CONSTRAINT `pesmica_ibfk_1` FOREIGN KEY (`id_album`) REFERENCES `album` (`id_album`) ON DELETE CASCADE ON UPDATE NO ACTION)
via Stack Overflow by Romil Jain
, 1 year ago
Duplicate entry 'owner1:warehouseid1:skuid98238:08-11-2016' for key 'PRIMARY'
via cayenne-user by Andrew Willerding, 2 years ago
Duplicate entry '2-9999-1922-1' for key 'U_ProjectContact'
com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '23068d2b-9421-44a4-8db5-745ff921bad9-1'
for key 'PRIMARY'	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)	at sun.reflect.NativeConstructorAccessorImpl.newInstance(	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(	at java.lang.reflect.Constructor.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	at	at	at net.minecraft.server.v1_10_R1.PlayerList.savePlayerFile(	at net.minecraft.server.v1_10_R1.PlayerList.disconnect(	at net.minecraft.server.v1_10_R1.PlayerConnection.a(	at net.minecraft.server.v1_10_R1.NetworkManager.handleDisconnection(	at net.minecraft.server.v1_10_R1.ServerConnection.c(	at net.minecraft.server.v1_10_R1.MinecraftServer.D(	at net.minecraft.server.v1_10_R1.DedicatedServer.D(	at net.minecraft.server.v1_10_R1.MinecraftServer.C(	at	at