From 2ccfde76f1084828700b274b0c634029eeeb0080 Mon Sep 17 00:00:00 2001 From: tlrx Date: Mon, 22 Dec 2014 11:24:31 +0100 Subject: [PATCH] Native: Kernel32Library throws NoClassDefFound if JNA is missing Introduced by #8993 --- src/main/java/org/elasticsearch/common/jna/Natives.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/org/elasticsearch/common/jna/Natives.java b/src/main/java/org/elasticsearch/common/jna/Natives.java index e1268b05561..d6c6838842a 100644 --- a/src/main/java/org/elasticsearch/common/jna/Natives.java +++ b/src/main/java/org/elasticsearch/common/jna/Natives.java @@ -72,6 +72,8 @@ public class Natives { } else { logger.warn("unknown error " + Native.getLastError() + " when adding console ctrl handler:"); } + } catch (NoClassDefFoundError e) { + logger.warn("JNA not found: native methods and handlers will be disabled."); } catch (UnsatisfiedLinkError e) { // this will have already been logged by Kernel32Library, no need to repeat it }