Skip to content
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

gradlew build failing on M1 mac/aarch64 with brew openjdk/gradle #682

Closed
jtippett opened this issue Nov 14, 2023 · 11 comments
Closed

gradlew build failing on M1 mac/aarch64 with brew openjdk/gradle #682

jtippett opened this issue Nov 14, 2023 · 11 comments
Labels

Comments

@jtippett
Copy link

jtippett commented Nov 14, 2023

I followed the instructions to build with the gradle wrapper, with numerous failing tests.

 %  /opt/homebrew/opt/openjdk/bin/java --version
openjdk 21.0.1 2023-10-17
OpenJDK Runtime Environment Homebrew (build 21.0.1)
OpenJDK 64-Bit Server VM Homebrew (build 21.0.1, mixed mode, sharing)

 % JAVA_HOME=/opt/homebrew/opt/openjdk/ ./gradlew build 
Downloading https://services.gradle.org/distributions/gradle-8.4-bin.zip
............10%............20%.............30%............40%.............50%............60%.............70%............80%.............90%............100%

Welcome to Gradle 8.4!

[...] # skipping many many lines

620 tests completed, 444 failed, 51 skipped

> Task :sirix-core:test FAILED

FAILURE: Build failed with an exception.

I can attach the test results if needed but it seems there's a more systemic issue at hand.

Note that I am not an experienced java developer and could very likely be doing something stupid here...

@jtippett
Copy link
Author

Oh.. I have noted that i can specify the ./gradlew build -x test option, which allows the build.

The README should be corrected to:

    cd bundles/sirix-rest-api
    ./../../gradlew build -x test

This does seem to generate a successful build. However, when I try to run it:

 % ls -lah
total 164944
drwxr-xr-x  6 james  staff   192B Nov 14 12:52 .
drwxr-xr-x  8 james  staff   256B Nov 14 12:52 ..
-rw-r--r--  1 james  staff    78M Nov 14 12:52 sirix-rest-api-0.9.7-SNAPSHOT-fat.jar
-rw-r--r--  1 james  staff   261B Nov 14 12:52 sirix-rest-api-0.9.7-SNAPSHOT-javadoc.jar
-rw-r--r--  1 james  staff    48K Nov 14 12:52 sirix-rest-api-0.9.7-SNAPSHOT-sources.jar
-rw-r--r--  1 james  staff   328K Nov 14 12:52 sirix-rest-api-0.9.7-SNAPSHOT.jar

% /opt/homebrew/opt/openjdk/bin/java -jar sirix-rest-api-0.9.7-SNAPSHOT-fat.jar
12:58:06.045 [vert.x-eventloop-thread-0] ERROR i.v.c.i.l.c.VertxIsolatedDeployer - Failed in deploying verticle
io.vertx.core.impl.NoStackTraceThrowable: issuer cannot be null

It fails again with an inscrutable error. Giving up for now 😅

@JohannesLichtenberger
Copy link
Member

I think it's strange, that aarch64 is not supported as of now apparently!?: adoptium/containers#158

@JohannesLichtenberger
Copy link
Member

Also here, but the manifest says the architecture is not supported: https://hub.docker.com/_/eclipse-temurin/tags?page=1&name=21-jdk-alpine

Maybe a Gradle image issue?

@JohannesLichtenberger
Copy link
Member

oh sorry, I messed up with the issue number, as my replies are related to your docker issue...

Can you post what's wrong?

@JohannesLichtenberger
Copy link
Member

Trying to ping @jtippett ... I've removed a dependency, which had a linux specifier, but it may still fail. I sadly have no Mac. Can you give me further details? Would be awesome :-)

@jtippett
Copy link
Author

Hey @JohannesLichtenberger sorry for the late reply. I think this issue, with me manually trying to build the .jar, is probably just caused by my general unfamiliarity with java builds. It's still failing with the error i noted above:

james@black-lagoon sirix-rest-api % /opt/homebrew/opt/openjdk/bin/java -jar ./build/libs/sirix-rest-api-0.9.7-SNAPSHOT-fat.jar    
11:31:09.828 [vert.x-eventloop-thread-0] ERROR i.v.c.i.l.c.VertxIsolatedDeployer - Failed in deploying verticle
io.vertx.core.impl.NoStackTraceThrowable: issuer cannot be null

This could be related to the accompanying keycloak stuff - perhaps they are intermingled such that you can't start one without the other.

Regardless, the "docker compose" build works for me now (thanks!) so not sure if this ticket is relevant anymore...

@JohannesLichtenberger
Copy link
Member

The keycloak server probably doesn't already run!?

This code from Vert.x seems to be the origin:

if (config.getSite() == null) {
 handler.handle(Future.failedFuture("issuer cannot be null"));
 return;

@JohannesLichtenberger
Copy link
Member

Maybe it was starting (as it needs quite some time) -- at least the old versions.

@JohannesLichtenberger
Copy link
Member

@jtippett can you check if it's still an issue?

@JohannesLichtenberger
Copy link
Member

Can anyone test this?

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

No branches or pull requests

2 participants