<p dir="auto"><strong>Elasticsearch version</strong>: 2.2.0</p>
<p dir="auto"><strong>JVM version</strong>:1.8</p>
<p dir="auto"><strong>OS version</strong>:Linux Mint 17.2 Cinnamon 64-bit (Cinnamon 2.6.13)</p>
<p dir="auto"><strong>Description of the problem including expected versus actual behavior:</strong><br>
Hi,<br>
i created nativescript in java and create .zip file with (jar and plugin-descriptor.properties) and install it but when i restart or start elasticsearch then it show error</p>
<p dir="auto">Steps to reproduce:<br>
1.create nativescript in java<br>
2.install nativescript as plugin<br>
3.restart or start elasticsearch</p>
<p dir="auto">**Provide logs (if relevant):</p>
<p dir="auto">this is log for successfully install nativescript as plugin in elasticsearch 2.2.0**</p>
<p dir="auto">-&gt; Installing from file:/home/ajay/Desktop/DEVAJAY/Untitled Folder/CustomScriptFactory1.0.zip...<br>
Trying file:/home/ajay/Desktop/DEVAJAY/Untitled Folder/CustomScriptFactory1.0.zip ...<br>
Downloading .DONE<br>
Verifying file:/home/mindarray/Desktop/DEVAJAY/Untitled Folder/CustomScriptFactory1.0.zip checksums if available ...<br>
NOTE: Unable to verify checksum for downloaded plugin (unable to find .sha1 or .md5 file to verify)<br>
Installed CustomScriptFactory1.0 into /home/mindarray/Desktop/elasticsearch-2.2.0/plugins/CustomScriptFactory1.0</p>
<p dir="auto"><strong>when restart or start the elasticsearch it show error</strong></p>
<p dir="auto">Exception in thread "main" java.lang.ClassCastException: class org.spacevatican.elasticsearchexample.CustomScriptFactory<br>
at java.lang.Class.asSubclass(Class.java:3404)<br>
at org.elasticsearch.plugins.PluginsService.loadPluginClass(PluginsService.java:463)<br>
at org.elasticsearch.plugins.PluginsService.loadBundles(PluginsService.java:431)<br>
at org.elasticsearch.plugins.PluginsService.(PluginsService.java:129)<br>
at org.elasticsearch.node.Node.(Node.java:146)<br>
at org.elasticsearch.node.Node.(Node.java:128)<br>
at org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:145)<br>
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:178)<br>
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:285)<br>
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:35)<br>
Refer to the log for complete error details.</p>
<p dir="auto"><strong>Describe the feature:</strong></p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/5938907/13320321/10b64b46-dbee-11e5-9ec9-7be1bfb343c2.jpg"><img src="https://cloud.githubusercontent.com/assets/5938907/13320321/10b64b46-dbee-11e5-9ec9-7be1bfb343c2.jpg" alt="7eab302a-dbd1-11e5-8eba-14fede94d5a2" style="max-width: 100%;"></a></p>
<p dir="auto"><strong>Elasticsearch version</strong>: 2.2</p>
<p dir="auto"><strong>JVM version</strong>: 1.8u66</p>
<p dir="auto"><strong>OS version</strong>: Win 8.1</p>
<p dir="auto"><strong>Description of the problem including expected versus actual behavior</strong>:</p>
<p dir="auto">When specifying a bogus analyzer (maybe a typo), ES throws an internal NPE in the logs and the request blocks. Instead the exception should be thrown to the user.</p>
<p dir="auto"><strong>Steps to reproduce</strong>:<br>
1.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="curl -XPOST http://localhost:9200/_analyze -d '{
  &quot;analyzer&quot; : &quot;bogus&quot;,
  &quot;text&quot; : &quot;this is a test&quot;
}'"><pre class="notranslate"><code class="notranslate">curl -XPOST http://localhost:9200/_analyze -d '{
  "analyzer" : "bogus",
  "text" : "this is a test"
}'
</code></pre></div>
<p dir="auto"><strong>Provide logs (if relevant)</strong>:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[2016-03-14 18:17:44,393][ERROR][transport                ] [Caleb Alexander] failed to handle exception for action [indices:admin/analyze[s]], handler [org.elasticsearch.action.support.single.shard.TransportSingleShardAction$AsyncSingleAction$1@a566c0]
java.lang.NullPointerException
    at org.elasticsearch.action.support.single.shard.TransportSingleShardAction$AsyncSingleAction.perform(TransportSingleShardAction.java:195)
    at org.elasticsearch.action.support.single.shard.TransportSingleShardAction$AsyncSingleAction.access$700(TransportSingleShardAction.java:115)
    at org.elasticsearch.action.support.single.shard.TransportSingleShardAction$AsyncSingleAction$1.handleException(TransportSingleShardAction.java:174)
    at org.elasticsearch.transport.TransportService$DirectResponseChannel.processException(TransportService.java:821)
    at org.elasticsearch.transport.TransportService$DirectResponseChannel.sendResponse(TransportService.java:799)
    at org.elasticsearch.transport.TransportService$4.onFailure(TransportService.java:361)
    at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:39)
    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)"><pre class="notranslate"><code class="notranslate">[2016-03-14 18:17:44,393][ERROR][transport                ] [Caleb Alexander] failed to handle exception for action [indices:admin/analyze[s]], handler [org.elasticsearch.action.support.single.shard.TransportSingleShardAction$AsyncSingleAction$1@a566c0]
java.lang.NullPointerException
    at org.elasticsearch.action.support.single.shard.TransportSingleShardAction$AsyncSingleAction.perform(TransportSingleShardAction.java:195)
    at org.elasticsearch.action.support.single.shard.TransportSingleShardAction$AsyncSingleAction.access$700(TransportSingleShardAction.java:115)
    at org.elasticsearch.action.support.single.shard.TransportSingleShardAction$AsyncSingleAction$1.handleException(TransportSingleShardAction.java:174)
    at org.elasticsearch.transport.TransportService$DirectResponseChannel.processException(TransportService.java:821)
    at org.elasticsearch.transport.TransportService$DirectResponseChannel.sendResponse(TransportService.java:799)
    at org.elasticsearch.transport.TransportService$4.onFailure(TransportService.java:361)
    at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:39)
    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)
</code></pre></div>