8000 Make Keycloak Model Map JPA module JDK 17 ready · Issue #9993 · keycloak/keycloak · GitHub
[go: up one dir, main page]

Skip to content
8000

Make Keycloak Model Map JPA module JDK 17 ready #9993

Closed

Description

@DGuhr

Description

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.

Details

No response

Activity

  1. added
    kind/enhancementCategorizes a PR related to an enhancement
    area/storageStorage layer — JPA entities, database schemas, Liquibase migrations, caching
    on Feb 4, 2022
  2. moved this to Todo in Storageon Feb 4, 2022
  3. self-assigned this
    on Mar 10, 2022
  4. ahus1 commented on Mar 10, 2022

    @ahus1
    Member

    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:

    • 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).

  5. sguilhen commented on Mar 10, 2022

    @sguilhen
    Contributor

    I think we should go ahead with the upgrade, version 5.3.24 has already been productized internally.

  6. hmlnarik commented on Mar 14, 2022

    @hmlnarik
    Contributor

    +1 for upgrade as long as the Hibernate version matches that of Wildfly

  7. added a commit that references this issue on Mar 17, 2022
    2a7984c
  8. andreaTP commented on Mar 21, 2022

    @andreaTP
    Contributor

    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.

  9. ahus1 commented on Mar 22, 2022

    @ahus1
    Member

    @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.

  10. Repository owner moved this from Todo to Done in Storageon Mar 25, 2022
  11. added a commit that references this issue on Mar 25, 2022
    6a657e6
  12. added this to the 18.0.0 milestone on Mar 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area/storageStorage layer — JPA entities, database schemas, Liquibase migrations, cachingkind/enhancementCategorizes a PR related to an enhancement

Type

No type

Fields

No fields configured for issues without a type.

Projects

  • Status
    ✅ Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

0