VanRoy / spring-data-jest

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

Can not run sample project in my local with aws elastic search #106

Open ghost opened 5 years ago

ghost commented 5 years ago

I download this project and change aws elastic search url with mine I am not able to start project error:

Exception in thread "main" org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'sampleJestApplication': Unsatisfied dependency expressed through field 'repository'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'customerRepository': Invocation of init method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.elasticsearch.repository.support.SimpleElasticsearchRepository]: Constructor threw exception; nested exception is com.amazonaws.SdkClientException: Unable to load AWS credentials from any provider in the chain: [com.amazonaws.auth.EC2ContainerCredentialsProviderWrapper@54acff7d: Unable to load credentials from service endpoint, com.amazonaws.auth.profile.ProfileCredentialsProvider@7af1cd63: profile file cannot be null]
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:596)
    at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:90)
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:374)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1378)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:575)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:498)
    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:846)
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:863)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:546)
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:775)
    at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:316)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1260)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1248)
    at sample.data.jest.aws.SampleJestApplication.main(SampleJestApplication.java:67)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'customerRepository': Invocation of init method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.elasticsearch.repository.support.SimpleElasticsearchRepository]: Constructor threw exception; nested exception is com.amazonaws.SdkClientException: Unable to load AWS credentials from any provider in the chain: [com.amazonaws.auth.EC2ContainerCredentialsProviderWrapper@54acff7d: Unable to load credentials from service endpoint, com.amazonaws.auth.profile.ProfileCredentialsProvider@7af1cd63: profile file cannot be null]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1745)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:576)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:498)
    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.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:277)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1244)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1164)
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:593)
    ... 18 more
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.elasticsearch.repository.support.SimpleElasticsearchRepository]: Constructor threw exception; nested exception is com.amazonaws.SdkClientException: Unable to load AWS credentials from any provider in the chain: [com.amazonaws.auth.EC2ContainerCredentialsProviderWrapper@54acff7d: Unable to load credentials from service endpoint, com.amazonaws.auth.profile.ProfileCredentialsProvider@7af1cd63: profile file cannot be null]
    at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:184)
    at org.springframework.data.repository.core.support.RepositoryFactorySupport.lambda$getTargetRepositoryViaReflection$3(RepositoryFactorySupport.java:513)
    at java.util.Optional.map(Optional.java:215)
    at org.springframework.data.repository.core.support.RepositoryFactorySupport.getTargetRepositoryViaReflection(RepositoryFactorySupport.java:513)
    at org.springframework.data.repository.core.support.RepositoryFactorySupport.getTargetRepositoryViaReflection(RepositoryFactorySupport.java:498)
    at org.springframework.data.elasticsearch.repository.support.ElasticsearchRepositoryFactory.getTargetRepository(ElasticsearchRepositoryFactory.java:74)
    at org.springframework.data.repository.core.support.RepositoryFactorySupport.getRepository(RepositoryFactorySupport.java:305)
    at org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.lambda$afterPropertiesSet$5(RepositoryFactoryBeanSupport.java:297)
    at org.springframework.data.util.Lazy.getNullable(Lazy.java:211)
    at org.springframework.data.util.Lazy.get(Lazy.java:94)
    at org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.afterPropertiesSet(RepositoryFactoryBeanSupport.java:300)
    at org.springframework.data.elasticsearch.repository.support.ElasticsearchRepositoryFactoryBean.afterPropertiesSet(ElasticsearchRepositoryFactoryBean.java:67)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1804)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1741)
    ... 28 more
