incubator-seata icon indicating copy to clipboard operation
incubator-seata copied to clipboard

There are many warnings for using springboot3.2

Open JavaLionLi opened this issue 1 year ago • 9 comments

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

Ⅰ. Issue Description

There are many warnings for using springboot3.2 seata 1.8.0 image

Ⅱ. Describe what happened

If there is an exception, please attach the exception trace:

Just paste your stack trace here!

Ⅲ. Describe what you expected to happen

Ⅳ. How to reproduce it (as minimally and precisely as possible)

  1. xxx
  2. xxx
  3. xxx

Minimal yet complete reproducer code (or URL to code):

Ⅴ. Anything else we need to know?

Ⅵ. Environment:

  • JDK version(e.g. java -version):
  • Seata client/server version:
  • Database version:
  • OS(e.g. uname -a):
  • Others:

JavaLionLi avatar Jan 09 '24 05:01 JavaLionLi

Paste details.

slievrly avatar Jan 09 '24 06:01 slievrly

Paste details.

2024-01-09 15:03:37 [main] INFO  i.s.s.a.GlobalTransactionScanner
 - Transaction Manager Client is initialized. applicationId[ruoyi-system] txServiceGroup[ruoyi-system-group]
2024-01-09 15:03:37 [main] INFO  io.seata.rm.datasource.AsyncWorker
 - Async Commit Buffer Limit: 10000
2024-01-09 15:03:37 [main] INFO  i.s.r.d.xa.ResourceManagerXA
 - ResourceManagerXA init ...
2024-01-09 15:03:37 [main] INFO  i.s.c.rpc.netty.NettyClientBootstrap
 - NettyClientBootstrap has started
2024-01-09 15:03:37 [main] INFO  i.s.s.a.GlobalTransactionScanner
 - Resource Manager is initialized. applicationId[ruoyi-system] txServiceGroup[ruoyi-system-group]
2024-01-09 15:03:37 [main] INFO  i.s.s.a.GlobalTransactionScanner
 - Global Transaction Clients are initialized. 
