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

BeanPostProcessorChecker warning due to missing infrastructure role on ProxyTransactionManagementConfiguration #24508

Closed
edwardsre opened this issue Jan 10, 2020 · 3 comments
Assignees
Labels
in: data Issues in data modules (jdbc, orm, oxm, tx) type: regression A bug that is also a regression
Milestone

Comments

@edwardsre
Copy link

I'm not sure if this is the right place to log this issue, but thought I would start here.

When @EnableRetry is added to a Boot application also using spring-boot-actuator, the following occurs:

trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.retry.annotation.RetryConfiguration' of type [org.springframework.retry.annotation.RetryConfiguration$$EnhancerBySpringCGLIB$$2cf7388d] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)

The same is also true when adding spring-boot-starter-jdbc along with spring-boot-actuator.

trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)

It appears that the MeterRegistryPostProcessor is causing some Advisors and other beans to be initialized early.

This initializr generated application shows the ProxyTransactionmanagementConfiguration message during startup.

Adding @EnableRetry and the following will cause the RetryConfiguration message during startup.

<dependency>
  <groupId>org.springframework.retry</groupId>
  <artifactId>spring-retry</artifactId>
</dependency>

<dependency>
  <groupId>org.springframework</groupId>
  <artifactId>spring-aspects</artifactId>
</dependency>
@mbhave
Copy link
Contributor

mbhave commented Jan 13, 2020

It does appear to be that MeterRegistryPostProcessor is causing early initialization of some advisor beans. I wonder if MeterRegistryPostProcessor should be ordered to avoid that or if it should be marked as synthentic like we do for dataSourceInitializerPostProcessor. Flagging for team-attention to see if that is indeed the issue.

@snicoll snicoll self-assigned this Feb 11, 2020
@snicoll
Copy link
Member

snicoll commented Feb 12, 2020

Discussing with @jhoeller we trace it down to a regression in Spring Framework. Moving to the Spring Framework issue tracker.

@snicoll snicoll transferred this issue from spring-projects/spring-boot Feb 12, 2020
@snicoll snicoll assigned jhoeller and unassigned snicoll Feb 12, 2020
@snicoll snicoll added the type: regression A bug that is also a regression label Feb 12, 2020
@snicoll snicoll added this to the 5.2.4 milestone Feb 12, 2020
@snicoll snicoll changed the title MeterRegistryPostProcessor causes early initialization of beans ProxyTransactionManagementConfiguration is missing infrastructure role Feb 12, 2020
@jhoeller jhoeller added the in: data Issues in data modules (jdbc, orm, oxm, tx) label Feb 12, 2020
@jhoeller jhoeller changed the title ProxyTransactionManagementConfiguration is missing infrastructure role BeanPostProcessorChecker warning due to missing infrastructure role on ProxyTransactionManagementConfiguration Feb 12, 2020
@jhoeller
Copy link
Contributor

This should effectively be covered by the consistency measures in #24508. Kept around as a separate ticket since it constitutes a regression in the 5.2 line, to be reopened if these measures turn out to be insufficient.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: data Issues in data modules (jdbc, orm, oxm, tx) type: regression A bug that is also a regression
Projects
None yet
Development

No branches or pull requests

4 participants