ClassCastException: OnWebApplicationCondition не может быть приведено к org.springframework.context.annotation.Condition - PullRequest
2 голосов
/ 05 мая 2020

Во время запуска локатора я указываю путь GEODE_HOME, а локатор пытается вызвать модуль management . Во время этого процесса я получаю следующее сообщение об ошибке.

Любые зацепки будут полезны. При условии, что эта проблема связана с gemfire-core версии 9.9.1. Также я использую весеннюю версию 2.1.11.RELEASE. Для смягчения я попытался использовать import spring-context и spring-boot-autoconfigure, но все еще та же ошибка.

Любые лиды будут полезны.

org.springframework.beans.factory.BeanDefinitionStoreException: Failed to process import candidates for configuration class [org.apache.geode.management.internal.rest.swagger.SwaggerConfig]; nested exception is java.lang.ClassCastException: org.springframework.boot.autoconfigure.condition.OnWebApplicationCondition cannot be cast to org.springframework.context.annotation.Condition
at org.springframework.context.annotation.ConfigurationClassParser.processImports(ConfigurationClassParser.java:621) ~[spring-context-4.3.23.RELEASE.jar:5.1.14.RELEASE]
at org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:304) ~[spring-context-4.3.23.RELEASE.jar:5.1.14.RELEASE]
at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:247) ~[spring-context-4.3.23.RELEASE.jar:5.1.14.RELEASE]
at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:192) ~[spring-context-4.3.23.RELEASE.jar:5.1.14.RELEASE]
at org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:297) ~[spring-context-4.3.23.RELEASE.jar:5.1.14.RELEASE]
at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:247) ~[spring-context-4.3.23.RELEASE.jar:5.1.14.RELEASE]
at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:192) ~[spring-context-4.3.23.RELEASE.jar:5.1.14.RELEASE]
at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:175) ~[spring-context-4.3.23.RELEASE.jar:5.1.14.RELEASE]
at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:308) ~[spring-context-4.3.23.RELEASE.jar:5.1.14.RELEASE]
at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:228) ~[spring-context-4.3.23.RELEASE.jar:5.1.14.RELEASE]
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:272) ~[spring-context-4.3.23.RELEASE.jar:5.1.14.RELEASE]
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:92) ~[spring-context-4.3.23.RELEASE.jar:5.1.14.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:687) ~[spring-context-5.1.14.RELEASE.jar:5.1.14.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:524) ~[spring-context-5.1.14.RELEASE.jar:5.1.14.RELEASE]
at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:668) ~[spring-webmvc-4.3.23.RELEASE.jar:5.1.14.RELEASE]
at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:634) ~[spring-webmvc-4.3.23.RELEASE.jar:5.1.14.RELEASE]
at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:682) ~[spring-webmvc-4.3.23.RELEASE.jar:5.1.14.RELEASE]
at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:553) ~[spring-webmvc-4.3.23.RELEASE.jar:5.1.14.RELEASE]
at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:494) ~[spring-webmvc-4.3.23.RELEASE.jar:5.1.14.RELEASE]
at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:171) [spring-webmvc-4.3.23.RELEASE.jar:5.1.14.RELEASE]
at javax.servlet.GenericServlet.init(GenericServlet.java:203) [javax.servlet-api-4.0.1.jar:4.0.1]
at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:599) [jetty-servlet-9.4.24.v20191120.jar:9.4.24.v20191120]
at org.eclipse.jetty.servlet.ServletHolder.initialize(ServletHolder.java:425) [jetty-servlet-9.4.24.v20191120.jar:9.4.24.v20191120]
at org.eclipse.jetty.servlet.ServletHandler.lambda$initialize$0(ServletHandler.java:751) [jetty-servlet-9.4.24.v20191120.jar:9.4.24.v20191120]
at java.util.stream.SortedOps$SizedRefSortingSink.end(SortedOps.java:352) ~[na:1.8.0_192]
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482) ~[na:1.8.0_192]
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) ~[na:1.8.0_192]
at java.util.stream.StreamSpliterators$WrappingSpliterator.forEachRemaining(StreamSpliterators.java:312) ~[na:1.8.0_192]
at java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:743) ~[na:1.8.0_192]
at java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:742) ~[na:1.8.0_192]
at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:580) ~[na:1.8.0_192]
at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:744) [jetty-servlet-9.4.24.v20191120.jar:9.4.24.v20191120]
at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:360) ~[jetty-servlet-9.4.24.v20191120.jar:9.4.24.v20191120]
at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1445) ~[jetty-webapp-9.4.24.v20191120.jar:9.4.24.v20191120]
at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1409) ~[jetty-webapp-9.4.24.v20191120.jar:9.4.24.v20191120]
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:822) ~[jetty-server-9.4.24.v20191120.jar:9.4.24.v20191120]
at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:275) ~[jetty-servlet-9.4.24.v20191120.jar:9.4.24.v20191120]
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:524) ~[jetty-webapp-9.4.24.v20191120.jar:9.4.24.v20191120]
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72) ~[jetty-util-9.4.24.v20191120.jar:9.4.24.v20191120]
at org.apache.geode.internal.cache.HttpService.addWebApplication(HttpService.java:175) ~[geode-core-9.9.1.jar:na]
at org.apache.geode.distributed.internal.InternalLocator.lambda$startClusterManagementService$1(InternalLocator.java:765) ~[geode-core-9.9.1.jar:na]
at java.util.Optional.ifPresent(Optional.java:159) ~[na:1.8.0_192]
at org.apache.geode.distributed.internal.InternalLocator.startClusterManagementService(InternalLocator.java:761) ~[geode-core-9.9.1.jar:na]
at org.apache.geode.distributed.internal.InternalLocator.startCache(InternalLocator.java:729) ~[geode-core-9.9.1.jar:na]
at org.apache.geode.distributed.internal.InternalLocator.startDistributedSystem(InternalLocator.java:708) ~[geode-core-9.9.1.jar:na]
at org.apache.geode.distributed.internal.InternalLocator.startLocator(InternalLocator.java:374) ~[geode-core-9.9.1.jar:na]
at org.apache.geode.distributed.LocatorLauncher.start(LocatorLauncher.java:679) ~[geode-core-9.9.1.jar:na]
at org.springframework.data.gemfire.LocatorFactoryBean.init(LocatorFactoryBean.java:111) ~[spring-data-gemfire-2.2.4.RELEASE.jar:2.2.4.RELEASE]
at org.springframework.data.gemfire.LocatorFactoryBean.afterPropertiesSet(LocatorFactoryBean.java:84) ~[spring-data-gemfire-2.2.4.RELEASE.jar:2.2.4.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1830) ~[spring-beans-5.1.14.RELEASE.jar:5.1.14.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1767) ~[spring-beans-5.1.14.RELEASE.jar:5.1.14.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:593) ~[spring-beans-5.1.14.RELEASE.jar:5.1.14.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515) ~[spring-beans-5.1.14.RELEASE.jar:5.1.14.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) ~[spring-beans-5.1.14.RELEASE.jar:5.1.14.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.1.14.RELEASE.jar:5.1.14.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318) ~[spring-beans-5.1.14.RELEASE.jar:5.1.14.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-5.1.14.RELEASE.jar:5.1.14.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:828) ~[spring-beans-5.1.14.RELEASE.jar:5.1.14.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:877) ~[spring-context-5.1.14.RELEASE.jar:5.1.14.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:549) ~[spring-context-5.1.14.RELEASE.jar:5.1.14.RELEASE]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141) ~[spring-boot-2.1.11.RELEASE.jar:2.1.11.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:744) ~[spring-boot-2.1.11.RELEASE.jar:2.1.11.RELEASE]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:391) ~[spring-boot-2.1.11.RELEASE.jar:2.1.11.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:312) ~[spring-boot-2.1.11.RELEASE.jar:2.1.11.RELEASE]
at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:140) ~[spring-boot-2.1.11.RELEASE.jar:2.1.11.RELEASE]
at com.capture.store.cache.locator.GemfireLocatorApplication.main(GemfireLocatorApplication.java:15) ~[classes/:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_192]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_192]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_192]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_192]
at org.springframework.boot.maven.AbstractRunMojo$LaunchRunner.run(AbstractRunMojo.java:543) ~[na:na]
at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_192]


Caused by: java.lang.ClassCastException: org.springframework.boot.autoconfigure.condition.OnWebApplicationCondition cannot be cast to org.springframework.context.annotation.Condition
at org.springframework.context.annotation.ConditionEvaluator.getCondition(ConditionEvaluator.java:120) ~[spring-context-4.3.23.RELEASE.jar:5.1.14.RELEASE]
at org.springframework.context.annotation.ConditionEvaluator.shouldSkip(ConditionEvaluator.java:89) ~[spring-context-4.3.23.RELEASE.jar:5.1.14.RELEASE]
at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:219) ~[spring-context-4.3.23.RELEASE.jar:5.1.14.RELEASE]
at org.springframework.context.annotation.ConfigurationClassParser.processImports(ConfigurationClassParser.java:611) ~[spring-context-4.3.23.RELEASE.jar:5.1.14.RELEASE]
... 71 common frames omitted
...