2024-01-09 15:03:37 [main] WARN  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker
 - Bean 'lock4j-com.baomidou.lock.spring.boot.autoconfigure.Lock4jProperties' of type [com.baomidou.lock.spring.boot.autoconfigure.Lock4jProperties] 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 [sentinelBeanPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies.
2024-01-09 15:03:37 [main] WARN  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker
 - Bean 'com.baomidou.lock.spring.boot.autoconfigure.LockAutoConfiguration' of type [com.baomidou.lock.spring.boot.autoconfigure.LockAutoConfiguration$$SpringCGLIB$$0] 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 [sentinelBeanPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies.
2024-01-09 15:03:37 [main] WARN  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker
 - Bean 'lockKeyBuilder' of type [com.baomidou.lock.DefaultLockKeyBuilder] 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 [sentinelBeanPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies.
2024-01-09 15:03:37 [main] WARN  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker
 - Bean 'lockFailureStrategy' of type [com.baomidou.lock.DefaultLockFailureStrategy] 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 [sentinelBeanPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies.
2024-01-09 15:03:37 [main] WARN  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker
 - Bean 'lockInterceptor' of type [com.baomidou.lock.aop.LockInterceptor] 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 [sentinelBeanPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies.
2024-01-09 15:03:37 [main] WARN  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker
 - Bean 'lockAnnotationAdvisor' of type [com.baomidou.lock.aop.LockAnnotationAdvisor] 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 [sentinelBeanPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies.
2024-01-09 15:03:37 [main] WARN  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker
 - Bean 'com.baomidou.dynamic.datasource.spring.boot.autoconfigure.DynamicDataSourceAopConfiguration' of type [com.baomidou.dynamic.datasource.spring.boot.autoconfigure.DynamicDataSourceAopConfiguration] 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 [sentinelBeanPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies.
2024-01-09 15:03:37 [main] WARN  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker
 - Bean 'spring.cloud.sentinel-com.alibaba.cloud.sentinel.SentinelProperties' of type [com.alibaba.cloud.sentinel.SentinelProperties] 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 [sentinelBeanPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies.
2024-01-09 15:03:37 [main] WARN  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker
 - Bean 'spring.cloud.sentinel.transport-org.dromara.common.sentinel.config.properties.SentinelCustomProperties' of type [org.dromara.common.sentinel.config.properties.SentinelCustomProperties] 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 [sentinelBeanPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies.
2024-01-09 15:03:37 [main] WARN  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker
 - Bean 'org.springframework.cloud.client.discovery.composite.CompositeDiscoveryClientAutoConfiguration' of type [org.springframework.cloud.client.discovery.composite.CompositeDiscoveryClientAutoConfiguration] 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 [sentinelBeanPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies.
2024-01-09 15:03:37 [main] WARN  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker
 - Bean 'com.alibaba.cloud.nacos.discovery.NacosDiscoveryClientConfiguration' of type [com.alibaba.cloud.nacos.discovery.NacosDiscoveryClientConfiguration] 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 [sentinelBeanPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies.
2024-01-09 15:03:37 [main] WARN  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker
 - Bean 'com.alibaba.cloud.nacos.discovery.NacosDiscoveryAutoConfiguration' of type [com.alibaba.cloud.nacos.discovery.NacosDiscoveryAutoConfiguration] 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 [sentinelBeanPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies.
2024-01-09 15:03:37 [main] WARN  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker
 - Bean 'com.alibaba.cloud.nacos.util.UtilIPv6AutoConfiguration' of type [com.alibaba.cloud.nacos.util.UtilIPv6AutoConfiguration] 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 [sentinelBeanPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies.
2024-01-09 15:03:37 [main] WARN  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker
 - Bean 'org.springframework.cloud.commons.util.UtilAutoConfiguration' of type [org.springframework.cloud.commons.util.UtilAutoConfiguration] 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 [sentinelBeanPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies.
2024-01-09 15:03:37 [main] WARN  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker
 - Bean 'inetUtilsProperties' of type [org.springframework.cloud.commons.util.InetUtilsProperties] 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 [sentinelBeanPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies.
2024-01-09 15:03:37 [main] WARN  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker
 - Bean 'inetIPv6Utils' of type [com.alibaba.cloud.nacos.util.InetIPv6Utils] 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 [sentinelBeanPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies.
2024-01-09 15:03:37 [main] WARN  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker
 - Bean 'inetUtils' of type [org.springframework.cloud.commons.util.InetUtils] 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 [sentinelBeanPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies.
2024-01-09 15:03:37 [main] WARN  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker
 - Bean 'com.alibaba.cloud.nacos.NacosServiceAutoConfiguration' of type [com.alibaba.cloud.nacos.NacosServiceAutoConfiguration] 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 [sentinelBeanPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies.
2024-01-09 15:03:37 [main] WARN  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker
 - Bean 'nacosServiceManager' of type [com.alibaba.cloud.nacos.NacosServiceManager] 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 [sentinelBeanPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies.
2024-01-09 15:03:37 [main] WARN  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker
 - Bean 'nacosProperties' of type [com.alibaba.cloud.nacos.NacosDiscoveryProperties] 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 [sentinelBeanPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies.
2024-01-09 15:03:37 [main] WARN  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker
 - Bean 'nacosServiceDiscovery' of type [com.alibaba.cloud.nacos.discovery.NacosServiceDiscovery] 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 [sentinelBeanPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies.
2024-01-09 15:03:37 [main] WARN  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker
 - Bean 'nacosDiscoveryClient' of type [com.alibaba.cloud.nacos.discovery.NacosDiscoveryClient] 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 [sentinelBeanPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies.
2024-01-09 15:03:37 [main] WARN  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker
 - Bean 'server-org.springframework.boot.autoconfigure.web.ServerProperties' of type [org.springframework.boot.autoconfigure.web.ServerProperties] 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 [sentinelBeanPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies.
2024-01-09 15:03:37 [main] WARN  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker
 - Bean 'org.springframework.cloud.client.discovery.simple.SimpleDiscoveryClientAutoConfiguration' of type [org.springframework.cloud.client.discovery.simple.SimpleDiscoveryClientAutoConfiguration] 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 [sentinelBeanPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies.
2024-01-09 15:03:37 [main] WARN  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker
 - Bean 'simpleDiscoveryProperties' of type [org.springframework.cloud.client.discovery.simple.SimpleDiscoveryProperties] 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 [sentinelBeanPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies.
2024-01-09 15:03:37 [main] WARN  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker
 - Bean 'simpleDiscoveryClient' of type [org.springframework.cloud.client.discovery.simple.SimpleDiscoveryClient] 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 [sentinelBeanPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies.
2024-01-09 15:03:37 [main] WARN  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker
 - Bean 'compositeDiscoveryClient' of type [org.springframework.cloud.client.discovery.composite.CompositeDiscoveryClient] 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 [sentinelBeanPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies.

JavaLionLi avatar Jan 09 '24 07:01 JavaLionLi

It seems that there are some warnings, some of which are unrelated to Seata. Does this actually have any impact on the actual usage?

leizhiyuan avatar Jan 09 '24 11:01 leizhiyuan

It seems that there are some warnings, some of which are unrelated to Seata. Does this actually have any impact on the actual usage?

There are warnings after the nacos sentinel seata update to springboot 3.2

JavaLionLi avatar Jan 09 '24 13:01 JavaLionLi

it seems just a warn, spring framework changed the log level, it used to be info. there is a BeanPostProcessorChecker which will log a warn if a not spring infrastructureBean bean is created before any BeanPostProcessor create. because the bean can't processed by all BeanPostProcesser. example: in xxAutoConfiguration, declare a BeanPostProcessor, there is a warn log for xxAutoConfiguration.

laywin avatar Jan 12 '24 17:01 laywin

it seems just a warn, spring framework changed the log level, it used to be info. there is a BeanPostProcessorChecker which will log a warn if a not spring infrastructureBean bean is created before any BeanPostProcessor create. because the bean can't processed by all BeanPostProcesser. example: in xxAutoConfiguration, declare a BeanPostProcessor, there is a warn log for xxAutoConfiguration.

Yes, but there are too many warnings, which greatly affects the collection and analysis of logs

JavaLionLi avatar Jan 13 '24 01:01 JavaLionLi

It appears to be caused by the initialization order of Bean and BeanPostProcessor. There should be some reference specifications for this aspect, such as BeanPostProcessors should not depend on other Beans.

slievrly avatar Jan 17 '24 03:01 slievrly

i try to find some solutions in spring, like : https://github.com/spring-cloud/spring-cloud-sleuth/issues/1508 , there are basically three solutions:

  1. mark @lazy on dependency
  2. injection beanFactory, dynamic get bean to use when needed.
  3. mark the depend bean as @Role(BeanDefinition.ROLE_INFRASTRUCTURE).

in our case, globalTransactionScanner depend many properties, main do init client & generate proxy. does anyone have good idea to fix the issue.

laywin avatar Jan 18 '24 16:01 laywin

i try to find some solutions in spring, like : spring-cloud/spring-cloud-sleuth#1508 , there are basically three solutions:

  1. mark @lazy on dependency
  2. injection beanFactory, dynamic get bean to use when needed.
  3. mark the depend bean as @ROLE(BeanDefinition.ROLE_INFRASTRUCTURE).

in our case, globalTransactionScanner depend many properties, main do init client & generate proxy. does anyone have good idea to fix the issue.

globalTransactionScanner should depend on Spring's event notification to solve this issue. We can't enumerates all beans, including business beans that we don't know.

slievrly avatar Feb 16 '24 13:02 slievrly