Closed StefanSchubert closed 2 years ago
Observed Error in log while trying wit v2:
[EL Warning]: 2022-01-16 10:56:24.977--ServerSession(1226784688)--Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.7.9.v20210604-2c549e2208): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: org.h2.jdbc.JdbcSQLSyntaxErrorException:
Syntax error in SQL statement "CREATE TABLE AQUARIUM (ID BIGINT IDENTITY[*] NOT NULL, ACTIVE BOOLEAN NOT NULL, CREATED_ON TIMESTAMP NOT NULL, DESCRIPTION VARCHAR(255) NOT NULL, INCEPTION_DATE DATE, LASTMOD_ON TIMESTAMP, OPTLOCK INTEGER DEFAULT 0, SIZE INTEGER, SIZE_UNIT VARCHAR(10), USER_ID BIGINT NOT NULL, PRIMARY KEY (ID))"; expected "ARRAY, INVISIBLE, VISIBLE, NOT, NULL, AS, DEFAULT, GENERATED, ON, NOT, NULL, AUTO_INCREMENT, DEFAULT, NULL_TO_DEFAULT, SEQUENCE, SELECTIVITY, COMMENT, CONSTRAINT, COMMENT, PRIMARY, UNIQUE, NOT, NULL, CHECK, REFERENCES, AUTO_INCREMENT, ., )"; SQL statement:
CREATE TABLE aquarium (id BIGINT IDENTITY NOT NULL, active BOOLEAN NOT NULL, created_on TIMESTAMP NOT NULL, description VARCHAR(255) NOT NULL, inception_date DATE, lastmod_on TIMESTAMP, optlock integer DEFAULT 0, size INTEGER, size_unit VARCHAR(10), user_id BIGINT NOT NULL, PRIMARY KEY (id)) [42001-206]
Error Code: 42001
It looks like H2 v2 has a problem with the IDENTITY column (see [*] marker).
Might be resolved with 2.0.210 see: https://groups.google.com/g/h2-database/c/RH06az2F75w
Describe the bug It's not really a bug but a migration effort which is required due to security issues which does not really apply in sabis context, as we are using the h2 only for testing but the dependabot security advices I see as repo owner is just ugyl.
To Reproduce Steps to reproduce the behavior:
Expected behavior Same tests as before should work with the new h2 version