Build failures on OpenJDK 17
See original GitHub issueDescribe the bug
Trying to build from scratch but running into errors.
Version
main branch (1e1a6779befb9c836069761fb70d86cadd47b4cb)
Expected behavior
Proper build.
Actual behavior
[INFO] 5 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for Keycloak 16.0.0-SNAPSHOT:
[INFO]
[INFO] Keycloak ........................................... SUCCESS [ 6.476 s]
[INFO] Keycloak Common .................................... SUCCESS [ 12.540 s]
[INFO] Keycloak Core ...................................... SUCCESS [ 14.529 s]
[INFO] Keycloak Server SPI ................................ SUCCESS [ 12.179 s]
[INFO] Keycloak Server Private SPI ........................ SUCCESS [ 26.036 s]
[INFO] Keycloak Kerberos Federation ....................... SUCCESS [ 1.685 s]
[INFO] Keycloak LDAP UserStoreProvider .................... SUCCESS [ 6.269 s]
[INFO] Keycloak SAML Core Public API ...................... SUCCESS [ 15.817 s]
[INFO] Keycloak SAML Core ................................. SUCCESS [ 14.082 s]
[INFO] Keycloak REST Services ............................. SUCCESS [01:09 min]
[INFO] Keycloak JS Integration ............................ SUCCESS [ 6.041 s]
[INFO] Keycloak Themes .................................... SUCCESS [12:13 min]
[INFO] Keycloak Model Parent .............................. SUCCESS [ 0.095 s]
[INFO] Keycloak Model JPA ................................. SUCCESS [ 15.056 s]
[INFO] Keycloak Model Java Annotations and Processor ...... SUCCESS [ 1.116 s]
[INFO] Keycloak Model Map ................................. FAILURE [ 4.731 s]
[INFO] Keycloak Model Infinispan .......................... SKIPPED
[INFO] Keycloak Model Hot Rod ............................. SKIPPED
[INFO] Keycloak SSSD Federation ........................... SKIPPED
[INFO] KeyCloak Authz: Parent ............................. SKIPPED
[INFO] KeyCloak AuthZ: Provider Parent .................... SKIPPED
[INFO] KeyCloak AuthZ: Common Policy Providers ............ SKIPPED
[INFO] Keycloak WildFly Integration ....................... SKIPPED
[INFO] Keycloak WildFly Add User Script ................... SKIPPED
[INFO] Keycloak WildFly Extensions ........................ SKIPPED
[INFO] Keycloak WildFly Server Subsystem .................. SKIPPED
[INFO] Keycloak Integration ............................... SKIPPED
[INFO] Keycloak Client CLI ................................ SKIPPED
[INFO] Keycloak Client Registration CLI ................... SKIPPED
[INFO] Keycloak Admin CLI ................................. SKIPPED
[INFO] Keycloak Client CLI Distribution ................... SKIPPED
[INFO] Distribution Parent ................................ SKIPPED
[INFO] Keycloak Distribution Licenses Common .............. SKIPPED
[INFO] Keycloak Distribution Maven Plugins Parent ......... SKIPPED
[INFO] Keycloak Licenses Processor Maven Plugin ........... SKIPPED
[INFO] Feature Pack Builds ................................ SKIPPED
[INFO] Keycloak Feature Pack: Server Dependencies ......... SKIPPED
[INFO] Keycloak Feature Pack: Server ...................... SKIPPED
[INFO] Galleon Feature Pack Builds ........................ SKIPPED
[INFO] Keycloak Galleon Feature Pack: Server .............. SKIPPED
[INFO] Keycloak Server Galleon Based Distribution ......... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 15:45 min
[INFO] Finished at: 2021-11-23T15:07:01+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1-jboss-1:compile (default-compile) on project keycloak-model-map: Compilation failure: Compilation failure:
[ERROR] keycloak/model/map/src/main/java/org/keycloak/models/map/storage/chm/ConcurrentHashMapStorageProviderFactory.java:[105,57] incompatible types: invalid constructor reference
[ERROR] constructor MapClientEntityImpl in class org.keycloak.models.map.client.MapClientEntityImpl cannot be applied to given types
[ERROR] required: no arguments
[ERROR] found: org.keycloak.models.map.common.DeepCloner
[ERROR] reason: actual and formal argument lists differ in length
[ERROR] keycloak/model/map/target/generated-sources/annotations/org/keycloak/models/map/client/MapClientEntityImpl.java:[5,8] org.keycloak.models.map.client.MapClientEntityImpl is not abstract and does not override abstract method setSurrogateAuthRequired(java.lang.Boolean) in org.keycloak.models.map.client.MapClientEntity
[ERROR] keycloak/model/map/target/generated-sources/annotations/org/keycloak/models/map/client/MapClientEntityImpl.java:[11,9] incompatible types: missing return value
[ERROR] keycloak/model/map/target/generated-sources/annotations/org/keycloak/models/map/client/MapProtocolMapperEntityImpl.java:[5,8] org.keycloak.models.map.client.MapProtocolMapperEntityImpl is not abstract and does not override abstract method setConfig(java.util.Map<java.lang.String,java.lang.String>) in org.keycloak.models.map.client.MapProtocolMapperEntity
[ERROR] keycloak/model/map/target/generated-sources/annotations/org/keycloak/models/map/client/MapProtocolMapperEntityImpl.java:[11,9] incompatible types: missing return value
[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 :keycloak-model-map
How to Reproduce?
git clone https://github.com/keycloak/keycloak.git
mvn -Pdistribution -pl distribution/server-dist -am -Dmaven.test.skip clean install
Anything else?
Microsoft Windows [Version 10.0.18363.1854]
(c) 2019 Microsoft Corporation. Alle Rechte vorbehalten.
>java -version
java version "17.0.1" 2021-10-19 LTS
Java(TM) SE Runtime Environment (build 17.0.1+12-LTS-39)
Java HotSpot(TM) 64-Bit Server VM (build 17.0.1+12-LTS-39, mixed mode, sharing)
>mvn -version
Apache Maven 3.8.4 (9b656c72d54e5bacbed989b64718c159fe39b537)
Maven home: C:\Program Files (x86)\apache-maven-3.8.4
Java version: 17.0.1, vendor: Oracle Corporation, runtime: C:\Program Files\Java\jdk-17.0.1
Default locale: de_DE, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
Issue Analytics
- State:
- Created 2 years ago
- Reactions:5
- Comments:14 (8 by maintainers)
Top Results From Across the Web
Fails build on Microsoft-openjdk@17 · Issue #7338 - GitHub
Building a brand new .NET 6 Xamarin app with Microsoft OpenJDK 17 fails. I'm using Rider as my IDE and I already have...
Read more >2051192 – openas2 fails to build with java-17-openjdk
Usually the fix is simple, and best is to update the package to latest upstream version. There will be usual mass rebuild once...
Read more >[Bug 2051150] New: google-gson fails to build with java-17 ...
https://bugzilla.redhat.com/show_bug.cgi?id=2051150 Bug ID: 2051150 Summary: google-gson fails to build with java-17-openjdk Product: Fedora ...
Read more >581165 – Maven build fails locally with dead-code errors if ...
Summary: Maven build fails locally with dead-code errors if using openjdk 17 instead o... Status: NEW.
Read more >JDK 17 Release Notes, Important Changes, and Information
The Kinds of Compatibility page on the OpenJDK wiki identifies the following three types of potential compatibility issues for Java programs that might...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@tsaarni Thanks! Created separate issues for the problems you mentioned: https://github.com/keycloak/keycloak/issues/13960 https://github.com/keycloak/keycloak/issues/13961 I’ve merged the first PR. Second PR looks good, but pending anopther review
I had two compilation problems when trying build with JDK17 which I attempt to address with PRs #13619 and #13621.