不为失败找理由,要为成功找方法。

ES启动失败

Elasticsearch | 作者 menzhipeng | 发布于2018年09月29日 | 阅读数:4946


Caused by: org.springframework.data.elasticsearch.ElasticsearchException: Failed to build mapping for ESArticleDTO
at org.springframework.data.elasticsearch.core.ElasticsearchTemplate.putMapping(ElasticsearchTemplate.java:199)
at org.springframework.data.elasticsearch.repository.support.AbstractElasticsearchRepository.putMapping(AbstractElasticsearchRepository.java:100)
at org.springframework.data.elasticsearch.repository.support.AbstractElasticsearchRepository.<init>(AbstractElasticsearchRepository.java:88)
at org.springframework.data.elasticsearch.repository.support.NumberKeyedRepository.<init>(NumberKeyedRepository.java:36)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:170)
... 71 common frames omitted
Caused by: java.lang.IllegalArgumentException: Type must not be null!
at org.springframework.util.Assert.notNull(Assert.java:193)
at org.springframework.data.mapping.model.SimpleTypeHolder.isSimpleType(SimpleTypeHolder.java:145)
at org.springframework.data.elasticsearch.core.MappingBuilder.isEntity(MappingBuilder.java:325)
at org.springframework.data.elasticsearch.core.MappingBuilder.mapEntity(MappingBuilder.java:135)
at org.springframework.data.elasticsearch.core.MappingBuilder.buildMapping(MappingBuilder.java:91)
at org.springframework.data.elasticsearch.core.ElasticsearchTemplate.putMapping(ElasticsearchTemplate.java:196)
... 79 common frames omitted
 
已邀请:

weizijun - elasticsearch fan

赞同来自:

mapping写错了吧,是不是有字段没加type?

要回复问题请先登录注册