apache / incubator-seata

:fire: Seata is an easy-to-use, high-performance, open source distributed transaction solution.
https://seata.apache.org/
Apache License 2.0
25.32k stars 8.78k forks source link

There are many warnings for using springboot3.2 #6249

Closed JavaLionLi closed 8 months ago

JavaLionLi commented 10 months ago

Ⅰ. 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:

slievrly commented 10 months ago

Paste details.

JavaLionLi commented 10 months ago

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.
leizhiyuan commented 10 months ago

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

JavaLionLi commented 10 months ago

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

laywin commented 9 months ago

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.

JavaLionLi commented 9 months ago

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

slievrly commented 9 months ago

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.

laywin commented 9 months ago

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.

slievrly commented 8 months ago

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.