<p dir="auto">While writing on ES through hadoop job ,it freezes with logs as :Caused by: <strong>java.lang.NoClassDefFoundError</strong>: Could not initialize class <strong>org.elasticsearch.common.lucene.Lucene</strong>,What might be the reason?</p>
<p dir="auto"><strong>Elasticsearch version</strong>:2.3.3</p>
<p dir="auto"><strong>JVM version</strong>:1.7</p>
<p dir="auto"><strong>OS version</strong>:14.04</p>
<p dir="auto"><strong>Logs</strong>:<br>
RemoteTransportException[[Failed to deserialize response of type [org.elasticsearch.action.admin.cluster.node.liveness.LivenessResponse]]]; nested: TransportSerializationException[Failed to deserialize response of type [org.elasticsearch.action.admin.cluster.node.liveness.LivenessResponse]]; nested: ExceptionInInitializerError; nested: IllegalArgumentException[An SPI class of type org.apache.lucene.codecs.PostingsFormat with name 'Lucene50' does not exist.  You need to add the corresponding JAR file supporting this SPI to your classpath.  The current classpath supports the following names: [es090, completion090, XBloomFilter]];<br>
Caused by: TransportSerializationException[Failed to deserialize response of type [org.elasticsearch.action.admin.cluster.node.liveness.LivenessResponse]]; nested: ExceptionInInitializerError; nested: IllegalArgumentException[An SPI class of type org.apache.lucene.codecs.PostingsFormat with name 'Lucene50' does not exist.  You need to add the corresponding JAR file supporting this SPI to your classpath.  The current classpath supports the following names: [es090, completion090, XBloomFilter]];<br>
at org.elasticsearch.transport.netty.MessageChannelHandler.handleResponse(MessageChannelHandler.java:180)<br>
at org.elasticsearch.transport.netty.MessageChannelHandler.messageReceived(MessageChannelHandler.java:138)<br>
at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)<br>
at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:560)<br>
at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:787)<br>
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:296)<br>
at org.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:462)<br>
at org.jboss.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:443)<br>
at org.jboss.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:303)<br>
at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)<br>
at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:560)<br>
at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:555)<br>
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268)<br>
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255)<br>
at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88)<br>
at org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:107)<br>
at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:312)<br>
at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:88)<br>
at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)<br>
at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)<br>
at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)<br>
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)<br>
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)<br>
at java.lang.Thread.run(Thread.java:745)<br>
Caused by: java.lang.ExceptionInInitializerError<br>
at org.elasticsearch.Version.fromId(Version.java:564)<br>
at org.elasticsearch.Version.readVersion(Version.java:308)<br>
at org.elasticsearch.cluster.node.DiscoveryNode.readFrom(DiscoveryNode.java:339)<br>
at org.elasticsearch.cluster.node.DiscoveryNode.readNode(DiscoveryNode.java:322)<br>
at org.elasticsearch.action.admin.cluster.node.liveness.LivenessResponse.readFrom(LivenessResponse.java:52)<br>
at org.elasticsearch.transport.netty.MessageChannelHandler.handleResponse(MessageChannelHandler.java:178)<br>
... 23 more<br>
Caused by: java.lang.IllegalArgumentException: An SPI class of type org.apache.lucene.codecs.PostingsFormat with name 'Lucene50' does not exist.  You need to add the corresponding JAR file supporting this SPI to your classpath.  The current classpath supports the following names: [es090, completion090, XBloomFilter]<br>
at org.apache.lucene.util.NamedSPILoader.lookup(NamedSPILoader.java:114)<br>
at org.apache.lucene.codecs.PostingsFormat.forName(PostingsFormat.java:112)<br>
at org.elasticsearch.common.lucene.Lucene.(Lucene.java:65):</p>
<p dir="auto">Here is what I did:</p>
<p dir="auto">I install a fresh new version of elasticsearch 2.1.0. And starts it (note that I'm running it with <code class="notranslate">license</code> and <code class="notranslate">marvel-agent</code>).</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ bin/elasticsearch
[2015-11-27 20:59:15,909][INFO ][node                     ] [Ajak] version[2.1.0], pid[74419], build[72cd1f1/2015-11-18T22:40:03Z]
[2015-11-27 20:59:15,910][INFO ][node                     ] [Ajak] initializing ...
[2015-11-27 20:59:16,341][INFO ][plugins                  ] [Ajak] loaded [license, marvel-agent], sites []
[2015-11-27 20:59:16,387][INFO ][env                      ] [Ajak] using [1] data paths, mounts [[/ (/dev/disk1)]], net usable_space [36.6gb], net total_space [464.7gb], spins? [unknown], types [hfs]
[2015-11-27 20:59:19,519][INFO ][node                     ] [Ajak] initialized
[2015-11-27 20:59:19,519][INFO ][node                     ] [Ajak] starting ...
[2015-11-27 20:59:19,657][INFO ][transport                ] [Ajak] publish_address {127.0.0.1:9300}, bound_addresses {127.0.0.1:9300}
[2015-11-27 20:59:19,669][INFO ][discovery                ] [Ajak] workshop/K8cI0q5zTU-J-iuxKIBcIg
[2015-11-27 20:59:22,697][INFO ][cluster.service          ] [Ajak] new_master {Ajak}{K8cI0q5zTU-J-iuxKIBcIg}{127.0.0.1}{127.0.0.1:9300}, reason: zen-disco-join(elected_as_master, [0] joins received)
[2015-11-27 20:59:22,712][INFO ][http                     ] [Ajak] publish_address {127.0.0.1:9200}, bound_addresses {127.0.0.1:9200}
[2015-11-27 20:59:22,713][INFO ][node                     ] [Ajak] started"><pre class="notranslate"><code class="notranslate">$ bin/elasticsearch
[2015-11-27 20:59:15,909][INFO ][node                     ] [Ajak] version[2.1.0], pid[74419], build[72cd1f1/2015-11-18T22:40:03Z]
[2015-11-27 20:59:15,910][INFO ][node                     ] [Ajak] initializing ...
[2015-11-27 20:59:16,341][INFO ][plugins                  ] [Ajak] loaded [license, marvel-agent], sites []
[2015-11-27 20:59:16,387][INFO ][env                      ] [Ajak] using [1] data paths, mounts [[/ (/dev/disk1)]], net usable_space [36.6gb], net total_space [464.7gb], spins? [unknown], types [hfs]
[2015-11-27 20:59:19,519][INFO ][node                     ] [Ajak] initialized
[2015-11-27 20:59:19,519][INFO ][node                     ] [Ajak] starting ...
[2015-11-27 20:59:19,657][INFO ][transport                ] [Ajak] publish_address {127.0.0.1:9300}, bound_addresses {127.0.0.1:9300}
[2015-11-27 20:59:19,669][INFO ][discovery                ] [Ajak] workshop/K8cI0q5zTU-J-iuxKIBcIg
[2015-11-27 20:59:22,697][INFO ][cluster.service          ] [Ajak] new_master {Ajak}{K8cI0q5zTU-J-iuxKIBcIg}{127.0.0.1}{127.0.0.1:9300}, reason: zen-disco-join(elected_as_master, [0] joins received)
[2015-11-27 20:59:22,712][INFO ][http                     ] [Ajak] publish_address {127.0.0.1:9200}, bound_addresses {127.0.0.1:9200}
[2015-11-27 20:59:22,713][INFO ][node                     ] [Ajak] started
</code></pre></div>
<p dir="auto">I have a Java application using elasticsearch 2.0.0 jar as a client.</p>
<div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Client client = TransportClient.builder().build()
        .addTransportAddress(new InetSocketTransportAddress(new InetSocketAddress(&quot;127.0.0.1&quot;, 9300)));

if (!client.admin().indices().prepareExists(&quot;person&quot;).execute().actionGet().isExists()) {
    String indexSettings = readFileInClasspath(&quot;/settings.json&quot;);
    client.admin().indices().prepareCreate(&quot;person&quot;).setSettings(indexSettings).execute().actionGet();
}"><pre class="notranslate"><span class="pl-smi">Client</span> <span class="pl-s1">client</span> = <span class="pl-smi">TransportClient</span>.<span class="pl-en">builder</span>().<span class="pl-en">build</span>()
        .<span class="pl-en">addTransportAddress</span>(<span class="pl-k">new</span> <span class="pl-smi">InetSocketTransportAddress</span>(<span class="pl-k">new</span> <span class="pl-smi">InetSocketAddress</span>(<span class="pl-s">"127.0.0.1"</span>, <span class="pl-c1">9300</span>)));

<span class="pl-k">if</span> (!<span class="pl-s1">client</span>.<span class="pl-en">admin</span>().<span class="pl-en">indices</span>().<span class="pl-en">prepareExists</span>(<span class="pl-s">"person"</span>).<span class="pl-en">execute</span>().<span class="pl-en">actionGet</span>().<span class="pl-en">isExists</span>()) {
    <span class="pl-smi">String</span> <span class="pl-s1">indexSettings</span> = <span class="pl-en">readFileInClasspath</span>(<span class="pl-s">"/settings.json"</span>);
    <span class="pl-s1">client</span>.<span class="pl-en">admin</span>().<span class="pl-en">indices</span>().<span class="pl-en">prepareCreate</span>(<span class="pl-s">"person"</span>).<span class="pl-en">setSettings</span>(<span class="pl-s1">indexSettings</span>).<span class="pl-en">execute</span>().<span class="pl-en">actionGet</span>();
}</pre></div>
<p dir="auto">When running this, I get on the client side:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="nov. 27, 2015 9:03:03 PM org.elasticsearch.plugins.PluginsService &lt;init&gt;
INFOS: [James Sanders] loaded [], sites []
nov. 27, 2015 9:03:03 PM org.elasticsearch.client.transport.TransportClientNodesService$SimpleNodeSampler doSample
INFOS: [James Sanders] failed to get node info for {#transport#-1}{127.0.0.1}{127.0.0.1:9300}, disconnecting...
RemoteTransportException[[Failed to deserialize response of type [org.elasticsearch.action.admin.cluster.node.liveness.LivenessResponse]]]; nested: TransportSerializationException[Failed to deserialize response of type [org.elasticsearch.action.admin.cluster.node.liveness.LivenessResponse]]; nested: ExceptionInInitializerError; nested: IllegalArgumentException[An SPI class of type org.apache.lucene.codecs.PostingsFormat with name 'Lucene50' does not exist.  You need to add the corresponding JAR file supporting this SPI to your classpath.  The current classpath supports the following names: [es090, completion090, XBloomFilter]];
Caused by: TransportSerializationException[Failed to deserialize response of type [org.elasticsearch.action.admin.cluster.node.liveness.LivenessResponse]]; nested: ExceptionInInitializerError; nested: IllegalArgumentException[An SPI class of type org.apache.lucene.codecs.PostingsFormat with name 'Lucene50' does not exist.  You need to add the corresponding JAR file supporting this SPI to your classpath.  The current classpath supports the following names: [es090, completion090, XBloomFilter]];
        at org.elasticsearch.transport.netty.MessageChannelHandler.handleResponse(MessageChannelHandler.java:179)
        at org.elasticsearch.transport.netty.MessageChannelHandler.messageReceived(MessageChannelHandler.java:138)
        at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
        at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
        at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)
        at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:296)
        at org.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:462)
        at org.jboss.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:443)
        at org.jboss.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:303)
        at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
        at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
        at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:559)
        at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268)
        at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255)
        at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88)
        at org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:108)
        at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:337)
        at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89)
        at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)
        at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
        at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ExceptionInInitializerError
        at org.elasticsearch.Version.fromId(Version.java:500)
        at org.elasticsearch.Version.readVersion(Version.java:276)
        at org.elasticsearch.cluster.node.DiscoveryNode.readFrom(DiscoveryNode.java:326)
        at org.elasticsearch.cluster.node.DiscoveryNode.readNode(DiscoveryNode.java:309)
        at org.elasticsearch.action.admin.cluster.node.liveness.LivenessResponse.readFrom(LivenessResponse.java:52)
        at org.elasticsearch.transport.netty.MessageChannelHandler.handleResponse(MessageChannelHandler.java:177)
        ... 23 more
