[RESOLVED] Weird errors while building Example-Java-Widget with SDK 6

Hello,

I’m facing issues while trying to run the new Example-Java-Widget in SDK 6.
(GitHub - MicroEJ/Example-Java-Widget at 8.0.0)

I got the following error at the end of Gradle build task:

$ gradle build

> Task :test

UnknownClass.com.microej.demo.widget.test.ScrollTest FAILED
    java.lang.AssertionError at MicroejTestEngine.java:246

1 test completed, 1 failed

> Task :test FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':test'.
> There were failing tests. See the report at: file:///home/user/Example-Java-Widget/build/reports/tests/test/index.html

* Try:
> Run with --scan to get full insights.

BUILD FAILED in 51s
13 actionable tasks: 13 executed

My Gradle environment is

$ gradle -v

Welcome to Gradle 8.3!

Here are the highlights of this release:
 - Faster Java compilation
 - Reduced memory usage
 - Support for running on Java 20

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


------------------------------------------------------------
Gradle 8.3
------------------------------------------------------------

Build time:   2023-08-17 07:06:47 UTC
Revision:     8afbf24b469158b714b36e84c6f4d4976c86fcd5

Kotlin:       1.9.0
Groovy:       3.0.17
Ant:          Apache Ant(TM) version 1.10.13 compiled on January 4 2023
JVM:          11.0.23 (Ubuntu 11.0.23+9-post-Ubuntu-1ubuntu122.04.1)
OS:           Linux 5.15.146.1-microsoft-standard-WSL2 amd64

As it seemed to be related to test, after that I also tried to run on simulator.
But I got a other error:


$ gradle runOnSimulator
=============== [ Initialization Stage ] ===============
=============== [ Converting fonts ] ===============
1 : ERROR
        [M0] - Internal limits reached (-1).
The following error occurred while executing this line:
/home/user/Example-Java-Widget/build/vee/scripts/init-microui-fontgen/fontgeninit.xml:269: Terminated with errors
> Task :runOnSimulator FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':runOnSimulator'.
> Java returned: 1

* 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 5s
6 actionable tasks: 2 executed, 4 up-to-date

Anyone has an idea on what could happen ?

Thanks in advance for your help,

Best Regards,

Lucas

Update:

I changed my JVM in WSL from the default one to Eclipse Temurin and now everything goes well.

$ java -version
openjdk version "11.0.22" 2024-01-16
OpenJDK Runtime Environment Temurin-11.0.22+7 (build 11.0.22+7)
OpenJDK 64-Bit Server VM Temurin-11.0.22+7 (build 11.0.22+7, mixed mode)
friviere@MAUDEZ-FRI:~/Projects/HILServer/Example-Java-Widget$ gradle -v

------------------------------------------------------------
Gradle 8.3
------------------------------------------------------------

Build time:   2023-08-17 07:06:47 UTC
Revision:     8afbf24b469158b714b36e84c6f4d4976c86fcd5

Kotlin:       1.9.0
Groovy:       3.0.17
Ant:          Apache Ant(TM) version 1.10.13 compiled on January 4 2023
JVM:          11.0.22 (Eclipse Adoptium 11.0.22+7)
OS:           Linux 5.15.146.1-microsoft-standard-WSL2 amd64

Seems that SDK 6 is not compatible with the default OpenJDK version provided as Ubuntu 22.04 package.

Lucas