Java couchbase lite dependency related docker issue

Hi,

I have a Java Spring Boot application that utilizes the couchbase-lite-java-ee library, version 3.2.0, from the Couchbase Maven repository at https://mobile.maven.couchbase.com/maven2/dev.

The application works perfectly in my IDE, but when I try to run it through Docker on my Windows machine (64-bit operating system, x64-based processor), I encounter the following error:

Caused by: java.lang.UnsatisfiedLinkError: /app/CouchbaseLiteTemp/d6668c3236c311ddaf19c4ffb235254d/libLiteCore.so: libicuuc.so.71: cannot open shared object file: No such file or directory
at java.base/jdk.internal.loader.NativeLibraries.load(Native Method) ~[na:na]
at java.base/jdk.internal.loader.NativeLibraries$NativeLibraryImpl.open(NativeLibraries.java:388) ~[na:na]
at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:232) ~[na:na]

This issue can be resolved by installing the following dependencies during the Docker build process:

RUN apt-get update && apt-get install -y
build-essential
wget
&& rm -rf /var/lib/apt/lists/*

RUN wget https://github.com/unicode-org/icu/releases/download/release-71-1/icu4c-71_1-src.tgz &&
tar -xzf icu4c-71_1-src.tgz &&
cd icu/source &&
./configure &&
make &&
make install &&
cd …/… &&
rm -rf icu4c-71_1-src.tgz icu4c-71_1-src

However, I need to run this application on a server that uses an aarch64 architecture (Mac machine), and when I attempt to do so, I receive the following error:

Caused by: com.couchbase.lite.CouchbaseLiteError: Failed loading native library libLiteCore.so @/app/CouchbaseLiteTemp/d6668c3236c311ddaf19c4ffb235254d/libLiteCore.so (Linux/aarch64)
at com.couchbase.lite.internal.NativeLibrary.loadLibrary(NativeLibrary.java:156) ~[couchbase-lite-java-ee-3.2.0.jar!/:na]

I am unable to find any additional dependencies that need to be installed to resolve this error. Could you please help me fix this issue?

Thank you!

There is no solution here because the Java SDK is not supported for aarch64. Sorry for the unfortunate answer. You will need to run via Rosetta to get x86_64 emulation. Also the documentation for Java on Linux states additional instructions for setting up including offering a support zip that I don’t think you’ve noticed. There is no need to download from the official ICU website.