Caused by: java.lang.IllegalArgumentException: An SPI class of type org.apache.lucene.codecs.PostingsFormat with name 'Lucene50' does not exist.  You need to add the corresponding JAR file supporting this SPI to your classpath.  The current classpath supports the following names: [es090, completion090, XBloomFilter]
        at org.apache.lucene.util.NamedSPILoader.lookup(NamedSPILoader.java:109)
        at org.apache.lucene.codecs.PostingsFormat.forName(PostingsFormat.java:112)
        at org.elasticsearch.common.lucene.Lucene.&lt;clinit&gt;(Lucene.java:103)
        ... 29 more

nov. 27, 2015 9:03:03 PM org.elasticsearch.client.transport.TransportClientNodesService$SimpleNodeSampler doSample
INFOS: [James Sanders] failed to get node info for {#transport#-1}{127.0.0.1}{127.0.0.1:9300}, disconnecting...
RemoteTransportException[[Failed to deserialize response of type [org.elasticsearch.action.admin.cluster.node.liveness.LivenessResponse]]]; nested: TransportSerializationException[Failed to deserialize response of type [org.elasticsearch.action.admin.cluster.node.liveness.LivenessResponse]]; nested: NoClassDefFoundError[Could not initialize class org.elasticsearch.common.lucene.Lucene];
Caused by: TransportSerializationException[Failed to deserialize response of type [org.elasticsearch.action.admin.cluster.node.liveness.LivenessResponse]]; nested: NoClassDefFoundError[Could not initialize class org.elasticsearch.common.lucene.Lucene];
        at org.elasticsearch.transport.netty.MessageChannelHandler.handleResponse(MessageChannelHandler.java:179)
        at org.elasticsearch.transport.netty.MessageChannelHandler.messageReceived(MessageChannelHandler.java:138)
        at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
        at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
        at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)
        at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:296)
        at org.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:462)
        at org.jboss.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:443)
        at org.jboss.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:303)
        at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
        at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
        at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:559)
        at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268)
        at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255)
        at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88)
        at org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:108)
        at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:337)
        at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89)
        at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)
        at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
        at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.elasticsearch.common.lucene.Lucene
        at org.elasticsearch.Version.fromId(Version.java:500)
        at org.elasticsearch.Version.readVersion(Version.java:276)
        at org.elasticsearch.cluster.node.DiscoveryNode.readFrom(DiscoveryNode.java:326)
        at org.elasticsearch.cluster.node.DiscoveryNode.readNode(DiscoveryNode.java:309)
        at org.elasticsearch.action.admin.cluster.node.liveness.LivenessResponse.readFrom(LivenessResponse.java:52)
        at org.elasticsearch.transport.netty.MessageChannelHandler.handleResponse(MessageChannelHandler.java:177)
        ... 23 more

