gpt4 book ai didi

java - 无法启动 ElasticSearch - 找不到插件类

转载 作者:行者123 更新时间:2023-11-29 04:52:28 24 4
gpt4 key购买 nike

我们有一个现有的基于 java 的 ElasticSearch 自定义插件。我们现在升级到 ElasticSearch 2.1.1 并添加了 plugin-descriptor.properties 文件以指向我们的插件类。

在那之后,我们就可以安装我们的自定义插件了。但是当我们启动 ElasticSearch 服务时,却找不到这个自定义插件。我们验证了类文件存在于/usr/share/elasticsearch/plugins/目录下。

以下是异常堆栈跟踪:

[2016-01-20 13:13:48,527][ERROR][bootstrap] Exception
ElasticsearchException[Could not find plugin class [com.symc.edp.elasticsearch.plugin.CustomEDPPlugins]]; nested: ClassNotFoundException[com.symc.edp.elasticsearch.plugin.CustomEDPPlugins];
at org.elasticsearch.plugins.PluginsService.loadPluginClass(PluginsService.java:382)
at org.elasticsearch.plugins.PluginsService.loadBundles(PluginsService.java:348)
at org.elasticsearch.plugins.PluginsService.<init>(PluginsService.java:109)
at org.elasticsearch.node.Node.<init>(Node.java:146)
at org.elasticsearch.node.Node.<init>(Node.java:128)
at org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:145)
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:178)
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:285)
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:35)
Caused by: java.lang.ClassNotFoundException: com.symc.edp.elasticsearch.plugin.CustomEDPPlugins
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:814)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at org.elasticsearch.plugins.PluginsService.loadPluginClass(PluginsService.java:380)
... 8 more
[2016-01-20 13:22:55,236][INFO ][node ] [localhost] version[2.1.1], pid[20680], build[40e2c53/2015-12-15T13:05:55Z]
[2016-01-20 13:22:55,237][INFO ][node ] [localhost] initializing ...
[2016-01-20 13:22:55,840][ERROR][bootstrap ] Exception
ElasticsearchException[Could not find plugin class [com.symc.edp.elasticsearch.plugin.CustomEDPPlugins.class]]; nested: ClassNotFoundException[com.symc.edp.elasticsearch.plugin.CustomEDPPlugins.class];
at org.elasticsearch.plugins.PluginsService.loadPluginClass(PluginsService.java:382)
at org.elasticsearch.plugins.PluginsService.loadBundles(PluginsService.java:348)
at org.elasticsearch.plugins.PluginsService.<init>(PluginsService.java:109)
at org.elasticsearch.node.Node.<init>(Node.java:146)
at org.elasticsearch.node.Node.<init>(Node.java:128)
at org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:145)
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:178)
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:285)
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:35)
Caused by: java.lang.ClassNotFoundException: com.symc.edp.elasticsearch.plugin.CustomEDPPlugins.class
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:814)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at org.elasticsearch.plugins.PluginsService.loadPluginClass(PluginsService.java:380)
... 8 more

以下是我们的plugin-descriptor.properties的内容

description=EDP Custom Plugins
version=${project.version}
name=edpCustomPlugins
jvm=true
site=false
classname=com.symc.edp.elasticsearch.plugin.CustomEDPPlugins
java.version=${java.specification.version}
elasticsearch.version=2.1.1

最佳答案

可能是你的插件打包错误

也许您正在尝试安装包含已编译类的 jar 文件,而不是安装包含 jar 文件和 plugin-descriptor.properties 文件的 zip 文件。

关于java - 无法启动 ElasticSearch - 找不到插件类,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34911678/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com