最初は、私のアプリケーションはspring-data-gemfire 1.9.7.RELEASEで正常に動作していました。しかし、春・データ・GemFireの2.0.1.RELEASEにアップグレードした後に、私のアプリケーションが起動に失敗すると、以下のように初期化エラーがスローされます。Spring Data GemFire 2.0.1.RELEASEが初期化エラーを投げています
C:\Dev\projects\JavaWebClient\web\target>java -jar web-0.0.1-SNAPSHOT.jar
. ____ _ __ _ _
/\/' __ _ ()_ __ __ _ \ \ \ \
(()_ | '_ | '| | '/` | \ \ \ \
\/ )| |)| | | | | || (| | ))))
' |____| .|| ||| |__, |////
=========|_|==============|___/=///_/
:: Spring Boot :: (v1.5.8.RELEASE)[info 2017/11/15 19:07:23.999 EAT tid=0x1] Starting JavaWebClientApplication v0.0.1-SNAPSHOT on MY-PC with PID 13804 (C:\Dev\projects\JavaWebClient\web\target\web-0.0.1-SNAPSHOT.jar started by edwards in C:\Dev\projects\JavaWebClient\web\target)
[info 2017/11/15 19:07:24.019 EAT tid=0x1] No active profile set, falling back to default profiles: default
[info 2017/11/15 19:07:24.812 EAT tid=0x1] Refreshing org.springframework.boot[email protected]6e6c3152: startup date [Wed Nov 15 19:07:24 EAT 2017]; root of context hierarchy
[error 2017/11/15 19:07:25.892 EAT tid=0x1] Application startup failed java.lang.NoSuchMethodError: org.springframework.data.repository.config.RepositoryConfigurationSource.getAttribute(Ljava/lang/String;)Ljava/util/Optional; at org.springframework.data.gemfire.repository.config.GemfireRepositoryConfigurationExtension.registerBeansForRoot(GemfireRepositoryConfigurationExtensi on.java:120) at org.springframework.data.repository.config.RepositoryConfigurationDelegate.registerRepositoriesIn(RepositoryConfigurationDelegate.java:116) at org.springframework.data.repository.config.RepositoryBeanDefinitionRegistrarSupport.registerBeanDefinitions(RepositoryBeanDefinitionRegistrarSupport. java:83) at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.lambda$loadBeanDefinitionsFromRegistrars$0(ConfigurationClassBeanDefini tionReader.java:360) at java.util.LinkedHashMap.forEach(Unknown Source) at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsFromRegistrars(ConfigurationClassBeanDefinitionReade r.java:359) at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForConfigurationClass(ConfigurationClassBeanDefiniti onReader.java:144) at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitions(ConfigurationClassBeanDefinitionReader.java:117) at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:328) at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:233) at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.ja va:273) at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:93) at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:693) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:531) at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122) at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:693) at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:360) at org.springframework.boot.SpringApplication.run(SpringApplication.java:303) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1118) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1107) at com.nftconsult.gemfire.web.JavaWebClientApplication.main(JavaWebClientApplication.java:173) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) at org.springframework.boot.loader.Launcher.launch(Launcher.java:87) at org.springframework.boot.loader.Launcher.launch(Launcher.java:50) at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51)
[info 2017/11/15 19:07:25.897 EAT tid=0x1] Closing org.springframework.boot[email protected]6e6c3152: startup date [Wed Nov 15 19:07:24 EAT 2017]; root of context hierarchy
[warn 2017/11/15 19:07:25.901 EAT tid=0x1] 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[email protected]6e6c3152: startup date [Wed Nov 15 19:07:24 EAT 2017]; root of context hierarchy at org.springframework.context.support.AbstractApplicationContext.getLifecycleProcessor(AbstractApplicationContext.java:433) at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1004) at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:963) at org.springframework.boot.SpringApplication.handleRunFailure(SpringApplication.java:750) at org.springframework.boot.SpringApplication.run(SpringApplication.java:314) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1118) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1107) at com.nftconsult.gemfire.web.JavaWebClientApplication.main(JavaWebClientApplication.java:173) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) at org.springframework.boot.loader.Launcher.launch(Launcher.java:87) at org.springframework.boot.loader.Launcher.launch(Launcher.java:50) at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51)
[error 2017/11/15 19:07:25.905 EAT tid=0x1] 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[email protected]6e6c3152: startup date [Wed Nov 15 19:07:24 EAT 2017]; root of context hierarchy at org.springframework.context.support.AbstractApplicationContext.getApplicationEventMulticaster(AbstractApplicationContext.java:420) at org.springframework.context.support.ApplicationListenerDetector.postProcessBeforeDestruction(ApplicationListenerDetector.java:95) at org.springframework.beans.factory.support.DisposableBeanAdapter.destroy(DisposableBeanAdapter.java:240) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroyBean(DefaultSingletonBeanRegistry.java:576) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingleton(DefaultSingletonBeanRegistry.java:552) at org.springframework.beans.factory.support.DefaultListableBeanFactory.destroySingleton(DefaultListableBeanFactory.java:953) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingletons(DefaultSingletonBeanRegistry.java:521) at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.destroySingletons(FactoryBeanRegistrySupport.java:227) at org.springframework.beans.factory.support.DefaultListableBeanFactory.destroySingletons(DefaultListableBeanFactory.java:960) at org.springframework.context.support.AbstractApplicationContext.destroyBeans(AbstractApplicationContext.java:1035) at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1011) at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:963) at org.springframework.boot.SpringApplication.handleRunFailure(SpringApplication.java:750) at org.springframework.boot.SpringApplication.run(SpringApplication.java:314) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1118) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1107) at com.nftconsult.gemfire.web.JavaWebClientApplication.main(JavaWebClientApplication.java:173) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) at org.springframework.boot.loader.Launcher.launch(Launcher.java:87) at org.springframework.boot.loader.Launcher.launch(Launcher.java:50) at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51)
C:\Dev\projects\JavaWebClient\web\target>
など詳細な説明については、確かに非常にありがとうございました。 あなたは間違いなく正しいですが、この問題は、Spring Data Commonsの互換性のないバージョンと、Spring Boot 1.5.8.RELEASEおよびSpring Data Kayで動作しない他のSpring Dependenciesを引き出すことによるものです。 最終的に私のアプリケーションをSpring Data Kayで最新のGAバージョンのSpring Boot 1.5.8.RELEASEで起動することができました。単にpom.xmlファイル spring.versionを5.0に設定するだけです。 1.RELEASE spring-data-releasetrain.version Kay-SR1 spring-shell.version to 1.2.0.RELEASE – Edwards