Not able to install plugin. <java.lang.classcastException>

I am trying to install plugin (which is just a custom Analyzer) its giving this error

com.analyzer.AnalyzerPlugin cannot be cast to org.elasticsearch.plugins.Plugin at org.elasticsearch.plugins.PluginsService.loadPlugin(PluginsService.java:505)

what could be the possible reason of it?

LOGS

[2016-06-30 16:03:22,796][INFO ][node ] [Whirlwind] version[1.0.2], pid[17104], build[4fc0da7/2014-03-25T15:41:15Z]
[2016-06-30 16:03:22,796][INFO ][node ] [Whirlwind] initializing ...
[2016-06-30 16:03:22,804][WARN ][plugins ] [Whirlwind] failed to load plugin from [file:/C:/Users/user/Downloads/elasticsearch-1.0.2/plugins/analyzer/es-plugin.properties]
org.elasticsearch.ElasticsearchException: Failed to load plugin class [com.analyzer.AnalyzerPlugin]
at org.elasticsearch.plugins.PluginsService.loadPlugin(PluginsService.java:516)
at org.elasticsearch.plugins.PluginsService.loadPluginsFromClasspath(PluginsService.java:397)
at org.elasticsearch.plugins.PluginsService.(PluginsService.java:100)
at org.elasticsearch.node.internal.InternalNode.(InternalNode.java:143)
at org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:159)
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:68)
at org.elasticsearch.bootstrap.Bootstrap.main(Bootstrap.java:201)
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:32)
Caused by: java.lang.ClassCastException: com.analyzer.AnalyzerPlugin cannot be cast to org.elasticsearch.plugins.Plugin
at org.elasticsearch.plugins.PluginsService.loadPlugin(PluginsService.java:505)
... 7 more
[2016-06-30 16:03:22,808][INFO ][plugins ] [Whirlwind] loaded [], sites []
[2016-06-30 16:03:25,507][INFO ][node ] [Whirlwind] initialized
[2016-06-30 16:03:25,507][INFO ][node ] [Whirlwind] starting ...
[2016-06-30 16:03:25,602][INFO ][transport ] [Whirlwind] bound_address {inet[/0:0:0:0:0:0:0:0:9300]}, publish_address {inet[/10.224.242.131:9300]
}
[2016-06-30 16:03:28,765][INFO ][cluster.service ] [Whirlwind] new_master [Whirlwind][oCo73HnaTNiLzpu-M7YsHw][WBHATVW7HYD][inet[/10.224.242.131:9300]],
reason: zen-disco-join (elected_as_master)
[2016-06-30 16:03:28,816][INFO ][discovery ] [Whirlwind] elasticsearch/oCo73HnaTNiLzpu-M7YsHw
[2016-06-30 16:03:28,849][INFO ][gateway ] [Whirlwind] recovered [0] indices into cluster_state
[2016-06-30 16:03:28,870][INFO ][http ] [Whirlwind] bound_address {inet[/0:0:0:0:0:0:0:0:9200]}, publish_address {inet[/10.224.242.131:9200]

Please format your code with </>. Note that you can edit your question.

  1. Use a more recent version of elasticsearch. This one is super super old. At least, move to 1.7.x
  2. Your com.analyzer.AnalyzerPlugin class does not implement Plugin interface.

You need to fix your code.

i can't change the version as i am carrying on already implemented project. i have to rewrite too much for that.

I am sure about the code part its superfine. as it was working before .

Before what?

it was working in elasticsearch version 1.0.0RC2.
and now its giving error. when i try to use it in elasticsearch version 1.0.2

So you said that you can't change the version but you did change the version, right?

not like that . that plugin was originally installed on some other project which has elasticsearch 1.0.0RC2 on it.
so i tried to install it on my project. i have not upgraded the version of my project's elasticsearch.

That's strange. This interface did not change from 1.0.0.RC2 to 1.0.2.
But that hard to tell anything if you don't share your code.

And let me say that another more time: you should definitely upgrade your projects to 1.7 (at least).
You can miss so many enhancements if you don't.