Caused by: com.amazonaws.SdkClientException: Unable to load AWS credentials from any provider in the chain: [com.amazonaws.auth.EC2ContainerCredentialsProviderWrapper@54acff7d: Unable to load credentials from service endpoint, com.amazonaws.auth.profile.ProfileCredentialsProvider@7af1cd63: profile file cannot be null]
    at com.amazonaws.auth.AWSCredentialsProviderChain.getCredentials(AWSCredentialsProviderChain.java:136)
    at vc.inreach.aws.request.AWSSigner.getSignedHeaders(AWSSigner.java:104)
    at vc.inreach.aws.request.AWSSigningRequestInterceptor.process(AWSSigningRequestInterceptor.java:32)
    at org.apache.http.protocol.ImmutableHttpProcessor.process(ImmutableHttpProcessor.java:133)
    at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:183)
    at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89)
    at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
    at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185)
    at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
    at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:108)
    at io.searchbox.client.http.JestHttpClient.executeRequest(JestHttpClient.java:136)
    at io.searchbox.client.http.JestHttpClient.execute(JestHttpClient.java:70)
    at io.searchbox.client.http.JestHttpClient.execute(JestHttpClient.java:63)
    at com.github.vanroy.springdata.jest.JestElasticsearchTemplate.execute(JestElasticsearchTemplate.java:1123)
    at com.github.vanroy.springdata.jest.JestElasticsearchTemplate.executeWithAcknowledge(JestElasticsearchTemplate.java:1136)
    at com.github.vanroy.springdata.jest.JestElasticsearchTemplate.indexExists(JestElasticsearchTemplate.java:855)
    at com.github.vanroy.springdata.jest.JestElasticsearchTemplate.createIndexIfNotCreated(JestElasticsearchTemplate.java:1330)
    at com.github.vanroy.springdata.jest.JestElasticsearchTemplate.createIndex(JestElasticsearchTemplate.java:178)
    at org.springframework.data.elasticsearch.repository.support.AbstractElasticsearchRepository.createIndex(AbstractElasticsearchRepository.java:96)
    at org.springframework.data.elasticsearch.repository.support.AbstractElasticsearchRepository.<init>(AbstractElasticsearchRepository.java:87)
    at org.springframework.data.elasticsearch.repository.support.SimpleElasticsearchRepository.<init>(SimpleElasticsearchRepository.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:172)
    ... 41 more

Process finished with exit code 1

Maven tree:


