Overlay template 6.4 build failed

210 views
Skip to first unread message

Marc Maurice

unread,
Oct 19, 2021, 9:55:15 AM10/19/21
to CAS Community
Hello,

I'm trying to upgrade from cas 6.2 to 6.4.
As explained in the doc I want to start with a clean 6.4 overlay then reapply all my patches.

I cloned a fresh 6.4 overlay branch from the github project.
Openjdk 11 installed:

[root@15871ceb6a09 myclone]# java -version
openjdk version "11.0.12" 2021-07-20 LTS
OpenJDK Runtime Environment 18.9 (build 11.0.12+7-LTS)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.12+7-LTS, mixed mode, sharing)

I'm getting the following error. Tried to run gradle in debug mode, and googling the error with no success.
gradle is not giving me any clue why it doesn't like my java version...

[root@15871ceb6a09 myclone]# ./gradlew clean build
> Task :compileJava FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileJava'.
> error: release version 11 not supported

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.


BUILD FAILED in 4s
6 actionable tasks: 6 executed


King, Robert

unread,
Oct 19, 2021, 9:59:13 AM10/19/21
to cas-...@apereo.org

You need the openjdk development packages.

 

For instance on RHEL7:

 

> yum install java-11-openjdk-devel

 

--
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
---
You received this message because you are subscribed to the Google Groups "CAS Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cas-user+u...@apereo.org.
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/ac396421-ebbb-4f9f-b9c8-58b141c110f0n%40apereo.org.

Marc MAURICE

unread,
Oct 19, 2021, 10:21:57 AM10/19/21
to cas-...@apereo.org

Hello,

Thanks a lot Robert.

I was missing the package. Unfortunately the error is still there.

(also tried with an overlay from initializer : same error)

[root@15871ceb6a09 initializer]# cat /etc/redhat-release
CentOS Linux release 7.5.1804 (Core)

[root@15871ceb6a09 initializer]# rpm -qa| grep openjdk
java-11-openjdk-11.0.12.0.7-0.el7_9.x86_64
java-11-openjdk-headless-11.0.12.0.7-0.el7_9.x86_64
java-11-openjdk-devel-11.0.12.0.7-0.el7_9.x86_64


You received this message because you are subscribed to a topic in the Google Groups "CAS Community" group.
To unsubscribe from this topic, visit https://groups.google.com/a/apereo.org/d/topic/cas-user/HOiMGSumH5c/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cas-user+u...@apereo.org.
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/2330c621312a41cb9bc2ecd304c7e815%40mun.ca.

He Vincent

unread,
Oct 19, 2021, 11:23:38 PM10/19/21
to CAS Community, Marc Maurice
I think any JDK11 is OK. Did you re-download cas 6.4 from GITHUB?

Marc MAURICE

unread,
Oct 20, 2021, 5:04:58 AM10/20/21
to He Vincent, CAS Community

Thanks. Tried to clone again this morning and it was magically working !!!

Why ? It took some time to figure it out.

It was working on my local PC (freshly booted) but not on the preproduction (not rebooted).

The Gradle Daemon !!

After installing the java-11-openjdk-devel it did nothing unless I restarted the Daemon.

pkill -f GradleDaemon


Anyway. Thanks guys.

King, Robert

unread,
Oct 20, 2021, 7:42:30 AM10/20/21
to cas-...@apereo.org

Try “gradlew –stop” to make sure that the gradle build daemon does not stay resident.  Past that I think it might be a different issue then what we ran into locally.

 

And just to confirm, we are running the same openjdk, just on RHEL.

 

cat /etc/redhat-release

Red Hat Enterprise Linux Server release 7.9 (Maipo)

 

rpm -qa | grep openjdk

java-11-openjdk-11.0.12.0.7-0.el7_9.x86_64

java-11-openjdk-devel-11.0.12.0.7-0.el7_9.x86_64

java-11-openjdk-headless-11.0.12.0.7-0.el7_9.x86_64

Marc MAURICE

unread,
Oct 20, 2021, 11:15:20 AM10/20/21
to cas-...@apereo.org, King, Robert

Yes, as said in my last email. It was the gradle daemon.

Thanks a lot.

William Vincent

unread,
Dec 15, 2021, 6:13:04 AM12/15/21
to CAS Community, ro...@mun.ca
Hello
i have docker-compose and i use cas-overlay-template/tree/6.3 .
this error happens when I use 'docker-compose build'.
I will not install openjdk because I am in a container .
I try with 6.4 but it's same result :/
thanks for your help

docker-compose build
redis uses an image, skipping
Building cas
Step 1/20 : FROM adoptopenjdk/openjdk11:alpine-slim AS overlay
 ---> 68d79b94d8b9
Step 2/20 : RUN mkdir -p cas-overlay
 ---> Using cache
 ---> 2fbf67e30ccc
Step 3/20 : COPY ./src cas-overlay/src/
 ---> 492ae4217531
Step 4/20 : COPY ./gradle/ cas-overlay/gradle/
 ---> d44ca8ef2c0e
Step 5/20 : COPY ./gradlew ./settings.gradle ./build.gradle ./gradle.properties /cas-overlay/
 ---> 6c0d5aaa1d06
Step 6/20 : RUN mkdir -p ~/.gradle     && echo "org.gradle.daemon=false" >> ~/.gradle/gradle.properties     && echo "org.gradle.configureondemand=true" >> ~/.gradle/gradle.properties     && cd cas-overlay     && chmod 750 ./gradlew     && ./gradlew --version;
 ---> Running in 17e37e5f3ced
Downloading https://services.gradle.org/distributions/gradle-7.3.1-bin.zip
...........10%...........20%...........30%...........40%...........50%...........60%...........70%...........80%...........90%...........100%

Welcome to Gradle 7.3.1!

Here are the highlights of this release:
 - Easily declare new test suites in Java projects
 - Support for Java 17
 - Support for Scala 3

For more details see https://docs.gradle.org/7.3.1/release-notes.html


------------------------------------------------------------
Gradle 7.3.1
------------------------------------------------------------

Build time:   2021-12-01 15:42:20 UTC
Revision:     2c62cec93e0b15a7d2cd68746f3348796d6d42bd

Kotlin:       1.5.31
Groovy:       3.0.9
Ant:          Apache Ant(TM) version 1.10.11 compiled on July 10 2021
JVM:          11.0.8 (AdoptOpenJDK 11.0.8+10)
OS:           Linux 4.18.0-348.2.1.el8_5.x86_64 amd64

Removing intermediate container 17e37e5f3ced
 ---> f0df1a5519e8
Step 7/20 : RUN cd cas-overlay     && ./gradlew clean build --parallel --no-daemon;
 ---> Running in 89755da20e71
To honour the JVM settings for this build a single-use Daemon process will be forked. See https://docs.gradle.org/7.3.1/userguide/gradle_daemon.html#sec:disabling_the_daemon.
Daemon will be stopped at the end of the build
Configuration on demand is an incubating feature.
> Task :clean
> Task :extractCasBootWarOverlay
> Task :bootBuildInfo
> Task :generateMainEffectiveLombokConfig1
> Task :checkLombokConfig
> Task :compileJava FAILED


Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.


6 actionable tasks: 6 executed

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileJava'.
> error: release version 11 not supported

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 53s
ERROR: Service 'cas' failed to build : The command '/bin/sh -c cd cas-overlay     && ./gradlew clean build --parallel --no-daemon;' returned a non-zero code: 1


Reply all
Reply to author
Forward
0 new messages