When running the binary from the webflux-kotlin sample from spring-native, I get the following exception:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jacksonObjectMapper': Instantiation of supplied bean failed
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.obtainInstanceFromSupplier(AbstractAutowireCapableBeanFactory.java:1234) ~[webflux-kotlin:6.0.0-SNAPSHOT]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.obtainFromSupplier(AbstractAutowireCapableBeanFactory.java:1209) ~[webflux-kotlin:6.0.0-SNAPSHOT]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1156) ~[webflux-kotlin:6.0.0-SNAPSHOT]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:566) ~[webflux-kotlin:6.0.0-SNAPSHOT]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:526) ~[webflux-kotlin:6.0.0-SNAPSHOT]
        at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:326) ~[webflux-kotlin:6.0.0-SNAPSHOT]
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[webflux-kotlin:6.0.0-SNAPSHOT]
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:324) ~[webflux-kotlin:6.0.0-SNAPSHOT]
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200) ~[webflux-kotlin:6.0.0-SNAPSHOT]
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:930) ~[webflux-kotlin:6.0.0-SNAPSHOT]
        at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:926) ~[webflux-kotlin:6.0.0-SNAPSHOT]
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:592) ~[webflux-kotlin:6.0.0-SNAPSHOT]
        at org.springframework.boot.web.reactive.context.ReactiveWebServerApplicationContext.refresh(ReactiveWebServerApplicationContext.java:66) ~[webflux-kotlin:3.0.0-SNAPSHOT]
        at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:729) ~[webflux-kotlin:3.0.0-SNAPSHOT]
        at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:428) ~[webflux-kotlin:3.0.0-SNAPSHOT]
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:310) ~[webflux-kotlin:3.0.0-SNAPSHOT]
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1301) ~[webflux-kotlin:3.0.0-SNAPSHOT]
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1290) ~[webflux-kotlin:3.0.0-SNAPSHOT]
        at com.example.webflux.WebfluxApplicationKt.main(WebfluxApplication.kt:16) ~[webflux-kotlin:0.0.1-SNAPSHOT]
Caused by: kotlin.jvm.KotlinReflectionNotSupportedError: Kotlin reflection implementation is not found at runtime. Make sure you have kotlin-reflect.jar in the classpath
        at kotlin.jvm.internal.ClassReference.error(ClassReference.kt:88) ~[na:na]
        at kotlin.jvm.internal.ClassReference.getConstructors(ClassReference.kt:21) ~[na:na]
        at kotlin.reflect.jvm.ReflectJvmMapping.getKotlinFunction(ReflectJvmMapping.kt:146) ~[na:na]
        at org.springframework.beans.BeanUtils$KotlinDelegate.instantiateClass(BeanUtils.java:869) ~[na:na]
        at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:191) ~[na:na]
        at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:152) ~[na:na]
        at org.springframework.http.converter.json.Jackson2ObjectMapperBuilder.registerWellKnownModulesIfAvailable(Jackson2ObjectMapperBuilder.java:842) ~[webflux-kotlin:6.0.0-SNAPSHOT]
        at org.springframework.http.converter.json.Jackson2ObjectMapperBuilder.configure(Jackson2ObjectMapperBuilder.java:689) ~[webflux-kotlin:6.0.0-SNAPSHOT]
        at org.springframework.http.converter.json.Jackson2ObjectMapperBuilder.build(Jackson2ObjectMapperBuilder.java:672) ~[webflux-kotlin:6.0.0-SNAPSHOT]
        at org.springframework.boot.autoconfigure.jackson.JacksonAutoConfiguration$JacksonObjectMapperConfiguration.jacksonObjectMapper(JacksonAutoConfiguration.java:113) ~[webflux-kotlin:3.0.0-SNAPSHOT]
        at org.springframework.boot.autoconfigure.jackson.JacksonAutoConfiguration_JacksonObjectMapperConfiguration__BeanDefinitions.lambda$getJacksonObjectMapperInstance$0(JacksonAutoConfiguration_JacksonObjectMapperConfiguration__BeanDefinitions.java:43) ~[na:na]
        at org.springframework.util.function.ThrowingFunction.apply(ThrowingFunction.java:63) ~[webflux-kotlin:6.0.0-SNAPSHOT]
        at org.springframework.util.function.ThrowingFunction.apply(ThrowingFunction.java:51) ~[webflux-kotlin:6.0.0-SNAPSHOT]
        at org.springframework.beans.factory.aot.AutowiredInstantiationArgumentsResolver.resolve(AutowiredInstantiationArgumentsResolver.java:156) ~[na:na]
        at org.springframework.boot.autoconfigure.jackson.JacksonAutoConfiguration_JacksonObjectMapperConfiguration__BeanDefinitions.getJacksonObjectMapperInstance(JacksonAutoConfiguration_JacksonObjectMapperConfiguration__BeanDefinitions.java:43) ~[na:na]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.obtainInstanceFromSupplier(AbstractAutowireCapableBeanFactory.java:1223) ~[webflux-kotlin:6.0.0-SNAPSHOT]
        ... 18 common frames omitted

There is

        <dependency>
            <groupId>org.jetbrains.kotlin</groupId>
            <artifactId>kotlin-reflect</artifactId>
        </dependency>

in the pom.xml, the sample runs with mvn spring-boot:run

Comment From: sdeleuze

Seems related to the well-known Jackson modules (here KotlinModule) registered in Jackson2ObjectMapperBuilder#registerWellKnownModulesIfAvailable.

There could be Kotlin reflection hints missing as well (but those ones should go in the reachability metadata reprository I think, not sure yet what we do in the interim).

Spring Native KotlinHints could be used as a source of inspiration.

Comment From: sdeleuze

Notice I had to add Kotlin hints via https://github.com/spring-projects-experimental/spring-native/commit/3392357741671f29b5934a000f5d7c34070eadc0 to make it work, this will go to the reachability repo or better we could ask Kotlin team to ship that out of the box.