[INFO] com.github.vanroy:spring-boot-sample-data-jest-aws:jar:3.2.1.RELEASE
[INFO] +- org.springframework.boot:spring-boot-starter:jar:2.1.2.RELEASE:compile
[INFO] |  +- org.springframework.boot:spring-boot:jar:2.1.2.RELEASE:compile
[INFO] |  |  \- org.springframework:spring-context:jar:5.1.4.RELEASE:compile
[INFO] |  |     +- org.springframework:spring-aop:jar:5.1.4.RELEASE:compile
[INFO] |  |     +- org.springframework:spring-beans:jar:5.1.4.RELEASE:compile
[INFO] |  |     \- org.springframework:spring-expression:jar:5.1.4.RELEASE:compile
[INFO] |  +- org.springframework.boot:spring-boot-autoconfigure:jar:2.1.2.RELEASE:compile
[INFO] |  +- org.springframework.boot:spring-boot-starter-logging:jar:2.1.2.RELEASE:compile
[INFO] |  |  +- ch.qos.logback:logback-classic:jar:1.1.9:test
[INFO] |  |  |  \- ch.qos.logback:logback-core:jar:1.2.3:test
[INFO] |  |  +- org.apache.logging.log4j:log4j-to-slf4j:jar:2.11.1: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.springframework:spring-core:jar:5.1.4.RELEASE:compile
[INFO] |  |  \- org.springframework:spring-jcl:jar:5.1.4.RELEASE:compile
[INFO] |  \- org.yaml:snakeyaml:jar:1.23:compile
[INFO] +- com.github.vanroy:spring-boot-starter-data-jest:jar:3.2.1.RELEASE:compile
[INFO] |  +- com.github.vanroy:spring-data-jest:jar:3.2.1.RELEASE:compile
[INFO] |  |  +- org.springframework.data:spring-data-elasticsearch:jar:3.1.3.RELEASE:compile
[INFO] |  |  |  +- org.springframework:spring-tx:jar:5.1.4.RELEASE:compile
[INFO] |  |  |  +- joda-time:joda-time:jar:2.10.1:compile
[INFO] |  |  |  +- com.fasterxml.jackson.core:jackson-core:jar:2.9.8:compile
[INFO] |  |  |  \- com.fasterxml.jackson.core:jackson-databind:jar:2.9.8:compile
[INFO] |  |  |     \- com.fasterxml.jackson.core:jackson-annotations:jar:2.9.0:compile
[INFO] |  |  +- org.springframework.data:spring-data-commons:jar:2.1.4.RELEASE:compile
[INFO] |  |  +- org.elasticsearch:elasticsearch:jar:6.4.3:compile
[INFO] |  |  |  +- org.elasticsearch:elasticsearch-core:jar:6.4.3:compile
[INFO] |  |  |  +- org.elasticsearch:elasticsearch-secure-sm:jar:6.4.3:compile
[INFO] |  |  |  +- org.elasticsearch:elasticsearch-x-content:jar:6.4.3:compile
[INFO] |  |  |  |  +- com.fasterxml.jackson.dataformat:jackson-dataformat-smile:jar:2.9.8:compile
[INFO] |  |  |  |  +- com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:jar:2.9.8:compile
[INFO] |  |  |  |  \- com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:jar:2.9.8:compile
[INFO] |  |  |  +- org.apache.lucene:lucene-core:jar:7.4.0:compile
[INFO] |  |  |  +- org.apache.lucene:lucene-analyzers-common:jar:7.4.0:compile
[INFO] |  |  |  +- org.apache.lucene:lucene-backward-codecs:jar:7.4.0:compile
[INFO] |  |  |  +- org.apache.lucene:lucene-grouping:jar:7.4.0:compile
[INFO] |  |  |  +- org.apache.lucene:lucene-highlighter:jar:7.4.0:compile
[INFO] |  |  |  +- org.apache.lucene:lucene-join:jar:7.4.0:compile
[INFO] |  |  |  +- org.apache.lucene:lucene-memory:jar:7.4.0:compile
[INFO] |  |  |  +- org.apache.lucene:lucene-misc:jar:7.4.0:compile
[INFO] |  |  |  +- org.apache.lucene:lucene-queries:jar:7.4.0:compile
[INFO] |  |  |  +- org.apache.lucene:lucene-queryparser:jar:7.4.0:compile
[INFO] |  |  |  +- org.apache.lucene:lucene-sandbox:jar:7.4.0:compile
[INFO] |  |  |  +- org.apache.lucene:lucene-spatial:jar:7.4.0:compile
[INFO] |  |  |  +- org.apache.lucene:lucene-spatial-extras:jar:7.4.0:compile
[INFO] |  |  |  +- org.apache.lucene:lucene-spatial3d:jar:7.4.0:compile
[INFO] |  |  |  +- org.apache.lucene:lucene-suggest:jar:7.4.0:compile
[INFO] |  |  |  +- org.elasticsearch:elasticsearch-cli:jar:6.4.3:compile
[INFO] |  |  |  |  \- net.sf.jopt-simple:jopt-simple:jar:5.0.2:compile
[INFO] |  |  |  +- com.carrotsearch:hppc:jar:0.7.1:compile
[INFO] |  |  |  +- com.tdunning:t-digest:jar:3.2:compile
[INFO] |  |  |  +- org.hdrhistogram:HdrHistogram:jar:2.1.9:compile
[INFO] |  |  |  \- org.elasticsearch:jna:jar:4.5.1:compile
[INFO] |  |  +- org.elasticsearch.client:transport:jar:6.4.3:compile
[INFO] |  |  |  +- org.elasticsearch.plugin:reindex-client:jar:6.4.3:compile
[INFO] |  |  |  |  \- org.elasticsearch.client:elasticsearch-rest-client:jar:6.4.3:compile
[INFO] |  |  |  +- org.elasticsearch.plugin:lang-mustache-client:jar:6.4.3:compile
[INFO] |  |  |  |  \- com.github.spullara.mustache.java:compiler:jar:0.9.3:compile
[INFO] |  |  |  +- org.elasticsearch.plugin:percolator-client:jar:6.4.3:compile
[INFO] |  |  |  +- org.elasticsearch.plugin:parent-join-client:jar:6.4.3:compile
[INFO] |  |  |  \- org.elasticsearch.plugin:rank-eval-client:jar:6.4.3:compile
[INFO] |  |  +- org.elasticsearch.plugin:transport-netty4-client:jar:6.4.3:compile
[INFO] |  |  |  +- io.netty:netty-buffer:jar:4.1.31.Final:compile
[INFO] |  |  |  +- io.netty:netty-codec:jar:4.1.31.Final:compile
[INFO] |  |  |  +- io.netty:netty-codec-http:jar:4.1.31.Final:compile
[INFO] |  |  |  +- io.netty:netty-common:jar:4.1.31.Final:compile
[INFO] |  |  |  +- io.netty:netty-handler:jar:4.1.31.Final:compile
[INFO] |  |  |  +- io.netty:netty-resolver:jar:4.1.31.Final:compile
[INFO] |  |  |  \- io.netty:netty-transport:jar:4.1.31.Final:compile
[INFO] |  |  +- commons-logging:commons-logging:jar:1.2:compile
[INFO] |  |  +- io.searchbox:jest:jar:6.3.1:compile
[INFO] |  |  |  +- io.searchbox:jest-common:jar:6.3.1:compile
[INFO] |  |  |  +- org.apache.httpcomponents:httpcore-nio:jar:4.4.10:compile
[INFO] |  |  |  \- org.apache.httpcomponents:httpasyncclient:jar:4.1.4:compile
[INFO] |  |  \- com.google.code.gson:gson:jar:2.8.0:compile
[INFO] |  +- net.java.dev.jna:jna:jar:4.5.2:compile
[INFO] |  \- org.apache.logging.log4j:log4j-api:jar:2.7:test
[INFO] +- org.springframework.boot:spring-boot-starter-test:jar:2.1.2.RELEASE:test
[INFO] |  +- org.springframework.boot:spring-boot-test:jar:2.1.2.RELEASE:test
[INFO] |  +- org.springframework.boot:spring-boot-test-autoconfigure:jar:2.1.2.RELEASE:test
[INFO] |  +- com.jayway.jsonpath:json-path:jar:2.4.0:test
[INFO] |  |  \- net.minidev:json-smart:jar:2.3:test
[INFO] |  |     \- net.minidev:accessors-smart:jar:1.2:test
[INFO] |  |        \- org.ow2.asm:asm:jar:5.0.4:test
[INFO] |  +- junit:junit:jar:4.12:test
[INFO] |  +- org.assertj:assertj-core:jar:3.11.1:test
[INFO] |  +- org.mockito:mockito-core:jar:1.10.19:test
[INFO] |  |  \- org.objenesis:objenesis:jar:2.1:test
[INFO] |  +- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] |  +- org.hamcrest:hamcrest-library:jar:1.3:test
[INFO] |  +- org.skyscreamer:jsonassert:jar:1.5.0:test
[INFO] |  |  \- com.vaadin.external.google:android-json:jar:0.0.20131108.vaadin1:test
[INFO] |  +- org.springframework:spring-test:jar:5.1.4.RELEASE:test
[INFO] |  \- org.xmlunit:xmlunit-core:jar:2.6.2:test
[INFO] +- vc.inreach.aws:aws-signing-request-interceptor:jar:0.0.21:compile
[INFO] |  +- com.google.guava:guava:jar:18.0:compile
[INFO] |  +- commons-codec:commons-codec:jar:1.11:compile
[INFO] |  +- org.apache.httpcomponents:httpcore:jar:4.4.10:compile
[INFO] |  \- org.apache.httpcomponents:httpclient:jar:4.5.6:compile
[INFO] \- org.springframework.cloud:spring-cloud-aws-autoconfigure:jar:2.0.0.RELEASE:compile
[INFO]    +- org.springframework.cloud:spring-cloud-aws-context:jar:2.0.0.RELEASE:compile
[INFO]    |  \- org.springframework.cloud:spring-cloud-aws-core:jar:2.0.0.RELEASE:compile
[INFO]    |     +- com.amazonaws:aws-java-sdk-core:jar:1.11.336:compile
[INFO]    |     |  \- software.amazon.ion:ion-java:jar:1.0.2:compile
[INFO]    |     +- com.amazonaws:aws-java-sdk-s3:jar:1.11.336:compile
[INFO]    |     |  +- com.amazonaws:aws-java-sdk-kms:jar:1.11.336:compile
[INFO]    |     |  \- com.amazonaws:jmespath-java:jar:1.11.336:compile
[INFO]    |     +- com.amazonaws:aws-java-sdk-ec2:jar:1.11.336:compile
[INFO]    |     \- com.amazonaws:aws-java-sdk-cloudformation:jar:1.11.336:compile
[INFO]    \- org.slf4j:slf4j-api:jar:1.7.25:compile
VanRoy commented 5 years ago

