-
Notifications
You must be signed in to change notification settings - Fork 41.5k
Closed as not planned
Labels
status: duplicateA duplicate of another issueA duplicate of another issue
Description
I've created an application using:
- SpringBoot 3.0.6
- openjdk 17.0.7 2023-04-18
- OpenJDK Runtime Environment GraalVM CE 22.3.2 (build 17.0.7+7-jvmci-22.3-b18)
- OpenJDK 64-Bit Server VM GraalVM CE 22.3.2 (build 17.0.7+7-jvmci-22.3-b18, mixed mode, sharing)
- Gradle 8.0.2
I've some integration tests using org.springframework.test.web.servlet.MockMvc.
After upgrading to Spring-boot 3.1 ordinary tests keep on working fine, but nativeTests don't.
Some clue?
Bests,
Cesare
=> java.lang.IllegalStateException: Failed to load ApplicationContext for [AotMergedContextConfiguration@69327dd7 testClass = it.xxx.reversebox.controller.WaybillControllerTest, contextInitializerClass = it.xx.reversebox.controller.AuthenticationControllerTest__TestContext003_ApplicationContextInitializer, original = [WebMergedContextConfiguration@76228c35 testClass = it.xxx.reversebox.controller.WaybillControllerTest, locations = [], classes = [it.xxx.reversebox.ReverseboxApplication], contextInitializerClasses = [], activeProfiles = ["test"], propertySourceLocations = [], propertySourceProperties = ["org.springframework.boot.test.context.SpringBootTestContextBootstrapper=true"], contextCustomizers = [org.springframework.boot.test.autoconfigure.actuate.observability.ObservabilityContextCustomizerFactory$DisableObservabilityContextCustomizer@1f, org.springframework.boot.test.autoconfigure.properties.PropertyMappingContextCustomizer@4b3fa0b3, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverContextCustomizerFactory$Customizer@1645f294, org.springframework.boot.test.context.filter.ExcludeFilterContextCustomizer@33b26f1a, org.springframework.boot.test.json.DuplicateJsonObjectContextCustomizerFactory$DuplicateJsonObjectContextCustomizer@109d2b79, org.springframework.boot.test.mock.mockito.MockitoContextCustomizer@0, org.springframework.boot.test.web.client.TestRestTemplateContextCustomizer@48db35cf, org.springframework.boot.test.web.reactive.server.WebTestClientContextCustomizer@101d4b61, org.springframework.boot.test.context.SpringBootTestAnnotation@db020562], resourceBasePath = "src/main/webapp", contextLoader = org.springframework.boot.test.context.SpringBootContextLoader, parent = null]]
org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:142)
org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:127)
org.springframework.test.context.web.ServletTestExecutionListener.setUpRequestContextIfNecessary(ServletTestExecutionListener.java:191)
org.springframework.test.context.web.ServletTestExecutionListener.prepareTestInstance(ServletTestExecutionListener.java:130)
org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:241)
[...]
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'mockMvc': Unsatisfied dependency expressed through method 'mockMvc' parameter 0: Error creating bean with name 'mockMvcBuilder': Unsatisfied dependency expressed through method 'mockMvcBuilder' parameter 0: Error creating bean with name 'springBootMockMvcBuilderCustomizer': Runtime reflection is not supported for public void org.springframework.boot.test.autoconfigure.web.servlet.SpringBootMockMvcBuilderCustomizer.setAddFilters(boolean)
org.springframework.beans.factory.aot.BeanInstanceSupplier.resolveArgument(BeanInstanceSupplier.java:315)
org.springframework.beans.factory.aot.BeanInstanceSupplier.resolveArguments(BeanInstanceSupplier.java:258)
org.springframework.beans.factory.aot.BeanInstanceSupplier.get(BeanInstanceSupplier.java:198)
org.springframework.beans.factory.support.DefaultListableBeanFactory.obtainInstanceFromSupplier(DefaultListableBeanFactory.java:947)
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.obtainFromSupplier(AbstractAutowireCapableBeanFactory.java:1214)
[...]
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'mockMvcBuilder': Unsatisfied dependency expressed through method 'mockMvcBuilder' parameter 0: Error creating bean with name 'springBootMockMvcBuilderCustomizer': Runtime reflection is not supported for public void org.springframework.boot.test.autoconfigure.web.servlet.SpringBootMockMvcBuilderCustomizer.setAddFilters(boolean)
org.springframework.beans.factory.aot.BeanInstanceSupplier.resolveArgument(BeanInstanceSupplier.java:315)
org.springframework.beans.factory.aot.BeanInstanceSupplier.resolveArguments(BeanInstanceSupplier.java:258)
org.springframework.beans.factory.aot.BeanInstanceSupplier.get(BeanInstanceSupplier.java:198)
org.springframework.beans.factory.support.DefaultListableBeanFactory.obtainInstanceFromSupplier(DefaultListableBeanFactory.java:947)
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.obtainFromSupplier(AbstractAutowireCapableBeanFactory.java:1214)
[...]
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'springBootMockMvcBuilderCustomizer': Runtime reflection is not supported for public void org.springframework.boot.test.autoconfigure.web.servlet.SpringBootMockMvcBuilderCustomizer.setAddFilters(boolean)
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:605)
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:520)
org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:326)
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:324)
[...]
Caused by: com.oracle.svm.core.jdk.UnsupportedFeatureError: Runtime reflection is not supported for public void org.springframework.boot.test.autoconfigure.web.servlet.SpringBootMockMvcBuilderCustomizer.setAddFilters(boolean)
org.graalvm.nativeimage.builder/com.oracle.svm.core.util.VMError.unsupportedFeature(VMError.java:89)
java.base@17.0.7/java.lang.reflect.Method.acquireMethodAccessor(Method.java:76)
java.base@17.0.7/java.lang.reflect.Method.invoke(Method.java:566)
org.springframework.boot.context.properties.bind.JavaBeanBinder$BeanProperty.setValue(JavaBeanBinder.java:397)
org.springframework.boot.context.properties.bind.JavaBeanBinder.bind(JavaBeanBinder.java:104)
Metadata
Metadata
Assignees
Labels
status: duplicateA duplicate of another issueA duplicate of another issue