VanRoy / spring-data-jest

Spring Data Implementation for Jest
Apache License 2.0
226 stars 78 forks source link

com.github.vanroy.springdata.jest.exception.JestElasticsearchException:400 #89

Closed tuser4198 closed 6 years ago

tuser4198 commented 6 years ago

My maven dependencies like this:

+- org.springframework.boot:spring-boot-starter-web:jar:2.0.4.RELEASE:compile
[INFO] |  +- org.springframework.boot:spring-boot-starter:jar:2.0.4.RELEASE:compile
[INFO] |  |  +- org.springframework.boot:spring-boot:jar:2.0.4.RELEASE:compile
[INFO] |  |  +- org.springframework.boot:spring-boot-autoconfigure:jar:2.0.4.RELEASE:compile
[INFO] |  |  +- org.springframework.boot:spring-boot-starter-logging:jar:2.0.4.RELEASE:compile
[INFO] |  |  |  +- ch.qos.logback:logback-classic:jar:1.2.3:compile
[INFO] |  |  |  |  \- ch.qos.logback:logback-core:jar:1.2.3:compile
[INFO] |  |  |  +- org.apache.logging.log4j:log4j-to-slf4j:jar:2.10.0:compile
[INFO] |  |  |  \- org.slf4j:jul-to-slf4j:jar:1.7.25:compile
[INFO] |  |  +- javax.annotation:javax.annotation-api:jar:1.3.2:compile
[INFO] |  |  \- org.yaml:snakeyaml:jar:1.19:compile
[INFO] |  +- org.springframework.boot:spring-boot-starter-json:jar:2.0.4.RELEASE:compile
[INFO] |  |  +- com.fasterxml.jackson.core:jackson-databind:jar:2.9.6:compile
[INFO] |  |  |  +- com.fasterxml.jackson.core:jackson-annotations:jar:2.9.0:compile
[INFO] |  |  |  \- com.fasterxml.jackson.core:jackson-core:jar:2.9.6:compile
[INFO] |  |  +- com.fasterxml.jackson.datatype:jackson-datatype-jdk8:jar:2.9.6:compile
[INFO] |  |  +- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:jar:2.9.6:compile
[INFO] |  |  \- com.fasterxml.jackson.module:jackson-module-parameter-names:jar:2.9.6:compile
[INFO] |  +- org.springframework.boot:spring-boot-starter-tomcat:jar:2.0.4.RELEASE:compile
[INFO] |  |  +- org.apache.tomcat.embed:tomcat-embed-core:jar:8.5.32:compile
[INFO] |  |  +- org.apache.tomcat.embed:tomcat-embed-el:jar:8.5.32:compile
[INFO] |  |  \- org.apache.tomcat.embed:tomcat-embed-websocket:jar:8.5.32:compile
[INFO] |  +- org.hibernate.validator:hibernate-validator:jar:6.0.11.Final:compile
[INFO] |  |  +- javax.validation:validation-api:jar:2.0.1.Final:compile
[INFO] |  |  +- org.jboss.logging:jboss-logging:jar:3.3.2.Final:compile
[INFO] |  |  \- com.fasterxml:classmate:jar:1.3.4:compile
[INFO] |  +- org.springframework:spring-web:jar:5.0.8.RELEASE:compile
[INFO] |  |  \- org.springframework:spring-beans:jar:5.0.8.RELEASE:compile
[INFO] |  \- org.springframework:spring-webmvc:jar:5.0.8.RELEASE:compile
[INFO] |     +- org.springframework:spring-aop:jar:5.0.8.RELEASE:compile
[INFO] |     +- org.springframework:spring-context:jar:5.0.8.RELEASE:compile
[INFO] |     \- org.springframework:spring-expression:jar:5.0.8.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-configuration-processor:jar:2.0.4.RELEASE:compile (optional) 
[INFO] +- org.springframework.boot:spring-boot-starter-actuator:jar:2.0.4.RELEASE:compile
[INFO] |  +- org.springframework.boot:spring-boot-actuator-autoconfigure:jar:2.0.4.RELEASE:compile
[INFO] |  |  \- org.springframework.boot:spring-boot-actuator:jar:2.0.4.RELEASE:compile
[INFO] |  \- io.micrometer:micrometer-core:jar:1.0.6:compile
[INFO] |     +- org.hdrhistogram:HdrHistogram:jar:2.1.10:compile
[INFO] |     \- org.latencyutils:LatencyUtils:jar:2.0.3:compile
[INFO] +- org.springframework.boot:spring-boot-starter-test:jar:2.0.4.RELEASE:compile
[INFO] |  +- org.springframework.boot:spring-boot-test:jar:2.0.4.RELEASE:compile
[INFO] |  +- org.springframework.boot:spring-boot-test-autoconfigure:jar:2.0.4.RELEASE:compile
[INFO] |  +- com.jayway.jsonpath:json-path:jar:2.4.0:compile
[INFO] |  |  \- net.minidev:json-smart:jar:2.3:compile
[INFO] |  |     \- net.minidev:accessors-smart:jar:1.2:compile
[INFO] |  |        \- org.ow2.asm:asm:jar:5.0.4:compile
[INFO] |  +- junit:junit:jar:4.12:compile
[INFO] |  +- org.assertj:assertj-core:jar:3.9.1:compile
[INFO] |  +- org.mockito:mockito-core:jar:2.15.0:compile
[INFO] |  |  +- net.bytebuddy:byte-buddy:jar:1.7.11:compile
[INFO] |  |  +- net.bytebuddy:byte-buddy-agent:jar:1.7.11:compile
[INFO] |  |  \- org.objenesis:objenesis:jar:2.6:compile
[INFO] |  +- org.hamcrest:hamcrest-core:jar:1.3:compile
[INFO] |  +- org.hamcrest:hamcrest-library:jar:1.3:compile
[INFO] |  +- org.skyscreamer:jsonassert:jar:1.5.0:compile
[INFO] |  |  \- com.vaadin.external.google:android-json:jar:0.0.20131108.vaadin1:compile
[INFO] |  +- org.springframework:spring-core:jar:5.0.8.RELEASE:compile
[INFO] |  |  \- org.springframework:spring-jcl:jar:5.0.8.RELEASE:compile
[INFO] |  +- org.springframework:spring-test:jar:5.0.8.RELEASE:compile
[INFO] |  \- org.xmlunit:xmlunit-core:jar:2.5.1:compile
[INFO] +- com.google.guava:guava:jar:20.0:compile
[INFO] +- io.searchbox:jest:jar:5.3.3:compile
[INFO] |  +- io.searchbox:jest-common:jar:5.3.3:compile
[INFO] |  |  \- com.google.code.gson:gson:jar:2.8.5:compile
[INFO] |  +- org.apache.httpcomponents:httpcore-nio:jar:4.4.10:compile
[INFO] |  |  \- org.apache.httpcomponents:httpcore:jar:4.4.10:compile
[INFO] |  +- org.apache.httpcomponents:httpclient:jar:4.5.6:compile
[INFO] |  |  \- commons-codec:commons-codec:jar:1.11:compile
[INFO] |  +- org.apache.httpcomponents:httpasyncclient:jar:4.1.3:compile
[INFO] |  \- org.slf4j:slf4j-api:jar:1.7.25:compile
[INFO] +- com.github.vanroy:spring-boot-starter-data-jest:jar:3.0.0.RELEASE:compile
[INFO] |  +- com.github.vanroy:spring-data-jest:jar:3.0.0.RELEASE:compile
[INFO] |  |  +- org.springframework.data:spring-data-elasticsearch:jar:3.0.9.RELEASE:compile
[INFO] |  |  |  +- org.springframework:spring-tx:jar:5.0.8.RELEASE:compile
[INFO] |  |  |  +- org.springframework.data:spring-data-commons:jar:2.0.9.RELEASE:compile
[INFO] |  |  |  +- joda-time:joda-time:jar:2.9.9:compile
[INFO] |  |  |  +- org.elasticsearch.client:transport:jar:5.6.10:compile
[INFO] |  |  |  |  +- org.elasticsearch.plugin:reindex-client:jar:5.6.10:compile
[INFO] |  |  |  |  |  \- org.elasticsearch.client:elasticsearch-rest-client:jar:5.6.10:compile
[INFO] |  |  |  |  +- org.elasticsearch.plugin:lang-mustache-client:jar:5.6.10:compile
[INFO] |  |  |  |  |  \- com.github.spullara.mustache.java:compiler:jar:0.9.3:compile
[INFO] |  |  |  |  +- org.elasticsearch.plugin:percolator-client:jar:5.6.10:compile
[INFO] |  |  |  |  \- org.elasticsearch.plugin:parent-join-client:jar:5.6.10:compile
[INFO] |  |  |  \- org.elasticsearch.plugin:transport-netty4-client:jar:5.6.10:compile
[INFO] |  |  |     +- io.netty:netty-buffer:jar:4.1.27.Final:compile
[INFO] |  |  |     +- io.netty:netty-codec:jar:4.1.27.Final:compile
[INFO] |  |  |     +- io.netty:netty-codec-http:jar:4.1.27.Final:compile
[INFO] |  |  |     +- io.netty:netty-common:jar:4.1.27.Final:compile
[INFO] |  |  |     +- io.netty:netty-handler:jar:4.1.27.Final:compile
[INFO] |  |  |     +- io.netty:netty-resolver:jar:4.1.27.Final:compile
[INFO] |  |  |     +- io.netty:netty-transport:jar:4.1.27.Final:compile
[INFO] |  |  |     +- org.locationtech.spatial4j:spatial4j:jar:0.6:compile
[INFO] |  |  |     +- com.vividsolutions:jts:jar:1.13:compile
[INFO] |  |  |     \- org.apache.logging.log4j:log4j-core:jar:2.10.0:compile
[INFO] |  |  +- org.elasticsearch:elasticsearch:jar:5.6.10:compile
[INFO] |  |  |  +- org.apache.lucene:lucene-core:jar:6.6.1:compile
[INFO] |  |  |  +- org.apache.lucene:lucene-analyzers-common:jar:6.6.1:compile
[INFO] |  |  |  +- org.apache.lucene:lucene-backward-codecs:jar:6.6.1:compile
[INFO] |  |  |  +- org.apache.lucene:lucene-grouping:jar:6.6.1:compile
[INFO] |  |  |  +- org.apache.lucene:lucene-highlighter:jar:6.6.1:compile
[INFO] |  |  |  +- org.apache.lucene:lucene-join:jar:6.6.1:compile
[INFO] |  |  |  +- org.apache.lucene:lucene-memory:jar:6.6.1:compile
[INFO] |  |  |  +- org.apache.lucene:lucene-misc:jar:6.6.1:compile
[INFO] |  |  |  +- org.apache.lucene:lucene-queries:jar:6.6.1:compile
[INFO] |  |  |  +- org.apache.lucene:lucene-queryparser:jar:6.6.1:compile
[INFO] |  |  |  +- org.apache.lucene:lucene-sandbox:jar:6.6.1:compile
[INFO] |  |  |  +- org.apache.lucene:lucene-spatial:jar:6.6.1:compile
[INFO] |  |  |  +- org.apache.lucene:lucene-spatial-extras:jar:6.6.1:compile
[INFO] |  |  |  +- org.apache.lucene:lucene-spatial3d:jar:6.6.1:compile
[INFO] |  |  |  +- org.apache.lucene:lucene-suggest:jar:6.6.1:compile
[INFO] |  |  |  +- org.elasticsearch:securesm:jar:1.2:compile
[INFO] |  |  |  +- net.sf.jopt-simple:jopt-simple:jar:5.0.2:compile
[INFO] |  |  |  +- com.carrotsearch:hppc:jar:0.7.1:compile
[INFO] |  |  |  +- com.fasterxml.jackson.dataformat:jackson-dataformat-smile:jar:2.9.6:compile
[INFO] |  |  |  +- com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:jar:2.9.6:compile
[INFO] |  |  |  +- com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:jar:2.9.6:compile
[INFO] |  |  |  +- com.tdunning:t-digest:jar:3.0:compile
[INFO] |  |  |  +- org.apache.logging.log4j:log4j-api:jar:2.10.0:compile
[INFO] |  |  |  \- org.elasticsearch:jna:jar:4.4.0-1:compile
[INFO] |  |  \- commons-logging:commons-logging:jar:1.2:compile
[INFO] |  \- net.java.dev.jna:jna:jar:4.5.2:compile
[INFO] \- commons-lang:commons-lang:jar:2.6:compile

