[keycloak-dev] Keycloak JDK support: JDK11 build fails; JDK11 runtime & JDK8 build/runtime all ok?
Hynek Mlnarik
hmlnarik at redhat.com
Fri Sep 13 04:15:33 EDT 2019
Thank you for reporting this here as well as in JIRA [1]. We'll have a look
at the issues.
--Hynek
[1] https://issues.jboss.org/browse/KEYCLOAK-11185
On Sun, Sep 8, 2019 at 9:24 PM PGNet Dev <pgnet.dev at gmail.com> wrote:
> This
>
> Building from source
> https://github.com/keycloak/keycloak/blob/master/docs/building.md
>
> states
>
> "Ensure you have JDK 8 (or newer), Maven 3.1.1 (or newer) and Git
> installed"
>
> suggesting build with jdk11 should work.
>
> starting with clean KC v7 source,
>
> git checkout 7.0.0
> git log | head
> commit e6a274ea0e31c6572e795f3372f006c88122539b
> Author: Stian Thorgersen <stianst at gmail.com>
> Date: Fri Aug 23 14:07:35 2019 +0200
>
> Update release.sh
>
> commit 7bf81b0458fcf39143b3cbef59963daf093079fb
> Author: Stian Thorgersen <stianst at gmail.com>
> Date: Fri Aug 23 14:01:03 2019 +0200
>
> Building with each JDK, both v8 & v11
>
> (1) BUILD WITH JDK8
>
> java -version
> openjdk version "1.8.0_222"
> OpenJDK Runtime Environment (IcedTea 3.13.0) (build
> 1.8.0_222-b10 suse-lp151.333.1-x86_64)
> OpenJDK 64-Bit Server VM (build 25.222-b10, mixed mode)
>
> mvn -version
> Apache Maven 3.6.1
> (d66c9c0b3152b2e69ee9bac180bb8fcc8e6af555; 2019-04-04T12:00:29-07:00)
> Maven home: /usr/share/java/maven
> Java version: 1.8.0_222, vendor: IcedTea, runtime:
> /usr/lib64/jvm/java-1.8.0-openjdk-1.8.0/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "5.2.13-24.gacd8e88-default",
> arch: "amd64", family: "unix"
>
> mvn \
> --errors \
> --update-snapshots \
> --activate-profiles distribution \
> --projects
> distribution/server-dist,distribution/adapters/wildfly-adapter \
> --also-make \
> -Dmaven.test.skip=true \
> clean \
> install
>
> ==> SUCCEEDS
>
> ...
> [INFO]
> ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 01:56 min
> [INFO] Finished at: 2019-09-08T12:05:22-07:00
> [INFO]
> ------------------------------------------------------------------------
>
> & the build *execs* OK under BOTH jre v8 & v11 runtimes.
>
>
> (2) BUILD WITH JDK11
>
> java -version
> openjdk version "11.0.4" 2019-07-16
> OpenJDK Runtime Environment (build
> 11.0.4+11-suse-lp151.131.1-x8664)
> OpenJDK 64-Bit Server VM (build
> 11.0.4+11-suse-lp151.131.1-x8664, mixed mode)
>
> mvn -version
> Apache Maven 3.6.1
> (d66c9c0b3152b2e69ee9bac180bb8fcc8e6af555; 2019-04-04T12:00:29-07:00)
> Maven home: /usr/share/java/maven
> Java version: 11.0.4, vendor: Oracle Corporation, runtime:
> /usr/lib64/jvm/java-11-openjdk-11
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "5.2.13-24.gacd8e88-default",
> arch: "amd64", family: "unix"
>
> mvn -X \
> --errors \
> --update-snapshots \
> --activate-profiles distribution \
> --projects
> distribution/server-dist,distribution/adapters/wildfly-adapter \
> --also-make \
> -Dmaven.test.skip=true \
> clean \
> install
>
> ==> FAILs
>
> ...
> [INFO] 50 warnings
> [INFO]
> -------------------------------------------------------------
> [INFO]
> -------------------------------------------------------------
> [ERROR] COMPILATION ERROR :
> [INFO]
> -------------------------------------------------------------
> [ERROR]
> /home/dev/keycloak/saml-core/src/main/java/org/keycloak/saml/processing/api/util/KeyInfoTools.java:[51,70]
> incompatible types: java.util.List<javax.xml.crypto.XMLStructure> cannot be
> converted to java.lang.Iterable<java.lang.Object>
> [ERROR]
> /home/dev/keycloak/saml-core/src/main/java/org/keycloak/saml/processing/api/util/KeyInfoTools.java:[55,70]
> incompatible types: java.util.List<javax.xml.crypto.XMLStructure> cannot be
> converted to java.lang.Iterable<java.lang.Object>
> [ERROR]
> /home/dev/keycloak/saml-core/src/main/java/org/keycloak/saml/processing/api/util/KeyInfoTools.java:[60,58]
> incompatible types: java.util.List<capture#1 of ?> cannot be converted to
> java.lang.Iterable<java.lang.Object>
> [ERROR]
> /home/dev/keycloak/saml-core/src/main/java/org/keycloak/saml/processing/core/util/XMLSignatureUtil.java:[757,42]
> incompatible types: java.util.List<java.lang.Object> cannot be converted to
> java.util.List<? extends javax.xml.crypto.XMLStructure>
> [INFO] 4 errors
> [INFO]
> -------------------------------------------------------------
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Reactor Summary for Keycloak 7.0.0:
> [INFO]
> [INFO] Keycloak ...........................................
> SUCCESS [ 1.321 s]
> [INFO] Keycloak Common ....................................
> SUCCESS [ 4.921 s]
> [INFO] Keycloak Core ......................................
> SUCCESS [ 2.599 s]
> [INFO] Keycloak Server SPI ................................
> SUCCESS [ 1.960 s]
> [INFO] Keycloak Server Private SPI ........................
> SUCCESS [ 3.378 s]
> [INFO] Keycloak Kerberos Federation .......................
> SUCCESS [ 0.567 s]
> [INFO] Keycloak LDAP UserStoreProvider ....................
> SUCCESS [ 1.368 s]
> [INFO] Keycloak SAML Core Public API ......................
> SUCCESS [ 1.267 s]
> [INFO] Keycloak SAML Core .................................
> FAILURE [ 1.537 s]
> [INFO] Keycloak REST Services ............................. SKIPPED
> [INFO] Keycloak JS Integration ............................ SKIPPED
> [INFO] Keycloak Themes .................................... SKIPPED
> [INFO] Keycloak Model Parent .............................. SKIPPED
> [INFO] Keycloak Model JPA ................................. SKIPPED
> [INFO] Keycloak Model Infinispan .......................... 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 AuthZ: Drools Policy Provider ............. 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] Keycloak Adapter SPI ............................... SKIPPED
> [INFO] Keycloak Undertow Integration SPI .................. SKIPPED
> [INFO] Common JBoss/Wildfly Core Classes .................. SKIPPED
> [INFO] KeyCloak Authz: Client API ......................... SKIPPED
> [INFO] Keycloak Adapter Core .............................. SKIPPED
> [INFO] Keycloak Undertow Integration ...................... SKIPPED
> [INFO] Keycloak Servlet OAuth Client ...................... SKIPPED
> [INFO] Keycloak Wildfly Integration ....................... SKIPPED
> [INFO] Keycloak Wildfly Elytron OIDC Adapter .............. SKIPPED
> [INFO] Keycloak Wildfly Adapter Subsystem ................. 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: Adapter ..................... SKIPPED
> [INFO] Adapters Distribution Parent ....................... SKIPPED
> [INFO] Keycloak Adapter Overlay Distribution .............. SKIPPED
> [INFO] Keycloak Feature Pack: Server ...................... SKIPPED
> [INFO] Keycloak Server Distribution ....................... SKIPPED
> [INFO]
> ------------------------------------------------------------------------
> [INFO] BUILD FAILURE
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 24.322 s
> [INFO] Finished at: 2019-09-08T12:10:17-07:00
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] Failed to execute goal
> org.apache.maven.plugins:maven-compiler-plugin:3.8.0-jboss-2:compile
> (default-compile) on project keycloak-saml-core: Compilation failure:
> Compilation failure:
> [ERROR]
> /home/dev/keycloak/saml-core/src/main/java/org/keycloak/saml/processing/api/util/KeyInfoTools.java:[51,70]
> incompatible types: java.util.List<javax.xml.crypto.XMLStructure> cannot be
> converted to java.lang.Iterable<java.lang.Object>
> [ERROR]
> /home/dev/keycloak/saml-core/src/main/java/org/keycloak/saml/processing/api/util/KeyInfoTools.java:[55,70]
> incompatible types: java.util.List<javax.xml.crypto.XMLStructure> cannot be
> converted to java.lang.Iterable<java.lang.Object>
> [ERROR]
> /home/dev/keycloak/saml-core/src/main/java/org/keycloak/saml/processing/api/util/KeyInfoTools.java:[60,58]
> incompatible types: java.util.List<capture#1 of ?> cannot be converted to
> java.lang.Iterable<java.lang.Object>
> [ERROR]
> /home/dev/keycloak/saml-core/src/main/java/org/keycloak/saml/processing/core/util/XMLSignatureUtil.java:[757,42]
> incompatible types: java.util.List<java.lang.Object> cannot be converted to
> java.util.List<? extends javax.xml.crypto.XMLStructure>
> [ERROR] -> [Help 1]
> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to
> execute goal
> org.apache.maven.plugins:maven-compiler-plugin:3.8.0-jboss-2:compile
> (default-compile) on project keycloak-saml-core: Compilation failure
> at org.apache.maven.lifecycle.internal.MojoExecutor.execute
> (MojoExecutor.java:215)
> at org.apache.maven.lifecycle.internal.MojoExecutor.execute
> (MojoExecutor.java:156)
> at org.apache.maven.lifecycle.internal.MojoExecutor.execute
> (MojoExecutor.java:148)
> at
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject
> (LifecycleModuleBuilder.java:117)
> at
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject
> (LifecycleModuleBuilder.java:81)
> at
> org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build
> (SingleThreadedBuilder.java:56)
> at
> org.apache.maven.lifecycle.internal.LifecycleStarter.execute
> (LifecycleStarter.java:128)
> at org.apache.maven.DefaultMaven.doExecute
> (DefaultMaven.java:305)
> at org.apache.maven.DefaultMaven.doExecute
> (DefaultMaven.java:192)
> at org.apache.maven.DefaultMaven.execute
> (DefaultMaven.java:105)
> at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
> at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
> at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
> at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0
> (Native Method)
> at jdk.internal.reflect.NativeMethodAccessorImpl.invoke
> (NativeMethodAccessorImpl.java:62)
> at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke
> (DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke (Method.java:566)
> at
> org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced
> (Launcher.java:282)
> at org.codehaus.plexus.classworlds.launcher.Launcher.launch
> (Launcher.java:225)
> at
> org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode
> (Launcher.java:406)
> at org.codehaus.plexus.classworlds.launcher.Launcher.main
> (Launcher.java:347)
> Caused by:
> org.apache.maven.plugin.compiler.CompilationFailureException: Compilation
> failure
> at
> org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute
> (AbstractCompilerMojo.java:1215)
> at org.apache.maven.plugin.compiler.CompilerMojo.execute
> (CompilerMojo.java:196)
> at
> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo
> (DefaultBuildPluginManager.java:137)
> at org.apache.maven.lifecycle.internal.MojoExecutor.execute
> (MojoExecutor.java:210)
> at org.apache.maven.lifecycle.internal.MojoExecutor.execute
> (MojoExecutor.java:156)
> at org.apache.maven.lifecycle.internal.MojoExecutor.execute
> (MojoExecutor.java:148)
> at
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject
> (LifecycleModuleBuilder.java:117)
> at
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject
> (LifecycleModuleBuilder.java:81)
> at
> org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build
> (SingleThreadedBuilder.java:56)
> at
> org.apache.maven.lifecycle.internal.LifecycleStarter.execute
> (LifecycleStarter.java:128)
> at org.apache.maven.DefaultMaven.doExecute
> (DefaultMaven.java:305)
> at org.apache.maven.DefaultMaven.doExecute
> (DefaultMaven.java:192)
> at org.apache.maven.DefaultMaven.execute
> (DefaultMaven.java:105)
> at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
> at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
> at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
> at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0
> (Native Method)
> at jdk.internal.reflect.NativeMethodAccessorImpl.invoke
> (NativeMethodAccessorImpl.java:62)
> at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke
> (DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke (Method.java:566)
> at
> org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced
> (Launcher.java:282)
> at org.codehaus.plexus.classworlds.launcher.Launcher.launch
> (Launcher.java:225)
> at
> org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode
> (Launcher.java:406)
> at org.codehaus.plexus.classworlds.launcher.Launcher.main
> (Launcher.java:347)
> [ERROR]
> [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 <goals> -rf :keycloak-saml-core
>
> Is Keycloak known/intended to be JDK11 build-ready? or just @runtime?
> _______________________________________________
> keycloak-dev mailing list
> keycloak-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-dev
>
More information about the keycloak-dev
mailing list