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

Caused by: java.lang.ExceptionInInitializerError: Exception java.lang.UnsatisfiedLinkError: no jniavutil in java.library.path: /usr/java/packages/lib:/usr/lib64:/lib64:/lib:/usr/lib #72

Closed
kiiiooo opened this issue Nov 7, 2024 · 1 comment

Comments

@kiiiooo
Copy link

kiiiooo commented Nov 7, 2024

Hi, I use javacpp:1.5.10 and ffmpeg-platform:6.1.1-1.5.10 in my Spring Boot project. When I run the application in my local computer, it works fine. However in the docker container , the UnsatisfiedLinkError was thrown. I confirm that my jar file contains dependencies of all platform, but javacpp seems not found them and load them correctlly.

the build.gradle.kts file:

    // ffmpeg
    implementation("org.bytedeco:javacpp:1.5.10")
    implementation("org.bytedeco:ffmpeg-platform:6.1.1-1.5.10")

packaged jar file:

image

the full error stack:

Caused by: java.lang.ExceptionInInitializerError: Exception java.lang.UnsatisfiedLinkError: no jniavutil in java.library.path: /usr/java/packages/lib:/usr/lib64:/lib64:/lib:/usr/lib [in thread "pool-6-thread-6"]
        at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2434)
        at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:818)
        at java.base/java.lang.System.loadLibrary(System.java:2006)
        at org.bytedeco.javacpp.Loader.loadLibrary(Loader.java:1832)
        at org.bytedeco.javacpp.Loader.load(Loader.java:1423)
        at org.bytedeco.javacpp.Loader.load(Loader.java:1234)
        at org.bytedeco.javacpp.Loader.load(Loader.java:1210)
        at org.bytedeco.ffmpeg.global.avutil.<clinit>(avutil.java:14)
        at java.base/java.lang.Class.forName0(Native Method)
        at java.base/java.lang.Class.forName(Class.java:467)
        at org.bytedeco.javacpp.Loader.load(Loader.java:1289)
        at org.bytedeco.javacpp.Loader.load(Loader.java:1234)
        at org.bytedeco.javacpp.Loader.load(Loader.java:1210)
        at org.bytedeco.ffmpeg.avformat.AVFormatContext.<clinit>(AVFormatContext.java:36)
        ... 7 common frames omitted

@saudet
Copy link
Member

saudet commented Nov 7, 2024

Duplicate of bytedeco/javacpp-presets#1379

@saudet saudet marked this as a duplicate of bytedeco/javacpp-presets#1379 Nov 7, 2024
@saudet saudet closed this as completed Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants