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

Spring Framework BeanPostProcessorChecker: warning logs about BeanPostProcessors #1130

Open
space88man opened this issue Jul 31, 2024 · 2 comments
Labels
bug Something does not work as expected

Comments

@space88man
Copy link

space88man commented Jul 31, 2024

The context
Spring Framework's BeanPostProcessorChecker has started to complain loudly
(logs at WARN level) about the BeanPostProcessors in this repo.

Creating a Spring Boot application that hosts a gRPC server and
uses multiple gRPC client stubs to access services. Spring Boot version: 3.3.2

Both client and server auto-configurations classes trigger the checker.
The bug

Warnings:

2024-07-31T10:19:01 WARNING [main] org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker Bean 'net.d
evh.boot.grpc.client.autoconfigure.GrpcClientAutoConfiguration' of type [net.devh.boot.grpc.client.autoconfigure.GrpcClientAutoConfiguration]
 is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying). Is this bean getting eagerly 
injected into a currently created BeanPostProcessor [grpcClientBeanPostProcessor]? Check the corresponding BeanPostProcessor declaration and 
its dependencies.

2024-07-31T10:19:01 WARNING [main] org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker Bean 'net.d
evh.boot.grpc.server.autoconfigure.GrpcServerAutoConfiguration' of type [net.devh.boot.grpc.server.autoconfigure.GrpcServerAutoConfiguration]
 is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying). Is this bean getting eagerly 
injected into a currently created BeanPostProcessor [grpcClientBeanPostProcessor]? Check the corresponding BeanPostProcessor declaration and 
its dependencies. 

Stacktrace and logs

N/A - application does start up
Steps to Reproduce

The application's environment

Which versions do you use?

  • Spring (boot): 3.3.2
  • grpc-java: 1.63.0
  • grpc-spring-boot-starter: 3.1.0.RELEASE
  • java: version + architecture (64bit?) 21/x86_64
  • Other relevant libraries...

Additional context

