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更新太慢了

  • 相关阅读:
    在Eclipse中设置中文JavaDOC
    买车,给点建议和意见
    父亲节
    JSP文件上传

    昨天我生日
    换皮了
    西安夕阳
    WinForms中只能输入数字的文本框
    使用GoogleCode SVN服务
  • 原文地址:https://www.cnblogs.com/lifelikeplay/p/14060385.html
Copyright © 2011-2022 走看看