Details
-
Fix
-
Status: Released (View Workflow)
-
Minor
-
Resolution: Fixed
-
None
-
None
-
None
Description
Current Situation
- Currently JS7 JOC ships with Hibernate version 5.6.5.Final. This version does not reflect changes in H2s Identity function.
- The issue is raised with the H2 change https://github.com/h2database/h2database/issues/3333
- The Hibernate issue is available from: https://hibernate.atlassian.net/browse/HHH-15561
Desired Behavior
JS7 JOC Cockpit should ship with Hibernate version 5.6.15.Final which resolves the issue.
Workaround
Use H2 JDBC Driver verson 1.4.200
Compatibility
H2 Databases that have created with JDBC Driver 1.4.200 are not compatible with the H2 driver version 2.x.x
Notes for use with H2 Database
When using H2 JDBC Driver version 2.x.x
Add the option MODE=LEGACY to the hibernate.connection.url that is specified in the jetty_base/resources/joc/hibernate.cfg.xml
<property name="hibernate.connection.url">jdbc:h2:./resources/joc/h2/joc;MODE=LEGACY</property>
When using a jdbc driver with the version 1.4.200
- Please open the .jocrc file
- There add JAVA_OPTIONS
- Please add then option --add-opens=java.base/sun.reflect.annotation=ALL-UNNAMED
For example
JAVA_OPTIONS="--add-opens=java.base/sun.reflect.annotation=ALL-UNNAMED -Xms128m Xms128m -Xmx512m -Xss4000k ${JAVA_OPTIONS}"
test -z "$JAVA" && test -f "/usr/lib/jvm/jdk-17-oracle-x64/bin/java" && JAVA="/usr/lib/jvm/jdk-17-oracle-x64/bin/java"