Org.elasticsearch.bootstrap - JNA not found. native methods will be disabled

Hi everybody

org.elasticsearch.bootstrap - JNA not found. native methods will be disabled.

is the message i get. My es-cluster (1.7.2) is fully embedded.
libjna-java are installed (Ubuntu).
Is there a path or an env variable to set or an
.put("jna....whatever", somewhere) to use ?

Thank you.

If you run embedded, you need jna jar on the classpath.


Arrrrr. It was not in my fat jar !
It works. Thanks.

  1. On 1.7.0, there is no long stacktrace reported. Is it expected that 2.0.0-beta has different reporting ?

  2. if jna.jar is required, should'it be in the maven dependencies ?

You can git clone then run "mvn test -Dtest=AppTest".

Here is the stack trace with 2.0.0-beta. It runs clean on 1.7.0.

You can try WARNING: JNA not found. native methods will be disabled.
java.lang.ClassNotFoundException: com.sun.jna.Native
at java.lang.ClassLoader.loadClass(
at sun.misc.Launcher$AppClassLoader.loadClass(
at java.lang.ClassLoader.loadClass(
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(
at org.elasticsearch.bootstrap.Natives.(
at org.elasticsearch.bootstrap.BootstrapInfo.isMemoryLocked(BootstrapInf
at org.elasticsearch.monitor.process.ProcessProbe.processInfo(ProcessPro
at org.elasticsearch.monitor.process.ProcessService.(ProcessServic


works for me with 1.7.2 and java jna lib install on ubuntu.

JNA is optional so that ES can be tested without mlockall or other native features.

The long stacktrace is new in 2.0 and there are different opinions about it but JNA is also really optional when using ES as client and not as a server, so the stacktrace may help to diagnose situations whether JNA is really required or not

ok, thanks for the pointer to the issue !

Thanks, this works perfectly. It's really annoying to keep getting those error messages.

thanks for contributing!