Closed spring-projects-issues closed 5 years ago
Maciej Zerkowski commented
I have added explicit:
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-commons</artifactId>
<version>${springdata.commons}</version>
</dependency>
and ClassNotFoundException disappeared but now getting:
12:10:12.208 | ERROR | | main | o.s.b.SpringApplication | Application startup failed
java.lang.NoSuchMethodError: org.springframework.data.repository.config.AnnotationRepositoryConfigurationSource.<init>(Lorg/springframework/core/type/AnnotationMetadata;Ljava/lang/Class;Lorg/springframework/core/io/ResourceLoader;Lorg/springframework/core/env/Environm
ent;)V
at org.springframework.boot.autoconfigure.data.AbstractRepositoryConfigurationSourceSupport$1.<init>(AbstractRepositoryConfigurationSourceSupport.java:67)
at org.springframework.boot.autoconfigure.data.AbstractRepositoryConfigurationSourceSupport.getConfigurationSource(AbstractRepositoryConfigurationSourceSupport.java:66)
at org.springframework.boot.autoconfigure.data.AbstractRepositoryConfigurationSourceSupport.registerBeanDefinitions(AbstractRepositoryConfigurationSourceSupport.java:58)
at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsFromRegistrars(ConfigurationClassBeanDefinitionReader.java:352)
at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForConfigurationClass(ConfigurationClassBeanDefinitionReader.java:143)
at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitions(ConfigurationClassBeanDefinitionReader.java:116)
at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:336)
at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:246)
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:270)
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:93)
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:686)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:524)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:761)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:371)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:315)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1186)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1175)
at xxx.Application.main(Application.java:14)
12:10:12.208 | INFO | | main | o.s.b.c.e.AnnotationConfigEmbeddedWebApplicationContext | Closing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@7f9ab969: startup date [Thu Sep 14 12:10:10 CEST 2017]; parent: org.springframewo
rk.context.annotation.AnnotationConfigApplicationContext@222eb8aa
12:10:12.208 | WARN | | main | o.s.b.c.e.AnnotationConfigEmbeddedWebApplicationContext | Exception thrown from LifecycleProcessor on context close
java.lang.IllegalStateException: LifecycleProcessor not initialized - call 'refresh' before invoking lifecycle methods via the context: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@7f9ab969: startup date [Thu Sep 14 12:10:10
CEST 2017]; parent: org.springframework.context.annotation.AnnotationConfigApplicationContext@222eb8aa
at org.springframework.context.support.AbstractApplicationContext.getLifecycleProcessor(AbstractApplicationContext.java:417)
at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1002)
at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:961)
at org.springframework.boot.SpringApplication.handleRunFailure(SpringApplication.java:818)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:326)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1186)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1175)
at xxx.Application.main(Application.java:14)
12:10:12.218 | ERROR | | main | o.s.b.f.s.DefaultListableBeanFactory | Destroy method on bean with name 'org.springframework.boot.autoconfigure.internalCachingMetadataReaderFactory' threw an exception
java.lang.IllegalStateException: ApplicationEventMulticaster not initialized - call 'refresh' before multicasting events via the context: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@7f9ab969: startup date [Thu Sep 14 12:10:1
0 CEST 2017]; parent: org.springframework.context.annotation.AnnotationConfigApplicationContext@222eb8aa
at org.springframework.context.support.AbstractApplicationContext.getApplicationEventMulticaster(AbstractApplicationContext.java:404)
at org.springframework.context.support.ApplicationListenerDetector.postProcessBeforeDestruction(ApplicationListenerDetector.java:97)
at org.springframework.beans.factory.support.DisposableBeanAdapter.destroy(DisposableBeanAdapter.java:253)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroyBean(DefaultSingletonBeanRegistry.java:578)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingleton(DefaultSingletonBeanRegistry.java:554)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.destroySingleton(DefaultListableBeanFactory.java:954)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingletons(DefaultSingletonBeanRegistry.java:523)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.destroySingletons(DefaultListableBeanFactory.java:961)
at org.springframework.context.support.AbstractApplicationContext.destroyBeans(AbstractApplicationContext.java:1033)
at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1009)
at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:961)
at org.springframework.boot.SpringApplication.handleRunFailure(SpringApplication.java:818)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:326)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1186)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1175)
at xxx.Application.main(Application.java:14)
Is it possible to mix Spring Boot 1.4.3 which uses 4.3.9.RELEASE Spring with spring-data-commons 2.0.0.RC2 which uses (via spring-data-build) 5.0.0.RC4 Spring version?
Zouhair LESSIQ commented
I have the same issue. I have Spring Boot 1.5.7.RELEASE and wanted to use Elasticsearch 5.6.0 with spring-data-elasticsearch and its 3.0.0.RC3
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.7.RELEASE</version>
</parent>
<properties>
<java.version>1.8</java.version>
<spring-data-releasetrain.version>Kay-RC3</spring-data-releasetrain.version>
<elasticsearch.version>5.6.0</elasticsearch.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-elasticsearch</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
Sebastian Luczak commented
Hi!
Any update regarding this issue? AFAIK currently spring data works only with Elasticsearch 2.x.... and Elasticsearch is 6.x already. Is there any chance that this issue would be fixed in some finite time?
Or is there any alternate solution to make it working together? (Spring Data + ES 6.x).
Cheers!
sothawo commented
I'm closing this as we are way behind these versions now
Maciej Zerkowski opened DATAES-393 and commented
I have Spring Boot 1.4.3.RELEASE and wanted to use Elasticsearch 5.5.0 with spring-data-elasticsearch and its 3.0.0.RC2 version but I'm getting the below exception. pom.xml config also below. Can you please advice if there is a way to make it working? 'Missing' class seems to be there: https://github.com/spring-projects/spring-data-commons/blob/2.0.0.RC2/src/main/java/org/springframework/data/mapping/model/Property.java According to the following page - https://github.com/spring-projects/spring-data-elasticsearch - it should work...
pom.xml
2 votes, 3 watchers