Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AOT-generated source fails to compile when Actuator is enabled on a WebFlux project #33106

Closed
dr-eme opened this issue Nov 11, 2022 · 4 comments
Assignees
Labels
theme: aot An issue related to Ahead-of-time processing type: regression A regression from a previous release
Milestone

Comments

@dr-eme
Copy link

dr-eme commented Nov 11, 2022

With the latest RC2 milestone of Spring Boot 3.0.0, compileAot task fails with the following errors:

> :compileAotJava
/Users/eme/Workspace/demo/build/generated/aotSources/org/springframework/boot/actuate/autoconfigure/endpoint/web/reactive/WebFluxEndpointManagementContextConfiguration__BeanDefinitions.java:72: error: ServerCodecConfigurerEndpointObjectMapperBeanPostProcessor has private access in WebFluxEndpointManagementContextConfiguration
  private static BeanInstanceSupplier<WebFluxEndpointManagementContextConfiguration.ServerCodecConfigurerEndpointObjectMapperBeanPostProcessor> getServerCodecConfigurerEndpointObjectMapperBeanPostProcessorInstanceSupplier(
                                                                                   ^
/Users/eme/Workspace/demo/build/generated/aotSources/org/springframework/boot/actuate/autoconfigure/endpoint/web/reactive/WebFluxEndpointManagementContextConfiguration__BeanDefinitions.java:74: error: ServerCodecConfigurerEndpointObjectMapperBeanPostProcessor has private access in WebFluxEndpointManagementContextConfiguration
    return BeanInstanceSupplier.<WebFluxEndpointManagementContextConfiguration.ServerCodecConfigurerEndpointObjectMapperBeanPostProcessor>forFactoryMethod(WebFluxEndpointManagementContextConfiguration.class, "serverCodecConfigurerEndpointObjectMapperBeanPostProcessor", EndpointObjectMapper.class);
                                                                              ^
/Users/eme/Workspace/demo/build/generated/aotSources/org/springframework/boot/actuate/autoconfigure/endpoint/web/reactive/WebFluxEndpointManagementContextConfiguration__BeanDefinitions.java:82: error: ServerCodecConfigurerEndpointObjectMapperBeanPostProcessor has private access in WebFluxEndpointManagementContextConfiguration
    Class<?> beanType = WebFluxEndpointManagementContextConfiguration.ServerCodecConfigurerEndpointObjectMapperBeanPostProcessor.class;
                                                                     ^
3 errors

With RC1, things worked properly. The attached replicator project was generated with the latest starter.spring.io.
demo-regression-actuator-webflux.tgz

@dr-eme dr-eme changed the title [3.0.0-RC2] Regression: AOT fails with actuator is enabled on a webflux project [3.0.0-RC2] Regression: AOT fails when actuator is enabled on a webflux project Nov 11, 2022
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Nov 11, 2022
@bclozel
Copy link
Member

bclozel commented Nov 11, 2022

Probably related to #20291

@bclozel bclozel added type: regression A regression from a previous release theme: aot An issue related to Ahead-of-time processing and removed status: waiting-for-triage An issue we've not yet triaged labels Nov 11, 2022
@bclozel bclozel added this to the 3.0.0 milestone Nov 11, 2022
@dr-eme
Copy link
Author

dr-eme commented Nov 11, 2022

Also on RC1 (not able to test it on RC2 due to the above issue), there seems to be a missing hint on org.springframework.boot.actuate.data.mongo.MongoReactiveHealthIndicator.class when Spring Actuator is enabled with Spring Data MongoDB reactive.

@bclozel
Copy link
Member

bclozel commented Nov 11, 2022

@dr-eme could you create another issue for that? If you've got a complete stacktrace and a repro project, this will help a lot firguring out a fix.

@snicoll snicoll changed the title [3.0.0-RC2] Regression: AOT fails when actuator is enabled on a webflux project AOT fails when actuator is enabled on a webflux project Nov 11, 2022
@wilkinsona wilkinsona self-assigned this Nov 11, 2022
@wilkinsona wilkinsona changed the title AOT fails when actuator is enabled on a webflux project AOT-generated source fails to compile when Actuator is enabled on a WebFlux project Nov 11, 2022
@wilkinsona
Copy link
Member

It occurred to me that it should be possible to work around this on 3.0.0-RC2 by setting management.endpoints.jackson.isolated-object-mapper to false.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme: aot An issue related to Ahead-of-time processing type: regression A regression from a previous release
Projects
None yet
Development

No branches or pull requests

4 participants