ES MODEL

@Document(indexName = "user-tags-test", type = "user-tags-test", refreshInterval = "30s", shards = 2, replicas = 0)
public class UserTagsEntity {

    @Id
    @Field(type = FieldType.Integer)
    private Integer id;

Exception stack:

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'initBean': Unsatisfied dependency expressed through field 'tagsSearchContext'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'tagsSearchContext': Unsatisfied dependency expressed through field 'userTagsRepository'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userTagsRepository': Invocation of init method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.elasticsearch.repository.support.NumberKeyedRepository]: Constructor threw exception; nested exception is org.springframework.data.elasticsearch.ElasticsearchException: Failed to build mapping for user-tags-test:user-tags-test
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:586) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
    at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:91) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:372) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1341) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:572) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:495) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:759) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:869) ~[spring-context-5.0.8.RELEASE.jar:5.0.8.RELEASE]
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550) ~[spring-context-5.0.8.RELEASE.jar:5.0.8.RELEASE]
    at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140) ~[spring-boot-2.0.4.RELEASE.jar:2.0.4.RELEASE]
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:762) [spring-boot-2.0.4.RELEASE.jar:2.0.4.RELEASE]
    at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:398) [spring-boot-2.0.4.RELEASE.jar:2.0.4.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:330) [spring-boot-2.0.4.RELEASE.jar:2.0.4.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1258) [spring-boot-2.0.4.RELEASE.jar:2.0.4.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1246) [spring-boot-2.0.4.RELEASE.jar:2.0.4.RELEASE]
    at com.yunruo.spring.search.Application.main(Application.java:22) [classes/:na]
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'tagsSearchContext': Unsatisfied dependency expressed through field 'userTagsRepository'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userTagsRepository': Invocation of init method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.elasticsearch.repository.support.NumberKeyedRepository]: Constructor threw exception; nested exception is org.springframework.data.elasticsearch.ElasticsearchException: Failed to build mapping for user-tags-test:user-tags-test
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:586) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
    at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:91) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:372) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1341) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:572) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:495) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
    at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:251) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1135) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1062) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:583) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
    ... 19 common frames omitted
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userTagsRepository': Invocation of init method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.elasticsearch.repository.support.NumberKeyedRepository]: Constructor threw exception; nested exception is org.springframework.data.elasticsearch.ElasticsearchException: Failed to build mapping for user-tags-test:user-tags-test
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1699) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:573) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:495) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
    at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:251) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1135) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1062) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:583) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
    ... 32 common frames omitted
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.elasticsearch.repository.support.NumberKeyedRepository]: Constructor threw exception; nested exception is org.springframework.data.elasticsearch.ElasticsearchException: Failed to build mapping for user-tags-test:user-tags-test
    at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:182) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
    at org.springframework.data.repository.core.support.RepositoryFactorySupport.lambda$getTargetRepositoryViaReflection$3(RepositoryFactorySupport.java:500) ~[spring-data-commons-2.0.9.RELEASE.jar:2.0.9.RELEASE]
    at java.util.Optional.map(Optional.java:215) ~[na:1.8.0_172]
    at org.springframework.data.repository.core.support.RepositoryFactorySupport.getTargetRepositoryViaReflection(RepositoryFactorySupport.java:500) ~[spring-data-commons-2.0.9.RELEASE.jar:2.0.9.RELEASE]
    at org.springframework.data.repository.core.support.RepositoryFactorySupport.getTargetRepositoryViaReflection(RepositoryFactorySupport.java:485) ~[spring-data-commons-2.0.9.RELEASE.jar:2.0.9.RELEASE]
    at org.springframework.data.elasticsearch.repository.support.ElasticsearchRepositoryFactory.getTargetRepository(ElasticsearchRepositoryFactory.java:73) ~[spring-data-elasticsearch-3.0.9.RELEASE.jar:3.0.9.RELEASE]
    at org.springframework.data.repository.core.support.RepositoryFactorySupport.getRepository(RepositoryFactorySupport.java:298) ~[spring-data-commons-2.0.9.RELEASE.jar:2.0.9.RELEASE]
    at org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.lambda$afterPropertiesSet$3(RepositoryFactoryBeanSupport.java:286) ~[spring-data-commons-2.0.9.RELEASE.jar:2.0.9.RELEASE]
    at org.springframework.data.util.Lazy.getNullable(Lazy.java:141) ~[spring-data-commons-2.0.9.RELEASE.jar:2.0.9.RELEASE]
    at org.springframework.data.util.Lazy.get(Lazy.java:63) ~[spring-data-commons-2.0.9.RELEASE.jar:2.0.9.RELEASE]
    at org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.afterPropertiesSet(RepositoryFactoryBeanSupport.java:289) ~[spring-data-commons-2.0.9.RELEASE.jar:2.0.9.RELEASE]
    at org.springframework.data.elasticsearch.repository.support.ElasticsearchRepositoryFactoryBean.afterPropertiesSet(ElasticsearchRepositoryFactoryBean.java:67) ~[spring-data-elasticsearch-3.0.9.RELEASE.jar:3.0.9.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1758) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1695) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
    ... 42 common frames omitted
