EOSIO / eosio-java

EOSIO SDK for Java - API for integrating with EOSIO-based blockchains
https://eosio.github.io/eosio-java/
MIT License
127 stars 44 forks source link

UnsatisfiedLinkError in eosio-java 1.0.0 #135

Closed ifunsu closed 3 years ago

ifunsu commented 3 years ago

Hi, I use eosio-java 1.0.0 and throw exception below, how to solve it? Running in spring tool suite 4.11.1 with Ubuntu 20.04, openjdk 16.0.1 . Thanks a lot.

java.lang.UnsatisfiedLinkError: /tmp/libeosiojavaabieos8499425193284831356.lib: /tmp/libeosiojavaabieos8499425193284831356.lib: Invalid ELF Header at java.base/jdk.internal.loader.NativeLibraries.load(Native Method) ~[na:na] at java.base/jdk.internal.loader.NativeLibraries$NativeLibraryImpl.open(NativeLibraries.java:383) ~[na:na] at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:227) ~[na:na] at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:169) ~[na:na] at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2383) ~[na:na] at java.base/java.lang.Runtime.load0(Runtime.java:746) ~[na:na] at java.base/java.lang.System.load(System.java:1857) ~[na:na] at one.block.eosiojavaabieosserializationprovider.EmbeddedLibraryTools.loadEmbeddedLibrary(EmbeddedLibraryTools.java:57) ~[eosio-java-abieos-serialization-provider-1.0.0.jar:na] at one.block.eosiojavaabieosserializationprovider.EmbeddedLibraryTools.(EmbeddedLibraryTools.java:17) ~[eosio-java-abieos-serialization-provider-1.0.0.jar:na] at one.block.eosiojavaabieosserializationprovider.AbiEosSerializationProviderImpl.(AbiEosSerializationProviderImpl.java:25) ~[eosio-java-abieos-serialization-provider-1.0.0.jar:na]

pom.xml

    <dependency>
        <groupId>one.block</groupId>
        <artifactId>eosiojava</artifactId>
        <version>${eosjava.version}</version>
    </dependency>

    <dependency>
      <groupId>one.block</groupId>
      <artifactId>eosio-java-rpc-provider</artifactId>
      <version>${eosjava.version}</version>
    </dependency>
    <dependency>
      <groupId>one.block</groupId>
      <artifactId>eosiojavasoftkeysignatureprovider</artifactId>
      <version>${eosjava.version}</version>
    </dependency>
    <dependency>
      <groupId>one.block</groupId>
      <artifactId>eosio-java-abieos-serialization-provider</artifactId>
      <version>${eosjava.version}</version>
    </dependency>
ifunsu commented 3 years ago

Hi, here is what I found. $unzip eosio-java-abieos-serialization-provider-1.0.0.jar in directory ~/.m2/repository/one/block/eosio-java-abieos-serialization-provider/1.0.0/eosiojavaabieos/build/lib/main/debug there is a file name libeosiojavaabieos.dylib $file libeosiojavaabieos.dylib libeosiojavaabieos.dylib: Mach-O 64-bit x86_64 dynamically linked shared library, flags:<NOUNDEFS|DYLDLINK|TWOLEVEL|WEAK_DEFINES|BINDS_TO_WEAK|NO_REEXPORTED_DYLIBS>

If I am not wrong, Mach-O is an IOS file format but not a ubuntu format.

Anyone can fix it please?

iliyahristov commented 3 years ago

Hi, I have the same issue. Did you found solution ? Now I found that : https://github.com/EOSIO/eosio-java-abieos-serialization-provider/blob/develop/CONTRIBUTING.md#building-with-docker

It is sugested way to build eosio-java-abieos for Linux Ubuntu, because the maven repository is build for MacOS only That info is from that issue : https://github.com/EOSIO/eosio-java-abieos-serialization-provider/issues/15

Regards

ifunsu commented 3 years ago

Thanks, But I used other project to reach the same result. Official support sxck.

ives1106 commented 2 years ago

Thanks, But I used other project to reach the same result. Official support sxck.

Hi, I have the same issue, can you tell me what the other project is?