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 Stack Overflow by Arby
, 1 year ago
Duplicate entry 'Gleißner-A.-0' for key 'PRIMARY'
via Stack Overflow by Aakash
, 1 year ago
Duplicate entry '3-1' for key 'PRIMARY'
via Google Groups by praveenm, 2 years ago
via jboss.org by Unknown author, 2 years ago
Duplicate entry 'Jane Austin' for key 'PRIMARY'
via cayenne-user by Andrew Willerding, 2 years ago
Duplicate entry '2-9999-1922-1' for key 'U_ProjectContact'
via Stack Overflow by dhyanandra singh
, 1 year ago
Cannot add or update a child row: a foreign key constraint fails (`kabliwalassec18`.`staff_complaint`, CONSTRAINT `FKe83ta71b6hk1c0nq5nwy475i5` FOREIGN KEY (`complaint_id`) REFERENCES `complaint_master` (`id`))
com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry 'Gleißner-A.-0' for key 'PRIMARY'	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)	at java.lang.reflect.Constructor.newInstance(Constructor.java:526)	at com.mysql.jdbc.Util.handleNewInstance(Util.java:404)	at com.mysql.jdbc.Util.getInstance(Util.java:387)	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:934)	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3966)	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3902)	at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2526)	at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2673)	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2545)	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2503)	at com.mysql.jdbc.StatementImpl.executeInternal(StatementImpl.java:839)	at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:739)	at mySQLInsert.InsertPerson.main(InsertPerson.java:111)