Unable to remove constraint

72 views
Skip to first unread message

Meni Hillel

unread,
Jun 26, 2016, 7:34:30 PM6/26/16
to H2 Database
Using H2 v1.4.191

Trying to delete it shows:

Error: Constraint "UK_1PT73622HFCLVE5LRHRQTITBK" not found; SQL statement:
alter table subscription drop constraint UK_1pt73622hfclve5lrhrqtitbk [90057-187]
SQLState:  90057
ErrorCode: 90057
Error: org.h2.jdbc.JdbcSQLException: Constraint "UK_1PT73622HFCLVE5LRHRQTITBK_INDEX_9" not found; SQL statement:
ALTER TABLE SUBSCRIPTION DROP CONSTRAINT UK_1PT73622HFCLVE5LRHRQTITBK_INDEX_9 [90057-191]
    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.server.TcpServerThread.process(TcpServerThread.java:345)
    at org.h2.server.TcpServerThread.run(TcpServerThread.java:159)
    at java.lang.Thread.run(Thread.java:745)
, SQL State: 90057, Error Code: 90057

It shows up as if it exists and it gets enforced.


Auto Generated Inline Image 1

Noel Grandin

unread,
Jun 30, 2016, 9:08:21 AM6/30/16
to h2-da...@googlegroups.com
Hmmm, for starters, you are mixing and two different versions of H2 there, 1.4.187 and 1.4.191.
I would fix that first and see if the problem still happens.

After that, try updating to 1.4.192 and check if it is still there.

Meni Hillel

unread,
Jun 30, 2016, 12:38:19 PM6/30/16
to H2 Google Group
Is that even possible? I am using maven and clearly only one version shows up.



--
You received this message because you are subscribed to a topic in the Google Groups "H2 Database" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/h2-database/Ecvu83pEZC0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to h2-database...@googlegroups.com.
To post to this group, send email to h2-da...@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.

Noel Grandin

unread,
Jul 1, 2016, 5:13:32 AM7/1/16
to h2-da...@googlegroups.com
one version on the server side and one version on the client side.
(which mostly works, but since you have a problem, lets eliminate this possibility first).

Either that, or your classpath has some craziness in it

Meni Hillel

unread,
Jul 1, 2016, 12:04:45 PM7/1/16
to H2 Google Group
I am using embedded file. There are no clients and servers. Only one jar is loaded.

Noel Grandin

unread,
Jul 2, 2016, 7:05:03 AM7/2/16
to h2-da...@googlegroups.com

>Error: Constraint "UK_1PT73622HFCLVE5LRHRQTITBK" not found; SQL statement:
>alter table subscription drop constraint UK_1pt73622hfclve5lrhrqtitbk [90057-187]

the -187 here

> ALTER TABLE SUBSCRIPTION DROP CONSTRAINT UK_1PT73622HFCLVE5LRHRQTITBK_INDEX_9 [90057-191]

and the -191 here

say that you have two different versions of H2 somehow showing up.

Meni Hillel

unread,
Jul 2, 2016, 3:40:35 PM7/2/16
to H2 Google Group
I get the confusion now.... Apologies. One log was produced from my app, which used 191. The other log was produced using interactive SQL program (SQuirreL SQL Client) which happens to use 187. Both obviously experienced the same issue, suggesting this issue exist in both versions.

--

Thomas Mueller Graf

unread,
Jul 20, 2016, 11:32:59 AM7/20/16
to h2-da...@googlegroups.com
Hi,

We would need a simple, reproducible test case.

Regards,
Thomas
You received this message because you are subscribed to the Google Groups "H2 Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to h2-database...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages