Hi,

I'm using EclipseLink in this project, which implements JPA 2.0
I tried the suggested workaround with:

....(from application springboot properties)

spring.datasource.jpa.url: 
jdbc:h2:mem:test;MODE=LEGACY;DB_CLOSE_ON_EXIT=true;DB_CLOSE_DELAY=-1
spring.jpa.database-platform: org.hibernate.dialect.H2Dialect

This results into:

Internal Exception: org.h2.jdbc.JdbcSQLSyntaxErrorException: Funktion 
"IDENTITY" nicht gefunden
Function "IDENTITY" not found; SQL statement:
CALL IDENTITY() [90022-206]
Error Code: 90022
Call: CALL IDENTITY()
Query: ValueReadQuery(name="SEQ_GEN_IDENTITY" sql="CALL IDENTITY()")

Same result if I try MariaDB10Dialect which is my production database.

Cheers
Stefan



Evgenij Ryazanov schrieb am Sonntag, 16. Januar 2022 um 13:16:57 UTC+1:

> Hello!
>
> What implementation of JPA do you use?
>
> Hibernate ORM 5.x doesn't support H2 2.0.
> Hibernate ORM 6.0 is under development, it already has some fixes and 
> others are on the way.
> There are two possible temporary workarounds:
> 1. You can add ;MODE=LEGACY to JDBC URL of H2 (you need H2 2.0.204 or 
> later version).
> 2. You can override H2Dialect and fix wrong SQL produced by it.
>
> EclipseLink and OpenJPA may have own issues, but I have no information 
> about them. LEGACY mode may also help, however.
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/h2-database/286aeeeb-104a-40b2-bc58-82ff284791b9n%40googlegroups.com.

Reply via email to