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 jboss.org by Unknown author, 2 years ago
Duplicate entry 'Jane Austin' for key 'PRIMARY'
via Google Groups by praveenm, 2 years ago
via Stack Overflow by user5655410
, 1 year ago
Cannot add or update a child row: a foreign key constraint fails (`database`.`Comments_Table`, CONSTRAINT `Comments_Table_ibfk_2` FOREIGN KEY (`Reference_ID`) REFERENCES `A_Table` (`A_Table_ID`) ON DELETE CASCADE ON UPDATE CAS)
via Stack Overflow by Aakash
, 1 year ago
Duplicate entry '3-1' for key 'PRIMARY'
via GitHub by alanpearce
, 2 years ago
Duplicate entry '4011' for key 'PRIMARY'
via Stack Overflow by arjun narahari
, 2 years ago
Duplicate entry '1' for key 'UK_qk8e1fl454umkjvarmovmdgrp'
com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry 'Jane Austin' for key 'PRIMARY'	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)	at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)	at com.mysql.jdbc.Util.getInstance(Util.java:386)	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1039)	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3609)	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3541)	at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2002)	at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2163)	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2624)	at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2127)	at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2427)	at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:1980)