Details
-
Fix
-
Status: Released (View Workflow)
-
Minor
-
Resolution: Fixed
-
None
-
None
-
None
Description
Current Situation
- Currently JS7 JOC Cockpit 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 version 1.4.200
Compatibility
- H2 databases created by JDBC Driver version 1.4.200 are not compatible with use of JDBC Driver version 2.x.x
Notes for use with H2
- When using H2 JDBC Driver version 2.x.x
- add the option MODE=LEGACY to the hibernate.connection.url setting that is specified with the jetty_base/resources/joc/hibernate.cfg.xml file:
<property name="hibernate.connection.url">jdbc:h2:./resources/joc/h2/joc;MODE=LEGACY</property>
- add the option MODE=LEGACY to the hibernate.connection.url setting that is specified with the jetty_base/resources/joc/hibernate.cfg.xml file:
- Apply the following compatibility setting:
- open the $HOME/.jocrc file
- add the JAVA_OPTIONS environment variable using the value
--add-opens=java.base/sun.reflect.annotation=ALL-UNNAMED
- 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"