Caused by: org.springframework.data.elasticsearch.ElasticsearchException: Failed to build mapping for user-tags-test:user-tags-test
    at com.github.vanroy.springdata.jest.JestElasticsearchTemplate.putMapping(JestElasticsearchTemplate.java:264) ~[spring-data-jest-3.0.0.RELEASE.jar:na]
    at com.github.vanroy.springdata.jest.JestElasticsearchTemplate.putMapping(JestElasticsearchTemplate.java:270) ~[spring-data-jest-3.0.0.RELEASE.jar:na]
    at com.github.vanroy.springdata.jest.JestElasticsearchTemplate.putMapping(JestElasticsearchTemplate.java:236) ~[spring-data-jest-3.0.0.RELEASE.jar:na]
    at org.springframework.data.elasticsearch.repository.support.AbstractElasticsearchRepository.putMapping(AbstractElasticsearchRepository.java:100) ~[spring-data-elasticsearch-3.0.9.RELEASE.jar:3.0.9.RELEASE]
    at org.springframework.data.elasticsearch.repository.support.AbstractElasticsearchRepository.<init>(AbstractElasticsearchRepository.java:88) ~[spring-data-elasticsearch-3.0.9.RELEASE.jar:3.0.9.RELEASE]
    at org.springframework.data.elasticsearch.repository.support.NumberKeyedRepository.<init>(NumberKeyedRepository.java:36) ~[spring-data-elasticsearch-3.0.9.RELEASE.jar:3.0.9.RELEASE]
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.8.0_172]
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[na:1.8.0_172]
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:1.8.0_172]
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[na:1.8.0_172]
    at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:170) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
    ... 55 common frames omitted
