Elastic 5.4.0 startup error after installing plugin

I have installed the following plugin into elasticsearch and installation succeeded:

public class IngestBanoPlugin extends AbstractSearchScript implements ScriptPlugin {

	@Override
	public Object run() {
		return null;
	}
}

but startup fails with the following error:

[2017-06-12T15:05:54,254][ERROR][o.e.b.Bootstrap          ] Exception
java.lang.ClassCastException: class org.elasticsearch.ingest.bano.IngestBanoPlugin
	at java.lang.Class.asSubclass(Class.java:3404) ~[?:1.8.0_101]
	at org.elasticsearch.plugins.PluginsService.loadPluginClass(PluginsService.java:410) ~[elasticsearch-5.4.0.jar:5.4.0]
	at org.elasticsearch.plugins.PluginsService.loadBundles(PluginsService.java:382) ~[elasticsearch-5.4.0.jar:5.4.0]
	at org.elasticsearch.plugins.PluginsService.<init>(PluginsService.java:139) ~[elasticsearch-5.4.0.jar:5.4.0]
	at org.elasticsearch.node.Node.<init>(Node.java:309) ~[elasticsearch-5.4.0.jar:5.4.0]
	at org.elasticsearch.node.Node.<init>(Node.java:242) ~[elasticsearch-5.4.0.jar:5.4.0]
	at org.elasticsearch.bootstrap.Bootstrap$6.<init>(Bootstrap.java:242) ~[elasticsearch-5.4.0.jar:5.4.0]
	at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:242) ~[elasticsearch-5.4.0.jar:5.4.0]
	at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:360) [elasticsearch-5.4.0.jar:5.4.0]
	at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:123) [elasticsearch-5.4.0.jar:5.4.0]
	at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:114) [elasticsearch-5.4.0.jar:5.4.0]
	at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:67) [elasticsearch-5.4.0.jar:5.4.0]
	at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:122) [elasticsearch-5.4.0.jar:5.4.0]
	at org.elasticsearch.cli.Command.main(Command.java:88) [elasticsearch-5.4.0.jar:5.4.0]
	at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:91) [elasticsearch-5.4.0.jar:5.4.0]
	at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:84) [elasticsearch-5.4.0.jar:5.4.0]
[2017-06-12T15:05:54,283][WARN ][o.e.b.ElasticsearchUncaughtExceptionHandler] [] uncaught exception in thread [main]
org.elasticsearch.bootstrap.StartupException: java.lang.ClassCastException: class org.elasticsearch.ingest.bano.IngestBanoPlugin
	at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:127) ~[elasticsearch-5.4.0.jar:5.4.0]
	at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:114) ~[elasticsearch-5.4.0.jar:5.4.0]
	at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:67) ~[elasticsearch-5.4.0.jar:5.4.0]
	at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:122) ~[elasticsearch-5.4.0.jar:5.4.0]
	at org.elasticsearch.cli.Command.main(Command.java:88) ~[elasticsearch-5.4.0.jar:5.4.0]
	at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:91) ~[elasticsearch-5.4.0.jar:5.4.0]
	at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:84) ~[elasticsearch-5.4.0.jar:5.4.0]

You should change the title as it's not really an installation problem of an existing plugin but more that you are trying to create your own script plugin and can not make it work with elasticsearch 5.4.

Funny BTW that you are using IngestBanoPlugin as the classname. Sounds very familiar to me :slight_smile:

Your plugin class must extend Plugin class and implement here the ScriptPlugin interface.

thank you. solved. :slight_smile:

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.