zoukankan      html  css  js  c++  java
  • ES报错:Failed to load ApplicationContext

    起因

    测试ES服务的时候,使用SpringDataES连接服务,创建索引的时候,出现如下异常

    java.lang.IllegalStateException: Failed to load ApplicationContext
    
    Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.elasticsearch.repository.support.NumberKeyedRepository]:
           Constructor threw exception; nested exception is java.lang.IllegalArgumentException: Could not convert [id.index] to boolean
    Caused by: java.lang.IllegalArgumentException: Failed to parse value [not_analyzed] as only [true] or [false] are allowed.
    

    原因

    (前提:保证不是代码的异常,写错配置文件等,也有人说配置文件写错也会出现这个异常)
    使用的版本不对,pom的SpringDataES版本为3.x,ES版本为5.x,但实际运行的服务为6.x

    解决方案

    修改实际ES服务的版本,因为SpringDataES更新太慢了

  • 相关阅读:
    1600802101
    Android第二次作业
    android 第一次作业
    团队作业—项目答辩
    软件工程—团队作业2.2
    软件工程—团队作业2
    软件工程—团队作业1
    第一篇博客
    Android第四次作业
    作业3
  • 原文地址:https://www.cnblogs.com/lifelikeplay/p/14060385.html
Copyright © 2011-2022 走看看