Problem with JNA

Hi all,

I've recently built elastic on a Ubuntu machine on ppc64 (IBM POWER Platform). The built went well, however, I always get this error when I start the elastic binary:

[2015-06-12 11:38:06,156][WARN ][bootstrap ] unable to load JNA native support library, native methods will be disabled.
java.lang.UnsatisfiedLinkError: Native library (com/sun/jna/linux-ppc64/libjnidispatch.so) not found in resource path

Then starts a list of several folders where it looked for this file...

To solve it I installed libjna-java , and now I do have this file libjnidispatch.so in the system under /usr/lib/jni/, however also after updating the PATH variable, I still get the error, even after re-building.

So to "trick" the system I first created a symlink inside the folder bin, where elastic is looking for the file:

ln -s /usr/bin/jni/libjnidispatch.so /root/elastic/core/target/releases/elasticsearch-2.0.0-SNAPSHOT/bin/com/sun/jna/linux-ppc64/libjnidispatch.so

which I know it looks awful, but it was just a try. After invoking elasticsearch, I got another error message:

[2015-06-12 12:19:56,701][WARN ][bootstrap ] unable to load JNA native support library, native methods will be disabled.
java.lang.UnsatisfiedLinkError: Can't obtain updateLastError method for class com.sun.jna.Native

Even by copying the libjnidispatch.so file and making it executable, I still get the same error.

Why is that so? How can I make elastic recognise that I do have this library?

Thanks.

You have "dll hell" if you try to use an older JNA .so, from a different version than the one ES is using (4.1.0). Thats why you see "Can't obtain updateLastError...".