Reputation: 871
Running my Spring boot project in Java 10 and maven everything ran fine. Simply changing the JDK from 10 to 11 introduced the following error
emailer_1 | java.lang.IllegalStateException: Error processing condition on org.springframework.cloud.vault.config.VaultReactiveBootstrapConfiguration.reactiveVaultSessionManager
emailer_1 | at org.springframework.boot.autoconfigure.condition.SpringBootCondition.matches(SpringBootCondition.java:64)
emailer_1 | at org.springframework.context.annotation.ConditionEvaluator.shouldSkip(ConditionEvaluator.java:108)
emailer_1 | at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForBeanMethod(ConfigurationClassBeanDefinitionReader.java:181)
emailer_1 | at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForConfigurationClass(ConfigurationClassBeanDefinitionReader.java:141)
emailer_1 | at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitions(ConfigurationClassBeanDefinitionReader.java:117)
emailer_1 | at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:327)
emailer_1 | at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:232)
emailer_1 | at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:275)
| Caused by: java.lang.IllegalStateException: Failed to introspect Class [org.springframework.cloud.vault.config.VaultReactiveBootstrapConfiguration] from ClassLoader [org.springframework.boot.loader.LaunchedURLClassLoader@5d099f62]
emailer_1 | at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:680)
emailer_1 | at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:577)
emailer_1 | at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:562)
emailer_1 | at org.springframework.util.ReflectionUtils.getUniqueDeclaredMethods(ReflectionUtils.java:620)
emailer_1 | at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1705)
emailer_1 | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getTypeForFactoryMethod(AbstractAutowireCapableBeanFactory.java:721)
emailer_1 | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineTargetType(AbstractAutowireCapableBeanFactory.java:662)
emailer_1 | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:630)
emailer_1 | at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1491)
emailer_1 | at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1014)
emailer_1 | at org.springframework.boot.autoconfigure.condition.BeanTypeRegistry.addBeanTypeForNonAliasDefinition(BeanTypeRegistry.java:198)
emailer_1 | at org.springframework.boot.autoconfigure.condition.BeanTypeRegistry.addBeanTypeForNonAliasDefinition(BeanTypeRegistry.java:174)
emailer_1 | at org.springframework.boot.autoconfigure.condition.BeanTypeRegistry.addBeanType(BeanTypeRegistry.java:167)
emailer_1 | at org.springframework.boot.autoconfigure.condition.BeanTypeRegistry.lambda$updateTypesIfNecessary$3(BeanTypeRegistry.java:154)
emailer_1 | at java.base/java.util.Iterator.forEachRemaining(Iterator.java:133)
emailer_1 | at org.springframework.boot.autoconfigure.condition.BeanTypeRegistry.updateTypesIfNecessary(BeanTypeRegistry.java:152)
emailer_1 | at org.springframework.boot.autoconfigure.condition.BeanTypeRegistry.getNamesForType(BeanTypeRegistry.java:118)
emailer_1 | at org.springframework.boot.autoconfigure.condition.OnBeanCondition.collectBeanNamesForType(OnBeanCondition.java:301)
emailer_1 | at org.springframework.boot.autoconfigure.condition.OnBeanCondition.getBeanNamesForType(OnBeanCondition.java:290)
emailer_1 | at org.springframework.boot.autoconfigure.condition.OnBeanCondition.getMatchingBeans(OnBeanCondition.java:232)
emailer_1 | at org.springframework.boot.autoconfigure.condition.OnBeanCondition.getMatchOutcome(OnBeanCondition.java:152)
emailer_1 | at org.springframework.boot.autoconfigure.condition.SpringBootCondition.matches(SpringBootCondition.java:47)
emailer_1 | ... 36 common frames omitted
emailer_1 | Caused by: java.lang.ClassNotFoundException: reactor.core.publisher.Mono
emailer_1 | at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:471)
emailer_1 | at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)
emailer_1 | at org.springframework.boot.loader.LaunchedURLClassLoader.loadClass(LaunchedURLClassLoader.java:93)
emailer_1 | at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
emailer_1 | ... 61 common frames omitted
I am not using the Spring Webflux framework, and have not needed any jars with the reactor framework before. I know Java 11 gutted a lot of the JEE stuff out of the JDK, but this isn't that.
I have tried SpringBoot 2.0.5 release and the latest milestone release (M4) of 2.1 and the results are the same. I have changed the Spring Cloud version from Finchley.SR1 to Greenwich.M1 with the same results.
Has anyone else ran into a similar problem? Any help is greatly appreciated.
Edit: simply adding reactor core to my Pom as a managed dependency causes another issue of it not finding Netty libraries... which is weird because it should be using tomcat.
Upvotes: 1
Views: 2430
Reputation: 761
At the time of writing this, from Spring Boot documentation, Spring Boot 2.1.0.M4 and 2.0.5.RELEASE requires Java 8 or 9 and Spring Framework 5.1.0.RELEASE or above. So I don't think that Spring Boot officially supports Java 11 yet.
Upvotes: 1