org.h2.jdbc.JdbcSQLException

If you like a tip written by other Samebug users, mark is as helpful! Marks help our algorithm provide you better solutions and also help other users.
tip

Check if you're not creating unused SQL entities, as it might cause this exception.


rafael

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

  • org.h2.jdbc.JdbcSQLException: Constraint "FK_QUERYEXECUTION_REF_QUERY_ID" not found; SQL statement: ALTER TABLE PUBLIC.query_queryexecution DROP CONSTRAINT fk_queryexecution_ref_query_id; [90057-192] at org.h2.message.DbException.getJdbcSQLException(DbException.java:345) at org.h2.message.DbException.get(DbException.java:179) at org.h2.message.DbException.get(DbException.java:155) at org.h2.command.ddl.AlterTableDropConstraint.update(AlterTableDropConstraint.java:41) at org.h2.command.CommandContainer.update(CommandContainer.java:98) at org.h2.command.Command.executeUpdate(Command.java:258) at org.h2.jdbc.JdbcPreparedStatement.executeUpdateInternal(JdbcPreparedStatement.java:160) at org.h2.jdbc.JdbcPreparedStatement.executeUpdate(JdbcPreparedStatement.java:146) at clojure.java.jdbc$db_do_execute_prepared_statement$fn__2799.invoke(jdbc.clj:784) at clojure.java.jdbc$db_transaction_STAR_.invokeStatic(jdbc.clj:637) at clojure.java.jdbc$db_transaction_STAR_.invoke(jdbc.clj:585) at clojure.java.jdbc$db_transaction_STAR_.invokeStatic(jdbc.clj:598) at clojure.java.jdbc$db_transaction_STAR_.invoke(jdbc.clj:585) at clojure.java.jdbc$db_do_execute_prepared_statement.invokeStatic(jdbc.clj:783) at clojure.java.jdbc$db_do_execute_prepared_statement.invoke(jdbc.clj:778) at clojure.java.jdbc$db_do_prepared.invokeStatic(jdbc.clj:814) at clojure.java.jdbc$db_do_prepared.invoke(jdbc.clj:795) at clojure.java.jdbc$execute_BANG_$execute_helper__2842.invoke(jdbc.clj:961) at clojure.java.jdbc$execute_BANG_.invokeStatic(jdbc.clj:963) at clojure.java.jdbc$execute_BANG_.invoke(jdbc.clj:943) at clojure.java.jdbc$execute_BANG_.invokeStatic(jdbc.clj:954) at clojure.java.jdbc$execute_BANG_.invoke(jdbc.clj:943) at metabase.db$migrate_up_if_needed_BANG_.invokeStatic(db.clj:165) at metabase.db$migrate_up_if_needed_BANG_.invoke(db.clj:152) at metabase.db$migrate_BANG_$fn__5602.invoke(db.clj:225) at clojure.java.jdbc$db_transaction_STAR_.invokeStatic(jdbc.clj:613) at clojure.java.jdbc$db_transaction_STAR_.invoke(jdbc.clj:585) at clojure.java.jdbc$db_transaction_STAR_.invokeStatic(jdbc.clj:629) at clojure.java.jdbc$db_transaction_STAR_.invoke(jdbc.clj:585) at clojure.java.jdbc$db_transaction_STAR_.invokeStatic(jdbc.clj:598) at clojure.java.jdbc$db_transaction_STAR_.invoke(jdbc.clj:585) at metabase.db$migrate_BANG_.invokeStatic(db.clj:214) at metabase.db$migrate_BANG_.invoke(db.clj:197) at metabase.db$setup_db_BANG_.invokeStatic(db.clj:351) at metabase.db$setup_db_BANG_.doInvoke(db.clj:338) at clojure.lang.RestFn.invoke(RestFn.java:421) at metabase.core$init_BANG_.invokeStatic(core.clj:111) at metabase.core$init_BANG_.invoke(core.clj:91) at metabase.core$start_normally.invokeStatic(core.clj:195) at metabase.core$start_normally.invoke(core.clj:189) at metabase.core$_main.invokeStatic(core.clj:229) at metabase.core$_main.doInvoke(core.clj:224) at clojure.lang.RestFn.invoke(RestFn.java:397) at clojure.lang.AFn.applyToHelper(AFn.java:152) at clojure.lang.RestFn.applyTo(RestFn.java:132) at metabase.core.main(Unknown Source)

Users with the same issue

tvrmsmith
23 times, last one,
Andreas Häber
1 times, last one,
Victor_IT
3 times, last one,
batwalrus76
3 times, last one,
andyglick
4 times, last one,
143 more bugmates