Open philippe-granet opened 1 month ago
@philippe-granet Could you please share the class code 'com.[redacted].outbox.OutboxConfiguration'? @Async is included? or Reactor ?
@jaehong-kim
The problem is perhaps caused by the @RefreshScope
annotation, when bean is reloaded.
https://cloud.spring.io/spring-cloud-static/spring-cloud.html
Refresh scope beans are lazy proxies that initialize when they are used (i.e. when a method is called), and the scope acts as a cache of initialized values
package com.[REDACTED];
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.cloud.context.scope.refresh.RefreshScopeRefreshedEvent;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.event.EventListener;
import org.springframework.scheduling.TaskScheduler;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.SchedulingConfigurer;
import org.springframework.scheduling.config.ScheduledTaskRegistrar;
@AutoConfiguration
@ComponentScan
@EnableScheduling
@EnableConfigurationProperties(OutboxProperties.class)
@RefreshScope
public class OutboxConfiguration implements SchedulingConfigurer {
@Autowired
@Qualifier("asyncThreadPoolTaskScheduler")
private TaskScheduler taskScheduler;
@Autowired
private ApplicationContext springContext;
private static final Logger LOG = LoggerFactory.getLogger(OutboxConfiguration.class);
@Autowired
private OutboxProperties properties;
@Override
public void configureTasks(ScheduledTaskRegistrar taskRegistrar) {
...
}
@EventListener
public void onRefreshScopeRefreshed(final RefreshScopeRefreshedEvent event) {
LOG.info("OutboxConfiguration : Refresh scope bean lazy proxy initialization.");
}
}
Prerequisites
Please check the FAQ, and search existing issues for similar questions before creating a new issue.YOU MAY DELETE THIS PREREQUISITES SECTION.
What version of pinpoint are you using?
2.5.3
Describe the bug
Application (Springboot 2.7) failed to start with error:
ClassFormatError-->Duplicate interface name "com/navercorp/pinpoint/bootstrap/async/AsyncContextAccessor"
I found a similar issue on Skywalking APM: https://github.com/apache/skywalking/issues/6172
Logs