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

**URL:** <https://discuss.elastic.co/t/org-elasticsearch-bootstrap-jna-not-found-native-methods-will-be-disabled/30030>\
**Category:** Elasticsearch\
**Created:** [September 25, 2015, 3:40pm UTC](https://discuss.elastic.co/t/org-elasticsearch-bootstrap-jna-not-found-native-methods-will-be-disabled/30030 "2015-09-25T15:40:44Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![JPVay](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jpvay/32/61768_2.png) [@JPVay](https://discuss.elastic.co/u/JPVay)\
**Post date:** [September 25, 2015, 3:40pm UTC](https://discuss.elastic.co/t/org-elasticsearch-bootstrap-jna-not-found-native-methods-will-be-disabled/30030/1 "2015-09-25T15:40:44Z")

</div>

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  
_.settings(ImmutableSettings.settingsBuilder()_  
_.put("jna....whatever", somewhere) to use ?_

Thank you.

---

<div class="post-metadata">

**Author:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [September 25, 2015, 6:08pm UTC](https://discuss.elastic.co/t/org-elasticsearch-bootstrap-jna-not-found-native-methods-will-be-disabled/30030/2 "2015-09-25T18:08:55Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![JPVay](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jpvay/32/61768_2.png) [@JPVay](https://discuss.elastic.co/u/JPVay)\
**Post date:** [September 25, 2015, 9:16pm UTC](https://discuss.elastic.co/t/org-elasticsearch-bootstrap-jna-not-found-native-methods-will-be-disabled/30030/3 "2015-09-25T21:16:07Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![padang](https://avatars.discourse-cdn.com/v4/letter/p/65b543/32.png) [@padang](https://discuss.elastic.co/u/padang)\
**Post date:** [September 29, 2015, 4:09pm UTC](https://discuss.elastic.co/t/org-elasticsearch-bootstrap-jna-not-found-native-methods-will-be-disabled/30030/4 "2015-09-29T16:09:27Z")

</div>

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 [https://github.com/ltregan/esregression](https://github.com/ltregan/esregression) 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.net.URLClassLoader.findClass(URLClassLoader.java:381)  
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)  
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)  
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)  
at java.lang.Class.forName0(Native Method)  
at java.lang.Class.forName(Class.java:264)  
at org.elasticsearch.bootstrap.Natives.(Natives.java:43)  
at org.elasticsearch.bootstrap.BootstrapInfo.isMemoryLocked(BootstrapInf  
o.java:44)  
at org.elasticsearch.monitor.process.ProcessProbe.processInfo(ProcessPro  
be.java:139)  
at org.elasticsearch.monitor.process.ProcessService.(ProcessServic

---

<div class="post-metadata">

**Author:** ![JPVay](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jpvay/32/61768_2.png) [@JPVay](https://discuss.elastic.co/u/JPVay)\
**Post date:** [September 29, 2015, 5:43pm UTC](https://discuss.elastic.co/t/org-elasticsearch-bootstrap-jna-not-found-native-methods-will-be-disabled/30030/5 "2015-09-29T17:43:59Z")

</div>

```
    <dependency>
        <groupId>net.java.dev.jna</groupId>
        <artifactId>jna</artifactId>
        <version>4.1.0</version>
    </dependency>

```

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

---

<div class="post-metadata">

**Author:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [September 29, 2015, 8:52pm UTC](https://discuss.elastic.co/t/org-elasticsearch-bootstrap-jna-not-found-native-methods-will-be-disabled/30030/6 "2015-09-29T20:52:31Z")

</div>

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 [https://github.com/elastic/elasticsearch/issues/13245](https://github.com/elastic/elasticsearch/issues/13245)

---

<div class="post-metadata">

**Author:** ![padang](https://avatars.discourse-cdn.com/v4/letter/p/65b543/32.png) [@padang](https://discuss.elastic.co/u/padang)\
**Post date:** [October 2, 2015, 8:16am UTC](https://discuss.elastic.co/t/org-elasticsearch-bootstrap-jna-not-found-native-methods-will-be-disabled/30030/7 "2015-10-02T08:16:49Z")

</div>

ok, thanks for the pointer to the issue !

---

<div class="post-metadata">

**Author:** ![mmaia](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mmaia/32/12963_2.png) [@mmaia](https://discuss.elastic.co/u/mmaia)\
**Post date:** [December 12, 2016, 8:03am UTC](https://discuss.elastic.co/t/org-elasticsearch-bootstrap-jna-not-found-native-methods-will-be-disabled/30030/8 "2016-12-12T08:03:05Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![292954b2f881a494810e](https://avatars.discourse-cdn.com/v4/letter/2/54ee81/32.png) [@292954b2f881a494810e](https://discuss.elastic.co/u/292954b2f881a494810e)\
**Post date:** [May 27, 2017, 1:39am UTC](https://discuss.elastic.co/t/org-elasticsearch-bootstrap-jna-not-found-native-methods-will-be-disabled/30030/9 "2017-05-27T01:39:16Z")

</div>

thanks for contributing!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 5, 2017, 9:59pm UTC](https://discuss.elastic.co/t/org-elasticsearch-bootstrap-jna-not-found-native-methods-will-be-disabled/30030/10 "2017-07-05T21:59:57Z")

</div>


