Error linking JNA library on AdoptOpenJDK on MacOS

主宰稳场 提交于 2019-12-23 10:43:23

问题


I am trying to run some JUnit tests over cassandra. But I get the following error:

[08/12/19 10:48:40:411](main)([]) INFO  - c.h.c.c.e.EmbeddedCassandra - Starting embedded Cassandra server.
8/12/19 10:48:41:497](main)([]) ERROR - o.a.c.u.NativeLibraryDarwin - Failed to link the C library against JNA. Native methods will be unavailable.
java.lang.UnsatisfiedLinkError: /private/var/folders/ty/wl4gxf352m328101m101hwh40000gn/T/jna--321969061/jna10641195286884112036.tmp: dlopen(/private/var/folders/ty/wl4gxf352m328101m101hwh40000gn/T/jna--321969061/jna10641195286884112036.tmp, 1): no suitable image found.  Did find:
    /private/var/folders/ty/wl4gxf352m328101m101hwh40000gn/T/jna--321969061/jna10641195286884112036.tmp: code signature in (/private/var/folders/ty/wl4gxf352m328101m101hwh40000gn/T/jna--321969061/jna10641195286884112036.tmp) not valid for use in process using Library Validation: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed.

It was running well until I changed to mac mojave and re-setup everything. I think it is an issue related to permissions may be or JNA?

IDE: IntelliJ Java: AdoptOpenJDK 11.0.4 JNA: 4.2.2

Any kind of help will be highly appreciated!


回答1:


This is the result of a bug in AdoptOpenJDK jdk-11.0.4+11 on macOS, persisting through 11.2.

It will be fixed in the jdk-11.0.4+11.3 release.

If you can't wait for the new release you can temporarily resolve by downgrading to 11.0.3+7




回答2:


What version of cassandra unit? Support for java 11 (https://issues.apache.org/jira/browse/CASSANDRA-9608) isn't in until cassandra 4 and I dont think embedded cassandra is setup for that yet



来源:https://stackoverflow.com/questions/57466449/error-linking-jna-library-on-adoptopenjdk-on-macos

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!