Caused by: com.github.vanroy.springdata.jest.exception.JestElasticsearchException: Cannot execute jest action , response code : 400 , error : {"root_cause":[{"type":"illegal_argument_exception","reason":"Could not convert [id.index] to boolean"}],"type":"illegal_argument_exception","reason":"Could not convert [id.index] to boolean","caused_by":{"type":"illegal_argument_exception","reason":"Failed to parse value [not_analyzed] as only [true] or [false] are allowed."}} , message : null
    at com.github.vanroy.springdata.jest.mapper.DefaultErrorMapper.mapError(DefaultErrorMapper.java:30) ~[spring-data-jest-3.0.0.RELEASE.jar:na]
    at com.github.vanroy.springdata.jest.JestElasticsearchTemplate.execute(JestElasticsearchTemplate.java:1215) ~[spring-data-jest-3.0.0.RELEASE.jar:na]
    at com.github.vanroy.springdata.jest.JestElasticsearchTemplate.executeWithAcknowledge(JestElasticsearchTemplate.java:1225) ~[spring-data-jest-3.0.0.RELEASE.jar:na]
    at com.github.vanroy.springdata.jest.JestElasticsearchTemplate.putMapping(JestElasticsearchTemplate.java:261) ~[spring-data-jest-3.0.0.RELEASE.jar:na]
    ... 65 common frames omitted
tuser4198 commented 6 years ago

I remove @Field(type = FieldType.Integer) on modle field id, then OK. But I found another problem: when I insert then bulk update, An Bulk Exception will throws. However when I insert , sleep(1000), then bulk update ,everything is OK. So Maybe this because of aio?