Hi,

You can remove this two dependencies if you test on hosted ES :

This dependencies auto-configure connection to ES hosted on AWS.

Julien.

ghost commented 5 years ago

After removing, I am getting below error :


Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/logging/log4j/Level
    at org.elasticsearch.common.logging.Loggers.<clinit>(Loggers.java:50)
    at org.elasticsearch.search.builder.SearchSourceBuilder.<clinit>(SearchSourceBuilder.java:82)
    at com.github.vanroy.springdata.jest.JestElasticsearchTemplate.prepareScroll(JestElasticsearchTemplate.java:881)
    at com.github.vanroy.springdata.jest.JestElasticsearchTemplate.prepareScroll(JestElasticsearchTemplate.java:876)
    at com.github.vanroy.springdata.jest.JestElasticsearchTemplate.startScroll(JestElasticsearchTemplate.java:967)
    at com.github.vanroy.springdata.jest.JestElasticsearchTemplate.delete(JestElasticsearchTemplate.java:794)
    at org.springframework.data.elasticsearch.repository.support.AbstractElasticsearchRepository.deleteAll(AbstractElasticsearchRepository.java:257)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.springframework.data.repository.core.support.RepositoryComposition$RepositoryFragments.invoke(RepositoryComposition.java:359)
    at org.springframework.data.repository.core.support.RepositoryComposition.invoke(RepositoryComposition.java:200)
    at org.springframework.data.repository.core.support.RepositoryFactorySupport$ImplementationMethodExecutionInterceptor.invoke(RepositoryFactorySupport.java:644)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
    at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.doInvoke(RepositoryFactorySupport.java:608)
    at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.lambda$invoke$3(RepositoryFactorySupport.java:595)
    at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:595)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
    at org.springframework.data.projection.DefaultMethodInvokingMethodInterceptor.invoke(DefaultMethodInvokingMethodInterceptor.java:59)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
    at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:93)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
    at org.springframework.data.repository.core.support.SurroundingTransactionDetectorMethodInterceptor.invoke(SurroundingTransactionDetectorMethodInterceptor.java:61)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)
    at com.sun.proxy.$Proxy41.deleteAll(Unknown Source)
    at sample.data.jest.aws.SampleJestApplication.run(SampleJestApplication.java:34)
    at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:813)
    at org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:797)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:324)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1260)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1248)
    at sample.data.jest.aws.SampleJestApplication.main(SampleJestApplication.java:67)
