Skip to content

Keycloak 22.0.1 does not compile #818

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Azerothian opened this issue Jul 24, 2023 · 4 comments
Open

Keycloak 22.0.1 does not compile #818

Azerothian opened this issue Jul 24, 2023 · 4 comments

Comments

@Azerothian
Copy link

Describe the bug
When attempting to compile using keycloak 22.0.1 it fails.

To Reproduce
Steps to reproduce the behavior:

Run the following Dockerfile

FROM alpine as build
ENV KEYCLOAK_VERSION 22.0.1
RUN apk add --no-cache git maven

FROM build as radius-build
RUN git clone https://github.com/vzakharchenko/keycloak-radius-plugin.git && \
    cd keycloak-radius-plugin && \
    git checkout -b v1.4.11-21.0.0 && \
    cd ./keycloak-plugins && \
    sed -i "s/<keycloak.version>[0-9]\+\(\.[0-9]\+\)*<\/keycloak.version>/<keycloak.version>${KEYCLOAK_VERSION}<\/keycloak.version>/g" pom.xml && \
    mvn clean package -DskipTests

Fyi i skip the tests as JDK 17 does not support the style of variable injection the tests require to complete.

similar issue - kotest/kotest#3035

[WARNING] 
[WARNING] Plugin validation issues were detected in 7 plugin(s)
[WARNING] 
[WARNING]  * org.apache.maven.plugins:maven-source-plugin:3.2.1
[WARNING]  * org.apache.maven.plugins:maven-assembly-plugin:3.5.0
[WARNING]  * org.codehaus.mojo:templating-maven-plugin:1.0.0
[WARNING]  * pl.project13.maven:git-commit-id-plugin:4.9.10
[WARNING]  * org.jacoco:jacoco-maven-plugin:0.8.8
[WARNING]  * org.apache.maven.plugins:maven-shade-plugin:3.4.1
[WARNING]  * org.apache.maven.plugins:maven-resources-plugin:3.3.0
[WARNING] 
[WARNING] For more or less details, use 'maven.plugin.validation' property with one of the values (case insensitive): [BRIEF, DEFAULT, VERBOSE]
[WARNING] 
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.11.0:compile (default-compile) on project radius-plugin: Compilation failure: Compilation failure: 
[ERROR] /keycloak-radius-plugin/keycloak-plugins/radius-plugin/src/main/java/com/github/vzakharchenko/radius/password/UpdateRadiusPassword.java:[22,24] package javax.ws.rs.core does not exist
[ERROR] /keycloak-radius-plugin/keycloak-plugins/radius-plugin/src/main/java/com/github/vzakharchenko/radius/password/UpdateRadiusPassword.java:[23,24] package javax.ws.rs.core does not exist
[ERROR] /keycloak-radius-plugin/keycloak-plugins/radius-plugin/src/main/java/com/github/vzakharchenko/radius/radius/handlers/session/KeycloakSessionUtils.java:[12,24] package javax.ws.rs.core does not exist
[ERROR] /keycloak-radius-plugin/keycloak-plugins/radius-plugin/src/main/java/com/github/vzakharchenko/radius/radius/handlers/session/KeycloakSessionUtils.java:[13,24] package javax.ws.rs.core does not exist
[ERROR] /keycloak-radius-plugin/keycloak-plugins/radius-plugin/src/main/java/com/github/vzakharchenko/radius/radius/handlers/session/KeycloakSessionUtils.java:[14,24] package javax.ws.rs.core does not exist
[ERROR] /keycloak-radius-plugin/keycloak-plugins/radius-plugin/src/main/java/com/github/vzakharchenko/radius/password/UpdateRadiusPassword.java:[82,9] cannot find symbol
[ERROR]   symbol:   class Response
[ERROR]   location: class com.github.vzakharchenko.radius.password.UpdateRadiusPassword
[ERROR] /keycloak-radius-plugin/keycloak-plugins/radius-plugin/src/main/java/com/github/vzakharchenko/radius/password/UpdateRadiusPassword.java:[103,9] cannot find symbol
[ERROR]   symbol:   class Response
[ERROR]   location: class com.github.vzakharchenko.radius.password.UpdateRadiusPassword
[ERROR] /keycloak-radius-plugin/keycloak-plugins/radius-plugin/src/main/java/com/github/vzakharchenko/radius/password/UpdateRadiusPassword.java:[139,9] cannot find symbol
[ERROR]   symbol:   class Response
[ERROR]   location: class com.github.vzakharchenko.radius.password.UpdateRadiusPassword
[ERROR] /keycloak-radius-plugin/keycloak-plugins/radius-plugin/src/main/java/com/github/vzakharchenko/radius/password/UpdateRadiusPassword.java:[151,9] cannot find symbol
[ERROR]   symbol:   class MultivaluedMap
[ERROR]   location: class com.github.vzakharchenko.radius.password.UpdateRadiusPassword
[ERROR] /keycloak-radius-plugin/keycloak-plugins/radius-plugin/src/main/java/com/github/vzakharchenko/radius/radius/handlers/session/KeycloakSessionUtils.java:[70,9] cannot find symbol
[ERROR]   symbol:   class MultivaluedMap
[ERROR]   location: class com.github.vzakharchenko.radius.radius.handlers.session.KeycloakSessionUtils
[ERROR] /keycloak-radius-plugin/keycloak-plugins/radius-plugin/src/main/java/com/github/vzakharchenko/radius/radius/handlers/session/KeycloakSessionUtils.java:[70,54] cannot find symbol
[ERROR]   symbol:   class MultivaluedHashMap
[ERROR]   location: class com.github.vzakharchenko.radius.radius.handlers.session.KeycloakSessionUtils
[ERROR] /keycloak-radius-plugin/keycloak-plugins/radius-plugin/src/main/java/com/github/vzakharchenko/radius/radius/handlers/session/KeycloakSessionUtils.java:[71,21] cannot find symbol
[ERROR]   symbol:   variable HttpHeaders
[ERROR]   location: class com.github.vzakharchenko.radius.radius.handlers.session.KeycloakSessionUtils
[ERROR] /keycloak-radius-plugin/keycloak-plugins/radius-plugin/src/main/java/com/github/vzakharchenko/radius/radius/handlers/session/KeycloakSessionUtils.java:[74,30] cannot find symbol
[ERROR]   symbol:   class HttpHeaders
[ERROR]   location: class com.github.vzakharchenko.radius.radius.handlers.session.KeycloakSessionUtils
[ERROR] /keycloak-radius-plugin/keycloak-plugins/radius-plugin/src/main/java/com/github/vzakharchenko/radius/radius/handlers/otp/TotpPassword.java:[28,34] incompatible types: java.lang.String cannot be converted to byte[]
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <args> -rf :radius-plugin
@elkman
Copy link
Contributor

elkman commented Jul 24, 2023

There is a bit more to do for the upgrade to KC22, as they switched to Jakarta and removed some deprecated API calls.

I have started preparing a PR and already have a comping state and running tests:
elkman/keycloak-radius-plugin/tree/feature/upgrade-to-kc22.0.1

You are welcome to test this as I have limited testing capabilities. We only use OTP verification via RADIUS, so I mostly have to rely on the included tests to not break anything.

Since @vzakharchenko doesn't seem to have time (hopefully at best it's just a time problem), I suspect he would appreciate some community support for his project. This of course also helps everyone who wants to use the plugin.

This was referenced Jul 24, 2023
@elkman
Copy link
Contributor

elkman commented Sep 20, 2023

see elkman#33 for further updates and bugfixes

@elkman
Copy link
Contributor

elkman commented Jan 20, 2024

@Azerothian Do you still use this plugin?

@elkman
Copy link
Contributor

elkman commented Feb 12, 2024

you may have a look at https://github.com/elkman/keycloak-radius-plugin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants