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 JIRA by Yannick Marcon, 1 year ago
SQL: INSERT INTO `opal_tabular`.`categories` (`datasource`, `value_table`, `variable`, `name`, `missing`) VALUES ('ccc', 'Drugs', 'CLASS', 'Human', 0)]; nested exception is java.sql.SQLException: liquibase.exception.DatabaseException: Duplicate
via JIRA by Carlos Silva, 1 year ago
org.apache.shiro.session.UnknownSessionException: There is no session with id [89d982c3-37f4-4356-84ad-d55cc5483215]
via JIRA by Carlos Silva, 1 year ago
org.apache.shiro.session.UnknownSessionException: There is no session with id [89d982c3-37f4-4356-84ad-d55cc5483215]
via JIRA by Carlos Silva, 2 years ago
org.apache.shiro.session.UnknownSessionException: There is no session with id [89d982c3-37f4-4356-84ad-d55cc5483215]
via JIRA by Carlos Silva, 2 years ago
org.apache.shiro.session.UnknownSessionException: There is no session with id [89d982c3-37f4-4356-84ad-d55cc5483215]
java.lang.RuntimeException: org.springframework.jdbc.UncategorizedSQLException: ConnectionCallback; uncategorized SQLException for SQL []; SQL state [null]; error code [0]; liquibase.exception.DatabaseException: Duplicate entry 'ccc-Drugs-CLASS-Human' for key 'PRIMARY' [Failed SQL: INSERT INTO `opal_tabular`.`categories` (`datasource`, `value_table`, `variable`, `name`, `missing`) VALUES ('ccc', 'Drugs', 'CLASS', 'Human', 0)]; nested exception is java.sql.SQLException: liquibase.exception.DatabaseException: Duplicate entry 'ccc-Drugs-CLASS-Human' for key 'PRIMARY' [Failed SQL: INSERT INTO `opal_tabular`.`categories` (`datasource`, `value_table`, `variable`, `name`, `missing`) VALUES ('ccc', 'Drugs', 'CLASS', 'Human', 0)] at org.obiba.opal.core.service.DataImportServiceImpl.copyValueTables(DataImportServiceImpl.java:142)[opal-core-2.6-SNAPSHOT.jar:na] at org.obiba.opal.core.service.DataImportServiceImpl.importData(DataImportServiceImpl.java:105)[opal-core-2.6-SNAPSHOT.jar:na] at org.obiba.opal.core.service.DataImportServiceImpl.importData(DataImportServiceImpl.java:87)[opal-core-2.6-SNAPSHOT.jar:na] at org.obiba.opal.shell.commands.ImportCommand.importFromTables(ImportCommand.java:155)[opal-shell-2.6-SNAPSHOT.jar:na] at org.obiba.opal.shell.commands.ImportCommand.executeImports(ImportCommand.java:89)[opal-shell-2.6-SNAPSHOT.jar:na] at org.obiba.opal.shell.commands.ImportCommand.execute(ImportCommand.java:68)[opal-shell-2.6-SNAPSHOT.jar:na] at org.obiba.opal.shell.CommandJob.run(CommandJob.java:153)[opal-shell-2.6-SNAPSHOT.jar:na] at org.apache.shiro.subject.support.SubjectRunnable.doRun(SubjectRunnable.java:120)[shiro-core-1.2.3-java8.jar:1.2.3-java8] at org.apache.shiro.subject.support.SubjectRunnable.run(SubjectRunnable.java:108)[shiro-core-1.2.3-java8.jar:1.2.3-java8] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[na:1.8.0_101] at java.util.concurrent.FutureTask.run(FutureTask.java:266)[na:1.8.0_101] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[na:1.8.0_101] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[na:1.8.0_101] at java.lang.Thread.run(Thread.java:745)[na:1.8.0_101]Caused by: org.springframework.jdbc.UncategorizedSQLException: ConnectionCallback; uncategorized SQLException for SQL []; SQL state [null]; error code [0]; liquibase.exception.DatabaseException: Duplicate entry 'ccc-Drugs-CLASS-Human' for key 'PRIMARY' [Failed SQL: INSERT INTO `opal_tabular`.`categories` (`datasource`, `value_table`, `variable`, `name`, `missing`) VALUES ('ccc', 'Drugs', 'CLASS', 'Human', 0)]; nested exception is java.sql.SQLException: liquibase.exception.DatabaseException: Duplicate entry 'ccc-Drugs-CLASS-Human' for key 'PRIMARY' [Failed SQL: INSERT INTO `opal_tabular`.`categories` (`datasource`, `value_table`, `variable`, `name`, `missing`) VALUES ('ccc', 'Drugs', 'CLASS', 'Human', 0)] at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:84)[spring-jdbc-4.2.1.RELEASE.jar:4.2.1.RELEASE] at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:81)[spring-jdbc-4.2.1.RELEASE.jar:4.2.1.RELEASE] at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:81)[spring-jdbc-4.2.1.RELEASE.jar:4.2.1.RELEASE] at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:356)[spring-jdbc-4.2.1.RELEASE.jar:4.2.1.RELEASE] at org.obiba.magma.datasource.jdbc.JdbcDatasource.doWithDatabase(JdbcDatasource.java:480)[magma-datasource-jdbc-1.12-20160926.114307-99.jar:1.12-SNAPSHOT] at org.obiba.magma.datasource.jdbc.JdbcValueTableWriter$JdbcVariableWriter.close(JdbcValueTableWriter.java:265)[magma-datasource-jdbc-1.12-20160926.114307-99.jar:1.12-SNAPSHOT] at org.obiba.magma.support.DatasourceCopier.copyMetadata(DatasourceCopier.java:266)[magma-api-1.12-20160926.114307-99.jar:1.12-SNAPSHOT] at org.obiba.magma.support.DatasourceCopier.copy(DatasourceCopier.java:227)[magma-api-1.12-20160926.114307-99.jar:1.12-SNAPSHOT] at org.obiba.magma.support.DatasourceCopier.copy(DatasourceCopier.java:217)[magma-api-1.12-20160926.114307-99.jar:1.12-SNAPSHOT] at org.obiba.magma.support.DatasourceCopier.copy(DatasourceCopier.java:200)[magma-api-1.12-20160926.114307-99.jar:1.12-SNAPSHOT] at org.obiba.opal.core.service.CopyValueTablesLockingAction$CopyAction.execute(CopyValueTablesLockingAction.java:150)[opal-core-2.6-SNAPSHOT.jar:na] at org.obiba.opal.core.magma.concurrent.LockingActionTemplate$1.doInTransactionWithoutResult(LockingActionTemplate.java:47)[opal-core-2.6-SNAPSHOT.jar:na] at org.springframework.transaction.support.TransactionCallbackWithoutResult.doInTransaction(TransactionCallbackWithoutResult.java:34)[spring-tx-4.2.1.RELEASE.jar:4.2.1.RELEASE] at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133)[spring-tx-4.2.1.RELEASE.jar:4.2.1.RELEASE] at org.obiba.opal.core.magma.concurrent.LockingActionTemplate.doInTransaction(LockingActionTemplate.java:42)[opal-core-2.6-SNAPSHOT.jar:na] at org.obiba.opal.core.magma.concurrent.LockingActionTemplate.execute(LockingActionTemplate.java:31)[opal-core-2.6-SNAPSHOT.jar:na] at org.obiba.opal.core.service.DataImportServiceImpl.copyValueTables(DataImportServiceImpl.java:134)[opal-core-2.6-SNAPSHOT.jar:na] ... 13 moreCaused by: java.sql.SQLException: liquibase.exception.DatabaseException: Duplicate entry 'ccc-Drugs-CLASS-Human' for key 'PRIMARY' [Failed SQL: INSERT INTO `opal_tabular`.`categories` (`datasource`, `value_table`, `variable`, `name`, `missing`) VALUES ('ccc', 'Drugs', 'CLASS', 'Human', 0)] at org.obiba.magma.datasource.jdbc.JdbcDatasource$6.doInConnection(JdbcDatasource.java:491)[magma-datasource-jdbc-1.12-20160926.114307-99.jar:1.12-SNAPSHOT] at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:349)[spring-jdbc-4.2.1.RELEASE.jar:4.2.1.RELEASE] ... 26 moreCaused by: liquibase.exception.DatabaseException: Duplicate entry 'ccc-Drugs-CLASS-Human' for key 'PRIMARY' [Failed SQL: INSERT INTO `opal_tabular`.`categories` (`datasource`, `value_table`, `variable`, `name`, `missing`) VALUES ('ccc', 'Drugs', 'CLASS', 'Human', 0)] at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:316)[liquibase-core-3.4.1.jar:na] at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:55)[liquibase-core-3.4.1.jar:na] at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:122)[liquibase-core-3.4.1.jar:na] at liquibase.database.AbstractJdbcDatabase.execute(AbstractJdbcDatabase.java:1247)[liquibase-core-3.4.1.jar:na] at org.obiba.magma.datasource.jdbc.JdbcDatasource$ChangeDatabaseCallback.doInDatabase(JdbcDatasource.java:641)[magma-datasource-jdbc-1.12-20160926.114307-99.jar:1.12-SNAPSHOT] at org.obiba.magma.datasource.jdbc.JdbcDatasource$6.doInConnection(JdbcDatasource.java:489)[magma-datasource-jdbc-1.12-20160926.114307-99.jar:1.12-SNAPSHOT] ... 27 moreCaused by: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry 'ccc-Drugs-CLASS-Human' for key 'PRIMARY' at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)[na:1.8.0_101] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)[na:1.8.0_101] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)[na:1.8.0_101] at java.lang.reflect.Constructor.newInstance(Constructor.java:423)[na:1.8.0_101] at com.mysql.jdbc.Util.handleNewInstance(Util.java:400)[mysql-connector-java-5.1.36.jar:5.1.36] at com.mysql.jdbc.Util.getInstance(Util.java:383)[mysql-connector-java-5.1.36.jar:5.1.36] at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:973)[mysql-connector-java-5.1.36.jar:5.1.36] at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3847)[mysql-connector-java-5.1.36.jar:5.1.36] at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3783)[mysql-connector-java-5.1.36.jar:5.1.36] at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2447)[mysql-connector-java-5.1.36.jar:5.1.36] at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2594)[mysql-connector-java-5.1.36.jar:5.1.36] at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2541)[mysql-connector-java-5.1.36.jar:5.1.36] at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2499)[mysql-connector-java-5.1.36.jar:5.1.36] at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:844)[mysql-connector-java-5.1.36.jar:5.1.36] at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:748)[mysql-connector-java-5.1.36.jar:5.1.36] at org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStatement.java:264)[commons-dbcp-1.4.jar:1.4] at org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStatement.java:264)[commons-dbcp-1.4.jar:1.4] at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:314)[liquibase-core-3.4.1.jar:na] ... 32 more