You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
8000
Make Keycloak Model Map JPA module JDK 17 ready #9993
I built Keycloak using OpenJDK 17.0.2 and maven 3.8.4 (using mvn clean install -DskipTests -Pdistribution on latest main). The build failed for module Keycloak Model Map JPA with the following error:
[ERROR] Failed to execute goal org.hibernate.orm.tooling:hibernate-enhance-maven-plugin:5.3.20.Final:enhance (default) on project keycloak-model-map-jpa: Unable to enhance class: JpaRoleMetadata.class: Failed to enhance class org.keycloak.models.map.storage.jpa.role.entity.JpaRoleMetadata: Unsupported class file major version 61 -> [Help 1]
So atm a (not currently planned) update to use JDK17 as default would fail due to the Problem with the enhancer. So the enhancer needs to be updated i guess.
Discussion
No response
Motivation
Have an easy mid-term upgrade path to use more modern java versions.
The Wildfly version in the keycloak pom.xml is pointing to 26.0.1.Final, and that includes already 5.3.24.Final.
If we choose not to do this now, the building.md should be updated that people don't try to build it using OpenJDK17 (as happend in #10613, as this currently states "Ensure you have JDK 8 (or newer)".
There is another issue #8889 that will eventually produce JDK 17 support.
At least one of the following options should be implemented:
update Hibernate from 5.3.20.Final to 5.3.24.Final
update building.md so people know that OpenJDK 17 doesn't work
I would recommend an upgrade to 5.3.24.Final (at least a time-boxed effort; if all tests are green this could then be merged).
Activity
ahus1 commentedon Mar 10, 2022
TL;DR: @hmlnarik / @stianst: please advise if an update to Hibernate 5.3.24.Final is possible
According to this blog post https://in.relation.to/2021/09/14/ready-for-jdk17/ it is sufficient to upgrade hibernate from 5.3.20.Final to 5.3.22.Final.
The Wildfly version in the keycloak pom.xml is pointing to 26.0.1.Final, and that includes already 5.3.24.Final.
If we choose not to do this now, the building.md should be updated that people don't try to build it using OpenJDK17 (as happend in #10613, as this currently states "Ensure you have JDK 8 (or newer)".
There is another issue #8889 that will eventually produce JDK 17 support.
At least one of the following options should be implemented:
I would recommend an upgrade to 5.3.24.Final (at least a time-boxed effort; if all tests are green this could then be merged).
sguilhen commentedon Mar 10, 2022
I think we should go ahead with the upgrade, version 5.3.24 has already been productized internally.
hmlnarik commentedon Mar 14, 2022
+1 for upgrade as long as the Hibernate version matches that of Wildfly
Upgrading Hibernate in line with WildFly 26.0.1.Final to support buil…
andreaTP commentedon Mar 21, 2022
Last time I tried, bumping hibernate core and c3p0 to 5.3.25 solved the issue. Since this bump is on a patch release I would consider it safe.
ahus1 commentedon Mar 22, 2022
@andreaTP - there's already a linked PR that will be ready once I manage to run the full integration test suite for databases on the internal Jenkins.
Upgrading Hibernate in line with WildFly 26.0.1.Final to support buil…