Exception in thread &quot;main&quot; NoNodeAvailableException[None of the configured nodes are available: []]
        at org.elasticsearch.client.transport.TransportClientNodesService.ensureNodesAreAvailable(TransportClientNodesService.java:280)
        at org.elasticsearch.client.transport.TransportClientNodesService.execute(TransportClientNodesService.java:197)
        at org.elasticsearch.client.transport.support.TransportProxyClient.execute(TransportProxyClient.java:55)
        at org.elasticsearch.client.transport.TransportClient.doExecute(TransportClient.java:272)
        at org.elasticsearch.client.support.AbstractClient.execute(AbstractClient.java:347)
        at org.elasticsearch.client.support.AbstractClient$IndicesAdmin.execute(AbstractClient.java:1177)
        at org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:85)
        at org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:59)
        at org.elasticsearch.demo.workshop.injector.runner.Generate.main(Generate.java:103)"><pre class="notranslate"><code class="notranslate">nov. 27, 2015 9:03:03 PM org.elasticsearch.plugins.PluginsService &lt;init&gt;
INFOS: [James Sanders] loaded [], sites []
nov. 27, 2015 9:03:03 PM org.elasticsearch.client.transport.TransportClientNodesService$SimpleNodeSampler doSample
INFOS: [James Sanders] failed to get node info for {#transport#-1}{127.0.0.1}{127.0.0.1:9300}, disconnecting...
RemoteTransportException[[Failed to deserialize response of type [org.elasticsearch.action.admin.cluster.node.liveness.LivenessResponse]]]; nested: TransportSerializationException[Failed to deserialize response of type [org.elasticsearch.action.admin.cluster.node.liveness.LivenessResponse]]; nested: ExceptionInInitializerError; nested: IllegalArgumentException[An SPI class of type org.apache.lucene.codecs.PostingsFormat with name 'Lucene50' does not exist.  You need to add the corresponding JAR file supporting this SPI to your classpath.  The current classpath supports the following names: [es090, completion090, XBloomFilter]];
Caused by: TransportSerializationException[Failed to deserialize response of type [org.elasticsearch.action.admin.cluster.node.liveness.LivenessResponse]]; nested: ExceptionInInitializerError; nested: IllegalArgumentException[An SPI class of type org.apache.lucene.codecs.PostingsFormat with name 'Lucene50' does not exist.  You need to add the corresponding JAR file supporting this SPI to your classpath.  The current classpath supports the following names: [es090, completion090, XBloomFilter]];
        at org.elasticsearch.transport.netty.MessageChannelHandler.handleResponse(MessageChannelHandler.java:179)
        at org.elasticsearch.transport.netty.MessageChannelHandler.messageReceived(MessageChannelHandler.java:138)
        at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
        at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
        at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)
        at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:296)
        at org.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:462)
        at org.jboss.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:443)
        at org.jboss.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:303)
        at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
        at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
        at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:559)
        at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268)
        at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255)
        at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88)
        at org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:108)
        at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:337)
        at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89)
        at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)
        at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
        at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ExceptionInInitializerError
        at org.elasticsearch.Version.fromId(Version.java:500)
        at org.elasticsearch.Version.readVersion(Version.java:276)
        at org.elasticsearch.cluster.node.DiscoveryNode.readFrom(DiscoveryNode.java:326)
        at org.elasticsearch.cluster.node.DiscoveryNode.readNode(DiscoveryNode.java:309)
        at org.elasticsearch.action.admin.cluster.node.liveness.LivenessResponse.readFrom(LivenessResponse.java:52)
        at org.elasticsearch.transport.netty.MessageChannelHandler.handleResponse(MessageChannelHandler.java:177)
        ... 23 more
