Faile to start Elasticsearch 7.12.1

I install vietnamese-analysis for Elasticsearch 7.12.1.

But when I restart Elasticsearch, I get the following error:

[2021-11-20T01:56:57,505][ERROR][o.e.b.ElasticsearchUncaughtExceptionHandler] [dell-Precision-M4800] uncaught exception in thread [main]
org.elasticsearch.bootstrap.StartupException: java.lang.IllegalStateException: failed to load plugin class [org.elasticsearch.plugin.analysis.vi.AnalysisVietnamesePlugin]
	at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:163) ~[elasticsearch-7.12.1.jar:7.12.1]
	at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:150) ~[elasticsearch-7.12.1.jar:7.12.1]
	at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:75) ~[elasticsearch-7.12.1.jar:7.12.1]
	at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:116) ~[elasticsearch-cli-7.12.1.jar:7.12.1]
	at org.elasticsearch.cli.Command.main(Command.java:79) ~[elasticsearch-cli-7.12.1.jar:7.12.1]
	at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:115) ~[elasticsearch-7.12.1.jar:7.12.1]
	at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:81) ~[elasticsearch-7.12.1.jar:7.12.1]
Caused by: java.lang.IllegalStateException: failed to load plugin class [org.elasticsearch.plugin.analysis.vi.AnalysisVietnamesePlugin]
	at org.elasticsearch.plugins.PluginsService.loadPlugin(PluginsService.java:718) ~[elasticsearch-7.12.1.jar:7.12.1]
	at org.elasticsearch.plugins.PluginsService.loadBundle(PluginsService.java:654) ~[elasticsearch-7.12.1.jar:7.12.1]
	at org.elasticsearch.plugins.PluginsService.loadBundles(PluginsService.java:474) ~[elasticsearch-7.12.1.jar:7.12.1]
	at org.elasticsearch.plugins.PluginsService.<init>(PluginsService.java:158) ~[elasticsearch-7.12.1.jar:7.12.1]
	at org.elasticsearch.node.Node.<init>(Node.java:336) ~[elasticsearch-7.12.1.jar:7.12.1]
	at org.elasticsearch.node.Node.<init>(Node.java:278) ~[elasticsearch-7.12.1.jar:7.12.1]
	at org.elasticsearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:217) ~[elasticsearch-7.12.1.jar:7.12.1]
	at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:217) ~[elasticsearch-7.12.1.jar:7.12.1]
	at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:397) ~[elasticsearch-7.12.1.jar:7.12.1]
	at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:159) ~[elasticsearch-7.12.1.jar:7.12.1]
	... 6 more
Caused by: java.lang.reflect.InvocationTargetException
	at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?]
	at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:78) ~[?:?]
	at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?]
	at java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499) ~[?:?]
	at java.lang.reflect.Constructor.newInstance(Constructor.java:480) ~[?:?]
	at org.elasticsearch.plugins.PluginsService.loadPlugin(PluginsService.java:713) ~[elasticsearch-7.12.1.jar:7.12.1]
	at org.elasticsearch.plugins.PluginsService.loadBundle(PluginsService.java:654) ~[elasticsearch-7.12.1.jar:7.12.1]
	at org.elasticsearch.plugins.PluginsService.loadBundles(PluginsService.java:474) ~[elasticsearch-7.12.1.jar:7.12.1]
	at org.elasticsearch.plugins.PluginsService.<init>(PluginsService.java:158) ~[elasticsearch-7.12.1.jar:7.12.1]
	at org.elasticsearch.node.Node.<init>(Node.java:336) ~[elasticsearch-7.12.1.jar:7.12.1]
	at org.elasticsearch.node.Node.<init>(Node.java:278) ~[elasticsearch-7.12.1.jar:7.12.1]
	at org.elasticsearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:217) ~[elasticsearch-7.12.1.jar:7.12.1]
	at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:217) ~[elasticsearch-7.12.1.jar:7.12.1]
	at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:397) ~[elasticsearch-7.12.1.jar:7.12.1]
	at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:159) ~[elasticsearch-7.12.1.jar:7.12.1]
	... 6 more
Caused by: java.lang.Error: Unresolved compilation problems: 
	Syntax error, static imports are only available if source level is 1.5 or greater
	The import java.util.Collections.singletonMap cannot be resolved
	Syntax error, annotations are only available if source level is 1.5 or greater
	Syntax error, parameterized types are only available if source level is 1.5 or greater
	The method singletonMap(String, VietnameseTokenizerFactory::new) is undefined for the type AnalysisVietnamesePlugin
	Constructor references are allowed only at source level 1.8 or above
	Syntax error, annotations are only available if source level is 1.5 or greater
	Syntax error, parameterized types are only available if source level is 1.5 or greater
	The method singletonMap(String, VietnameseAnalyzerProvider::new) is undefined for the type AnalysisVietnamesePlugin
	Constructor references are allowed only at source level 1.8 or above
	Syntax error, annotations are only available if source level is 1.5 or greater
	Syntax error, parameterized types are only available if source level is 1.5 or greater
	The method singletonMap(String, VietnameseStopTokenFilterFactory::new) is undefined for the type AnalysisVietnamesePlugin
	Constructor references are allowed only at source level 1.8 or above

	at org.elasticsearch.plugin.analysis.vi.AnalysisVietnamesePlugin.<init>(AnalysisVietnamesePlugin.java:26) ~[?:?]
	at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?]
	at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:78) ~[?:?]
	at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?]
	at java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499) ~[?:?]
	at java.lang.reflect.Constructor.newInstance(Constructor.java:480) ~[?:?]
	at org.elasticsearch.plugins.PluginsService.loadPlugin(PluginsService.java:713) ~[elasticsearch-7.12.1.jar:7.12.1]
	at org.elasticsearch.plugins.PluginsService.loadBundle(PluginsService.java:654) ~[elasticsearch-7.12.1.jar:7.12.1]
	at org.elasticsearch.plugins.PluginsService.loadBundles(PluginsService.java:474) ~[elasticsearch-7.12.1.jar:7.12.1]
	at org.elasticsearch.plugins.PluginsService.<init>(PluginsService.java:158) ~[elasticsearch-7.12.1.jar:7.12.1]
	at org.elasticsearch.node.Node.<init>(Node.java:336) ~[elasticsearch-7.12.1.jar:7.12.1]
	at org.elasticsearch.node.Node.<init>(Node.java:278) ~[elasticsearch-7.12.1.jar:7.12.1]
	at org.elasticsearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:217) ~[elasticsearch-7.12.1.jar:7.12.1]
	at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:217) ~[elasticsearch-7.12.1.jar:7.12.1]
	at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:397) ~[elasticsearch-7.12.1.jar:7.12.1]
	at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:159) ~[elasticsearch-7.12.1.jar:7.12.1]
	... 6 more

Somebody help me, please!!!!

Looking at the plugin repository it doesn't look like it is compatible with your version of Elasticsearch. How did you manage to install it?

I clone code from

git clone GitHub - duydo/elasticsearch-analysis-vietnamese: Vietnamese Analysis Plugin for Elasticsearch

Then i changed version to 7.12.1. Because my Elasticsearch version is 7.12.1

<groupId>org.elasticsearch</groupId>
<artifactId>elasticsearch-analysis-vietnamese</artifactId>
<version>7.12.1</version>

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