sirixdb / sirix

SirixDB is an an embeddable, bitemporal, append-only database system and event store, storing immutable lightweight snapshots. It keeps the full history of each resource. Every commit stores a space-efficient snapshot through structural sharing. It is log-structured and never overwrites data. SirixDB uses a novel page-level versioning approach.
https://sirix.io
BSD 3-Clause "New" or "Revised" License
1.11k stars 250 forks source link

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

Closed jtippett closed 9 months ago

jtippett commented 10 months ago

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 commented 10 months ago

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 commented 10 months ago

I think it's strange, that aarch64 is not supported as of now apparently!?: https://github.com/adoptium/containers/issues/158

JohannesLichtenberger commented 10 months ago

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 commented 10 months ago

We're using this image: https://github.com/keeganwitt/docker-gradle/blob/794a4de1cca03ce9908c478f94487fdaaab10b03/jdk21-alpine/Dockerfile

JohannesLichtenberger commented 10 months ago

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 commented 10 months ago

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 commented 10 months ago

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 commented 10 months ago

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 commented 10 months ago

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

JohannesLichtenberger commented 9 months ago

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

JohannesLichtenberger commented 9 months ago

Can anyone test this?