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

DubboConfigEarlyInitializationPostProcessor cause PostProcessorRegistrationDelegate$BeanPostProcessorChecker log 'not eligible for getting processed by all BeanPostProcessors' #8347

Closed
2 tasks done
zhwq1216 opened this issue Jul 24, 2021 · 2 comments
Labels
help wanted Everything needs help from contributors

Comments

@zhwq1216
Copy link

zhwq1216 commented Jul 24, 2021

  • I have searched the issues of this repository and believe that this is not a duplicate.
  • I have checked the FAQ of this repository and believe that this is not a duplicate.

Environment

  • Dubbo version: 2.7.12
  • Operating System version: centos7.4
  • Java version: jdk1.8

Steps to reproduce this issue

Set the org.springframework log level to INFO, then there many logs such as:
INFO org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'xxx' of type [xxx.xxx.xxx] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)

Tracking the org.springframework.context.support.PostProcessorRegistrationDelegate#registerBeanPostProcessors method, it is found that the postProcessorNames contains the instance of DubboConfigEarlyInitializationPostProcessor, and because DubboBeanConfigEarlyInitializationPostProcessor#initBeanFactory has been added to self to the beanPostProcessors list. Due to this BeanPostProcessor duplication, the beanProcessorTargetCount will be one more than the final beanPostProcessors list. Therefore, the above INFO log information is printed in org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker.

		String[] postProcessorNames = beanFactory.getBeanNamesForType(BeanPostProcessor.class, true, false);

		// Register BeanPostProcessorChecker that logs an info message when
		// a bean is created during BeanPostProcessor instantiation, i.e. when
		// a bean is not eligible for getting processed by all BeanPostProcessors.
		int beanProcessorTargetCount = beanFactory.getBeanPostProcessorCount() + 1 + postProcessorNames.length;
		beanFactory.addBeanPostProcessor(new BeanPostProcessorChecker(beanFactory, beanProcessorTargetCount));
@AlbumenJ AlbumenJ added the help wanted Everything needs help from contributors label Jul 30, 2021
@tcsp
Copy link

tcsp commented Sep 18, 2021

i have the same problem, then how to fix it?

@CrazyHZM
Copy link
Member

fixed with #9397

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Everything needs help from contributors
Projects
None yet
Development

No branches or pull requests

4 participants