2024-07-31T10:19:01 WARNING [main] org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker
    Bean 'net.devh.boot.grpc.client.autoconfigure.GrpcClientAutoConfiguration' of type [net.devh.boot.grpc.client.autoconfigure.GrpcClientAutoConfiguration] is not eligible for getting processed by all BeanPostProcessors
    (for example: not eligible for auto-proxying). Is this bean getting eagerly injected into a currently created BeanPostProcessor [grpcClientBeanPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies. 
2024-07-31T10:19:01 WARNING [main] org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker
    Bean 'net.devh.boot.grpc.server.autoconfigure.GrpcServerAutoConfiguration' of type [net.devh.boot.grpc.server.autoconfigure.GrpcServerAutoConfiguration] is not eligible for getting processed by all BeanPostProcessors
    (for example: not eligible for auto-proxying). Is this bean getting eagerly injected into a currently created BeanPostProcessor [grpcClientBeanPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies. 
2024-07-31T10:19:01 WARNING [main] org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker
    Bean 'defaultGrpcServerProperties' of type [net.devh.boot.grpc.server.config.GrpcServerProperties] is not eligible for getting processed by all BeanPostProcessors
    (for example: not eligible for auto-proxying). Is this bean getting eagerly injected into a currently created BeanPostProcessor [grpcClientBeanPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies. 
2024-07-31T10:19:01 WARNING [main] org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker
    Bean 'selfNameResolverFactory' of type [net.devh.boot.grpc.server.nameresolver.SelfNameResolverFactory] is not eligible for getting processed by all BeanPostProcessors
    (for example: not eligible for auto-proxying). Is this bean getting eagerly injected into a currently created BeanPostProcessor [grpcClientBeanPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies. 
2024-07-31T10:19:01 WARNING [main] org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker
    Bean 'grpcNameResolverRegistration' of type [net.devh.boot.grpc.client.nameresolver.NameResolverRegistration] is not eligible for getting processed by all BeanPostProcessors
    (for example: not eligible for auto-proxying). Is this bean getting eagerly injected into a currently created BeanPostProcessor [grpcClientBeanPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies. 
2024-07-31T10:19:01 WARNING [main] org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker
    Bean 'grpcChannelsProperties' of type [net.devh.boot.grpc.client.config.GrpcChannelsProperties] is not eligible for getting processed by all BeanPostProcessors
    (for example: not eligible for auto-proxying). Is this bean getting eagerly injected into a currently created BeanPostProcessor [grpcClientBeanPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies. 
2024-07-31T10:19:01 WARNING [main] org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker
    Bean 'globalClientInterceptorRegistry' of type [net.devh.boot.grpc.client.interceptor.GlobalClientInterceptorRegistry] is not eligible for getting processed by all BeanPostProcessors
    (for example: not eligible for auto-proxying). Is this bean getting eagerly injected into a currently created BeanPostProcessor [grpcClientBeanPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies. 
2024-07-31T10:19:01 WARNING [main] org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker
    Bean 'net.devh.boot.grpc.common.autoconfigure.GrpcCommonCodecAutoConfiguration' of type [net.devh.boot.grpc.common.autoconfigure.GrpcCommonCodecAutoConfiguration] is not eligible for getting processed by all BeanPostProcessors
    (for example: not eligible for auto-proxying). Is this bean getting eagerly injected into a currently created BeanPostProcessor [grpcClientBeanPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies. 
2024-07-31T10:19:01 WARNING [main] org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker
    Bean 'defaultGrpcCodecDiscoverer' of type [net.devh.boot.grpc.common.codec.AnnotationGrpcCodecDiscoverer] is not eligible for getting processed by all BeanPostProcessors
    (for example: not eligible for auto-proxying). Is this bean getting eagerly injected into a currently created BeanPostProcessor [grpcClientBeanPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies. 
2024-07-31T10:19:01 WARNING [main] org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker
    Bean 'defaultCompressorRegistry' of type [io.grpc.CompressorRegistry] is not eligible for getting processed by all BeanPostProcessors
    (for example: not eligible for auto-proxying). Is this bean getting eagerly injected into a currently created BeanPostProcessor [grpcClientBeanPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies. 
2024-07-31T10:19:01 WARNING [main] org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker
    Bean 'compressionChannelConfigurer' of type [net.devh.boot.grpc.client.autoconfigure.GrpcClientAutoConfiguration$$Lambda/0x00007fc7f8549a38] is not eligible for getting processed by all BeanPostProcessors
    (for example: not eligible for auto-proxying). Is this bean getting eagerly injected into a currently created BeanPostProcessor [grpcClientBeanPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies. 
2024-07-31T10:19:01 WARNING [main] org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker
    Bean 'defaultDecompressorRegistry' of type [io.grpc.DecompressorRegistry] is not eligible for getting processed by all BeanPostProcessors
    (for example: not eligible for auto-proxying). Is this bean getting eagerly injected into a currently created BeanPostProcessor [grpcClientBeanPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies. 
2024-07-31T10:19:01 WARNING [main] org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker
    Bean 'decompressionChannelConfigurer' of type [net.devh.boot.grpc.client.autoconfigure.GrpcClientAutoConfiguration$$Lambda/0x00007fc7f854a568] is not eligible for getting processed by all BeanPostProcessors
    (for example: not eligible for auto-proxying). Is this bean getting eagerly injected into a currently created BeanPostProcessor [grpcClientBeanPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies. 
2024-07-31T10:19:01 WARNING [main] org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker
    Bean 'shadedNettyGrpcChannelFactory' of type [net.devh.boot.grpc.client.channelfactory.InProcessOrAlternativeChannelFactory] is not eligible for getting processed by all BeanPostProcessors
    (for example: not eligible for auto-proxying). Is this bean getting eagerly injected into a currently created BeanPostProcessor [grpcClientBeanPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies. 
2024-07-31T10:19:01 WARNING [main] org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker
    Bean 'annotationGlobalClientInterceptorConfigurer' of type [net.devh.boot.grpc.client.interceptor.AnnotationGlobalClientInterceptorConfigurer] is not eligible for getting processed by all BeanPostProcessors
    (for example: not eligible for auto-proxying). Is this bean getting eagerly injected into a currently created BeanPostProcessor [grpcClientBeanPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies. 
2024-07-31T10:19:01 WARNING [main] org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker
    Bean 'asyncStubFactory' of type [net.devh.boot.grpc.client.stubfactory.AsyncStubFactory] is not eligible for getting processed by all BeanPostProcessors
    (for example: not eligible for auto-proxying). Is this bean getting eagerly injected into a currently created BeanPostProcessor [grpcClientBeanPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies. 
2024-07-31T10:19:01 WARNING [main] org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker
    Bean 'blockingStubFactory' of type [net.devh.boot.grpc.client.stubfactory.BlockingStubFactory] is not eligible for getting processed by all BeanPostProcessors
    (for example: not eligible for auto-proxying). Is this bean getting eagerly injected into a currently created BeanPostProcessor [grpcClientBeanPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies. 
2024-07-31T10:19:01 WARNING [main] org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker
    Bean 'futureStubFactory' of type [net.devh.boot.grpc.client.stubfactory.FutureStubFactory] is not eligible for getting processed by all BeanPostProcessors
    (for example: not eligible for auto-proxying). Is this bean getting eagerly injected into a currently created BeanPostProcessor [grpcClientBeanPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies. 
@space88man space88man added the bug Something does not work as expected label Jul 31, 2024
@space88man
Copy link
Author

space88man commented Jul 31, 2024

Not specific to this repo: I am seeing this warning for other autoconfiguration classes. E.g
spring-projects/spring-boot#38558. It's not a Spring Boot issue
but due to changes in Spring Framework
spring-projects/spring-boot#39224 (comment)

@space88man space88man reopened this Jul 31, 2024
@space88man space88man changed the title Warnings about Not eligible for getting processed by all BeanPostProcessors Spring Framework BeanPostProcessorChecker: warning logs about BeanPostProcessors Jul 31, 2024
@Electric-impala
Copy link

Electric-impala commented Aug 21, 2024

I also encountered same issue. How can we get rid off these warn logs? @space88man did you got any solution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something does not work as expected
Projects
None yet
Development

No branches or pull requests

2 participants