Caused by: java.lang.ClassNotFoundException: org.apache.logging.log4j.Level
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    ... 34 more

Maven tree:


[INFO] Scanning for projects...
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] Building Spring Boot Data Jest AWS Sample 3.2.1.RELEASE
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ spring-boot-sample-data-jest-aws ---
[INFO] com.github.vanroy:spring-boot-sample-data-jest-aws:jar:3.2.1.RELEASE
[INFO] +- org.springframework.boot:spring-boot-starter:jar:2.1.2.RELEASE:compile
[INFO] |  +- org.springframework.boot:spring-boot:jar:2.1.2.RELEASE:compile
[INFO] |  |  \- org.springframework:spring-context:jar:5.1.4.RELEASE:compile
[INFO] |  |     +- org.springframework:spring-aop:jar:5.1.4.RELEASE:compile
[INFO] |  |     +- org.springframework:spring-beans:jar:5.1.4.RELEASE:compile
[INFO] |  |     \- org.springframework:spring-expression:jar:5.1.4.RELEASE:compile
[INFO] |  +- org.springframework.boot:spring-boot-autoconfigure:jar:2.1.2.RELEASE:compile
[INFO] |  +- org.springframework.boot:spring-boot-starter-logging:jar:2.1.2.RELEASE:compile
[INFO] |  |  +- ch.qos.logback:logback-classic:jar:1.1.9:test
[INFO] |  |  |  \- ch.qos.logback:logback-core:jar:1.2.3:test
[INFO] |  |  +- org.apache.logging.log4j:log4j-to-slf4j:jar:2.11.1: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.springframework:spring-core:jar:5.1.4.RELEASE:compile
[INFO] |  |  \- org.springframework:spring-jcl:jar:5.1.4.RELEASE:compile
[INFO] |  \- org.yaml:snakeyaml:jar:1.23:compile
[INFO] +- com.github.vanroy:spring-boot-starter-data-jest:jar:3.2.1.RELEASE:compile
[INFO] |  +- com.github.vanroy:spring-data-jest:jar:3.2.1.RELEASE:compile
[INFO] |  |  +- org.springframework.data:spring-data-elasticsearch:jar:3.1.3.RELEASE:compile
[INFO] |  |  |  +- org.springframework:spring-tx:jar:5.1.4.RELEASE:compile
[INFO] |  |  |  +- joda-time:joda-time:jar:2.10.1:compile
[INFO] |  |  |  +- com.fasterxml.jackson.core:jackson-core:jar:2.9.8:compile
[INFO] |  |  |  \- com.fasterxml.jackson.core:jackson-databind:jar:2.9.8:compile
[INFO] |  |  |     \- com.fasterxml.jackson.core:jackson-annotations:jar:2.9.0:compile
[INFO] |  |  +- org.springframework.data:spring-data-commons:jar:2.1.4.RELEASE:compile
[INFO] |  |  +- org.elasticsearch:elasticsearch:jar:6.4.3:compile
[INFO] |  |  |  +- org.elasticsearch:elasticsearch-core:jar:6.4.3:compile
[INFO] |  |  |  +- org.elasticsearch:elasticsearch-secure-sm:jar:6.4.3:compile
[INFO] |  |  |  +- org.elasticsearch:elasticsearch-x-content:jar:6.4.3:compile
[INFO] |  |  |  |  +- com.fasterxml.jackson.dataformat:jackson-dataformat-smile:jar:2.9.8:compile
[INFO] |  |  |  |  +- com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:jar:2.9.8:compile
[INFO] |  |  |  |  \- com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:jar:2.9.8:compile
[INFO] |  |  |  +- org.apache.lucene:lucene-core:jar:7.4.0:compile
[INFO] |  |  |  +- org.apache.lucene:lucene-analyzers-common:jar:7.4.0:compile
[INFO] |  |  |  +- org.apache.lucene:lucene-backward-codecs:jar:7.4.0:compile
[INFO] |  |  |  +- org.apache.lucene:lucene-grouping:jar:7.4.0:compile
[INFO] |  |  |  +- org.apache.lucene:lucene-highlighter:jar:7.4.0:compile
[INFO] |  |  |  +- org.apache.lucene:lucene-join:jar:7.4.0:compile
[INFO] |  |  |  +- org.apache.lucene:lucene-memory:jar:7.4.0:compile
[INFO] |  |  |  +- org.apache.lucene:lucene-misc:jar:7.4.0:compile
[INFO] |  |  |  +- org.apache.lucene:lucene-queries:jar:7.4.0:compile
[INFO] |  |  |  +- org.apache.lucene:lucene-queryparser:jar:7.4.0:compile
[INFO] |  |  |  +- org.apache.lucene:lucene-sandbox:jar:7.4.0:compile
[INFO] |  |  |  +- org.apache.lucene:lucene-spatial:jar:7.4.0:compile
[INFO] |  |  |  +- org.apache.lucene:lucene-spatial-extras:jar:7.4.0:compile
[INFO] |  |  |  +- org.apache.lucene:lucene-spatial3d:jar:7.4.0:compile
[INFO] |  |  |  +- org.apache.lucene:lucene-suggest:jar:7.4.0:compile
[INFO] |  |  |  +- org.elasticsearch:elasticsearch-cli:jar:6.4.3:compile
[INFO] |  |  |  |  \- net.sf.jopt-simple:jopt-simple:jar:5.0.2:compile
[INFO] |  |  |  +- com.carrotsearch:hppc:jar:0.7.1:compile
[INFO] |  |  |  +- com.tdunning:t-digest:jar:3.2:compile
[INFO] |  |  |  +- org.hdrhistogram:HdrHistogram:jar:2.1.9:compile
[INFO] |  |  |  \- org.elasticsearch:jna:jar:4.5.1:compile
[INFO] |  |  +- org.elasticsearch.client:transport:jar:6.4.3:compile
[INFO] |  |  |  +- org.elasticsearch.plugin:reindex-client:jar:6.4.3:compile
[INFO] |  |  |  |  \- org.elasticsearch.client:elasticsearch-rest-client:jar:6.4.3:compile
[INFO] |  |  |  +- org.elasticsearch.plugin:lang-mustache-client:jar:6.4.3:compile
[INFO] |  |  |  |  \- com.github.spullara.mustache.java:compiler:jar:0.9.3:compile
[INFO] |  |  |  +- org.elasticsearch.plugin:percolator-client:jar:6.4.3:compile
[INFO] |  |  |  +- org.elasticsearch.plugin:parent-join-client:jar:6.4.3:compile
[INFO] |  |  |  \- org.elasticsearch.plugin:rank-eval-client:jar:6.4.3:compile
[INFO] |  |  +- org.elasticsearch.plugin:transport-netty4-client:jar:6.4.3:compile
[INFO] |  |  |  +- io.netty:netty-buffer:jar:4.1.31.Final:compile
[INFO] |  |  |  +- io.netty:netty-codec:jar:4.1.31.Final:compile
[INFO] |  |  |  +- io.netty:netty-codec-http:jar:4.1.31.Final:compile
[INFO] |  |  |  +- io.netty:netty-common:jar:4.1.31.Final:compile
[INFO] |  |  |  +- io.netty:netty-handler:jar:4.1.31.Final:compile
[INFO] |  |  |  +- io.netty:netty-resolver:jar:4.1.31.Final:compile
[INFO] |  |  |  \- io.netty:netty-transport:jar:4.1.31.Final:compile
[INFO] |  |  +- commons-logging:commons-logging:jar:1.2:compile
[INFO] |  |  +- io.searchbox:jest:jar:6.3.1:compile
[INFO] |  |  |  +- io.searchbox:jest-common:jar:6.3.1:compile
[INFO] |  |  |  |  \- com.google.guava:guava:jar:21.0: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.4:compile
[INFO] |  |  \- com.google.code.gson:gson:jar:2.8.0:compile
[INFO] |  +- net.java.dev.jna:jna:jar:4.5.2:compile
[INFO] |  \- org.apache.logging.log4j:log4j-api:jar:2.7:test
[INFO] \- org.springframework.boot:spring-boot-starter-test:jar:2.1.2.RELEASE:test
[INFO]    +- org.springframework.boot:spring-boot-test:jar:2.1.2.RELEASE:test
[INFO]    +- org.springframework.boot:spring-boot-test-autoconfigure:jar:2.1.2.RELEASE:test
[INFO]    +- com.jayway.jsonpath:json-path:jar:2.4.0:test
[INFO]    |  +- net.minidev:json-smart:jar:2.3:test
[INFO]    |  |  \- net.minidev:accessors-smart:jar:1.2:test
[INFO]    |  |     \- org.ow2.asm:asm:jar:5.0.4:test
[INFO]    |  \- org.slf4j:slf4j-api:jar:1.7.25:compile
[INFO]    +- junit:junit:jar:4.12:test
[INFO]    +- org.assertj:assertj-core:jar:3.11.1:test
[INFO]    +- org.mockito:mockito-core:jar:1.10.19:test
[INFO]    |  \- org.objenesis:objenesis:jar:2.1:test
[INFO]    +- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO]    +- org.hamcrest:hamcrest-library:jar:1.3:test
[INFO]    +- org.skyscreamer:jsonassert:jar:1.5.0:test
[INFO]    |  \- com.vaadin.external.google:android-json:jar:0.0.20131108.vaadin1:test
[INFO]    +- org.springframework:spring-test:jar:5.1.4.RELEASE:test
[INFO]    \- org.xmlunit:xmlunit-core:jar:2.6.2:test
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
VanRoy commented 5 years ago

Hi @nitinvavdiya , Thanks for your feedback.

Can you try to add this dependency :

org.apache.logging.log4j log4j-core