集成elasticsearch

Blade 未结 1 1987
haha
haha 2020-07-31 16:30

一、该问题的重现步骤是什么?

1. 集成ES

2. image.png

3.配置文件image.png


二、你期待的结果是什么?实际看到的又是什么?

希望正常运行

实际情况:image.png


三、你正在使用的是什么产品,什么版本?在什么操作系统上?

bladex_boot  2.5.0  window10


四、请提供详细的错误堆栈信息,这很重要。


Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.

2020-07-31 15:54:54.357 ERROR 15948 --- [           main] o.s.boot.SpringApplication               : Application run failed


org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'restHighLevelClient' defined in class path resource [org/springblade/common/config/ElasticSearchConfiguration.class]: Post-processing of merged bean definition failed; nested exception is java.lang.IllegalStateException: Failed to introspect Class [org.elasticsearch.client.RestHighLevelClient] from ClassLoader [sun.misc.Launcher$AppClassLoader@18b4aac2]

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:570)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515)

at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320)

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)

at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:847)

at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:877)

at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:549)

at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141)

at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:744)

at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:391)

at org.springframework.boot.SpringApplication.run(SpringApplication.java:312)

at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:140)

at org.springblade.core.launch.BladeApplication.run(BladeApplication.java:49)

at org.springblade.Application.main(Application.java:34)

Caused by: java.lang.IllegalStateException: Failed to introspect Class [org.elasticsearch.client.RestHighLevelClient] from ClassLoader [sun.misc.Launcher$AppClassLoader@18b4aac2]

at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:507)

at org.springframework.util.ReflectionUtils.doWithLocalMethods(ReflectionUtils.java:367)

at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.buildLifecycleMetadata(InitDestroyAnnotationBeanPostProcessor.java:207)

at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.findLifecycleMetadata(InitDestroyAnnotationBeanPostProcessor.java:189)

at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessMergedBeanDefinition(InitDestroyAnnotationBeanPostProcessor.java:128)

at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessMergedBeanDefinition(CommonAnnotationBeanPostProcessor.java:298)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyMergedBeanDefinitionPostProcessors(AbstractAutowireCapableBeanFactory.java:1076)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:567)

... 15 common frames omitted

Caused by: java.lang.NoClassDefFoundError: org/elasticsearch/client/Cancellable

at java.lang.Class.getDeclaredMethods0(Native Method)

at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)

at java.lang.Class.getDeclaredMethods(Class.java:1975)

at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:489)

... 22 common frames omitted

Caused by: java.lang.ClassNotFoundException: org.elasticsearch.client.Cancellable

at java.net.URLClassLoader.findClass(URLClassLoader.java:381)

at java.lang.ClassLoader.loadClass(ClassLoader.java:424)

at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)

at java.lang.ClassLoader.loadClass(ClassLoader.java:357)

... 26 common frames omitted

五、若有更多详细信息,请在下面提供。

1条回答
  •  smallchill
    smallchill (楼主)
    2020-07-31 17:07

    商业版答疑规则见:https://sns.bladex.cn/article-14990.html

    请使用下单购买授权的qq邮箱注册后发帖


    作者追问:2020-07-31 17:07

    你好,我是正版付费用户,而且是使用购买的QQ邮箱登录完成才发的帖;

    0 讨论(0)
提交回复