Open ghost opened 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.
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] ------------------------------------------------------------------------
Hi @nitinvavdiya , Thanks for your feedback.
Can you try to add this dependency :
I download this project and change aws elastic search url with mine I am not able to start project error:
Maven tree: