apache / shardingsphere-elasticjob

Distributed scheduled job
Apache License 2.0
8.15k stars 3.29k forks source link

Job conflict with register center when class has been enhanced multiple times #2451

Closed aaron19940513 closed 1 month ago

aaron19940513 commented 1 month ago

Bug Report

For English only, other languages will not accept.

Before report a bug, make sure you have:

Please pay attention on issues you submitted, because we maybe need more details. If no response anymore and we cannot reproduce it on current information, we will close it.

Please answer these questions before submitting your issue. Thanks!

Which version of ElasticJob did you use?

elasticjob 3.0.1 druid 1.1.21

Expected behavior

Actual behavior

org.apache.shardingsphere.elasticjob.infra.exception.JobConfigurationException: Job conflict with register center. The job 'FileScanDateInitJob' in register center's class is 'com.***.business.handler.filemanage.FileScanDateInitJob', your job class is 'com.eastmoney.amp.settlement.business.handler.filemanage.FileScanDateInitJob$$EnhancerBySpringCGLIB$$da78c225' at org.apache.shardingsphere.elasticjob.lite.internal.config.ConfigurationService.checkConflictJob(ConfigurationService.java:86) at org.apache.shardingsphere.elasticjob.lite.internal.config.ConfigurationService.setUpJobConfiguration(ConfigurationService.java:70) at org.apache.shardingsphere.elasticjob.lite.internal.setup.SetUpFacade.setUpJobConfiguration(SetUpFacade.java:66) at org.apache.shardingsphere.elasticjob.lite.internal.schedule.JobScheduler.(JobScheduler.java:84) at org.apache.shardingsphere.elasticjob.lite.api.bootstrap.impl.ScheduleJobBootstrap.(ScheduleJobBootstrap.java:36) at org.apache.shardingsphere.elasticjob.lite.spring.boot.job.ElasticJobBootstrapConfiguration.registerClassedJob(ElasticJobBootstrapConfiguration.java:108) at org.apache.shardingsphere.elasticjob.lite.spring.boot.job.ElasticJobBootstrapConfiguration.constructJobBootstraps(ElasticJobBootstrapConfiguration.java:91) at org.apache.shardingsphere.elasticjob.lite.spring.boot.job.ElasticJobBootstrapConfiguration.createJobBootstrapBeans(ElasticJobBootstrapConfiguration.java:64) at org.apache.shardingsphere.elasticjob.lite.spring.boot.job.ElasticJobBootstrapConfiguration.afterSingletonsInstantiated(ElasticJobBootstrapConfiguration.java:52) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:963) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583) at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:144) at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:771) at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:763) at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:438) at org.springframework.boot.SpringApplication.run(SpringApplication.java:339)

Reason analyze (If you can)

This class has been enhanced multiple times

Steps to reproduce the behavior.

I what to use druid admin to monitor some code, add the configuration below spring.datasource.druid.aop-patterns = com.**.business.handler.

Example codes for reproduce this issue (such as a github link).

aaron19940513 commented 1 month ago

image

need to backtrack twice to get the original class

linghengqian commented 1 month ago
aaron19940513 commented 1 month ago

I think you are right, this issue is caused by druid. After upgrading to the latest version of Druid, there are no more issues

And Thanks for your reminder, I will use druid carefully

linghengqian commented 1 month ago