Caused by: java.lang.IllegalArgumentException: An SPI class of type org.apache.lucene.codecs.PostingsFormat with name 'Lucene50' does not exist.  You need to add the corresponding JAR file supporting this SPI to your classpath.  The current classpath supports the following names: [es090, completion090, XBloomFilter]
        at org.apache.lucene.util.NamedSPILoader.lookup(NamedSPILoader.java:109)
        at org.apache.lucene.codecs.PostingsFormat.forName(PostingsFormat.java:112)
        at org.elasticsearch.common.lucene.Lucene.&lt;clinit&gt;(Lucene.java:103)
        ... 29 more

nov. 27, 2015 9:03:03 PM org.elasticsearch.client.transport.TransportClientNodesService$SimpleNodeSampler doSample
INFOS: [James Sanders] failed to get node info for {#transport#-1}{127.0.0.1}{127.0.0.1:9300}, disconnecting...
RemoteTransportException[[Failed to deserialize response of type [org.elasticsearch.action.admin.cluster.node.liveness.LivenessResponse]]]; nested: TransportSerializationException[Failed to deserialize response of type [org.elasticsearch.action.admin.cluster.node.liveness.LivenessResponse]]; nested: NoClassDefFoundError[Could not initialize class org.elasticsearch.common.lucene.Lucene];
Caused by: TransportSerializationException[Failed to deserialize response of type [org.elasticsearch.action.admin.cluster.node.liveness.LivenessResponse]]; nested: NoClassDefFoundError[Could not initialize class org.elasticsearch.common.lucene.Lucene];
        at org.elasticsearch.transport.netty.MessageChannelHandler.handleResponse(MessageChannelHandler.java:179)
        at org.elasticsearch.transport.netty.MessageChannelHandler.messageReceived(MessageChannelHandler.java:138)
        at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
        at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
        at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)
        at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:296)
        at org.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:462)
        at org.jboss.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:443)
        at org.jboss.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:303)
        at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
        at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
        at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:559)
        at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268)
        at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255)
        at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88)
        at org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:108)
        at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:337)
        at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89)
        at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)
        at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
        at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.elasticsearch.common.lucene.Lucene
        at org.elasticsearch.Version.fromId(Version.java:500)
        at org.elasticsearch.Version.readVersion(Version.java:276)
        at org.elasticsearch.cluster.node.DiscoveryNode.readFrom(DiscoveryNode.java:326)
        at org.elasticsearch.cluster.node.DiscoveryNode.readNode(DiscoveryNode.java:309)
        at org.elasticsearch.action.admin.cluster.node.liveness.LivenessResponse.readFrom(LivenessResponse.java:52)
        at org.elasticsearch.transport.netty.MessageChannelHandler.handleResponse(MessageChannelHandler.java:177)
        ... 23 more

Exception in thread "main" NoNodeAvailableException[None of the configured nodes are available: []]
        at org.elasticsearch.client.transport.TransportClientNodesService.ensureNodesAreAvailable(TransportClientNodesService.java:280)
        at org.elasticsearch.client.transport.TransportClientNodesService.execute(TransportClientNodesService.java:197)
        at org.elasticsearch.client.transport.support.TransportProxyClient.execute(TransportProxyClient.java:55)
        at org.elasticsearch.client.transport.TransportClient.doExecute(TransportClient.java:272)
        at org.elasticsearch.client.support.AbstractClient.execute(AbstractClient.java:347)
        at org.elasticsearch.client.support.AbstractClient$IndicesAdmin.execute(AbstractClient.java:1177)
        at org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:85)
        at org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:59)
        at org.elasticsearch.demo.workshop.injector.runner.Generate.main(Generate.java:103)
</code></pre></div>
<p dir="auto">If I update the client to 2.1.0, the exact same code now works perfectly.</p>