-
Notifications
You must be signed in to change notification settings - Fork 41.4k
Closed as not planned
Labels
status: supersededAn issue that has been superseded by anotherAn issue that has been superseded by anothertheme: aotAn issue related to Ahead-of-time processingAn issue related to Ahead-of-time processingtype: bugA general bugA general bug
Description
Trying to run a WebMvcTest
in a native image leads to:
Failures (1):
JUnit Jupiter:DemoControllerTests
ClassSource [className = 'com.example.demo.DemoControllerTests', filePosition = null]
=> java.lang.IllegalStateException: Unable to create filter for class org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTypeExcludeFilter
org.springframework.boot.test.autoconfigure.filter.TypeExcludeFiltersContextCustomizer.instantiateTypeExcludeFilter(TypeExcludeFiltersContextCustomizer.java:68)
org.springframework.boot.test.autoconfigure.filter.TypeExcludeFiltersContextCustomizer.instantiateTypeExcludeFilters(TypeExcludeFiltersContextCustomizer.java:53)
org.springframework.boot.test.autoconfigure.filter.TypeExcludeFiltersContextCustomizer.<init>(TypeExcludeFiltersContextCustomizer.java:46)
org.springframework.boot.test.autoconfigure.filter.TypeExcludeFiltersContextCustomizerFactory.createContextCustomizer(TypeExcludeFiltersContextCustomizerFactory.java:57)
org.springframework.boot.test.autoconfigure.filter.TypeExcludeFiltersContextCustomizerFactory.createContextCustomizer(TypeExcludeFiltersContextCustomizerFactory.java:51)
[...]
Caused by: java.lang.NoSuchMethodException: org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTypeExcludeFilter.<init>()
java.lang.Class.getConstructor0(DynamicHub.java:3585)
java.lang.Class.getDeclaredConstructor(DynamicHub.java:2754)
org.springframework.boot.test.autoconfigure.filter.TypeExcludeFiltersContextCustomizer.getTypeExcludeFilterConstructor(TypeExcludeFiltersContextCustomizer.java:113)
org.springframework.boot.test.autoconfigure.filter.TypeExcludeFiltersContextCustomizer.instantiateTypeExcludeFilter(TypeExcludeFiltersContextCustomizer.java:60)
[...]
Perhaps an inference on TypeExcludeFilters
is missing.
Metadata
Metadata
Assignees
Labels
status: supersededAn issue that has been superseded by anotherAn issue that has been superseded by anothertheme: aotAn issue related to Ahead-of-time processingAn issue related to Ahead-of-time processingtype: bugA general bugA general bug