You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2020/10/11 12:45:40 UTC

[GitHub] [shardingsphere-elasticjob] TeslaCN opened a new issue #1551: Using lambda implementation of interface SimpleJob may cause job conflict exception

TeslaCN opened a new issue #1551:
URL: https://github.com/apache/shardingsphere-elasticjob/issues/1551


   ## Bug Report
   
   ### Actual behavior
   
   ```
   Exception in thread "main" org.apache.shardingsphere.elasticjob.infra.exception.JobConfigurationException: Job conflict with register center. The job 'lambda-simple' in register center's class is 'org.apache.shardingsphere.elasticjob.lite.example.once.LambdaMain$$Lambda$7/542365801', your job class is 'org.apache.shardingsphere.elasticjob.lite.example.once.LambdaMain$$Lambda$8/542365801'
   	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.<init>(JobScheduler.java:87)
   	at org.apache.shardingsphere.elasticjob.lite.api.bootstrap.impl.ScheduleJobBootstrap.<init>(ScheduleJobBootstrap.java:41)
   	at org.apache.shardingsphere.elasticjob.lite.example.once.LambdaMain.main(LambdaMain.java:47)
   ```
   
   ### Example codes for reproduce this issue (such as a github link).
   ```java
           SimpleJob simpleJob = System.out::println;
           new ScheduleJobBootstrap(REGISTRY_CENTER, simpleJob,
                   JobConfiguration.newBuilder("lambda-simple", 3)
                           .cron("0/5 * * * * ?")
                           .shardingItemParameters("0=Beijing,1=Shanghai,2=Guangzhou")
                           .jobErrorHandlerType("log")
                           .overwrite(true)
                           .build(),
                   TRACING_CONFIGURATION)
                   .schedule();
   ```
   
   ### Reason analyze (If you can)
   Lambda expression will be converted to a synthetic class. The class name is not fixed and it may be different each startup.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere-elasticjob] terrymanu closed issue #1551: Using lambda implementation of interface SimpleJob may cause job conflict exception

Posted by GitBox <gi...@apache.org>.
terrymanu closed issue #1551:
URL: https://github.com/apache/shardingsphere-elasticjob/issues/1551


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere-elasticjob] jiang2015 commented on issue #1551: Using lambda implementation of interface SimpleJob may cause job conflict exception

Posted by GitBox <gi...@apache.org>.
jiang2015 commented on issue #1551:
URL: https://github.com/apache/shardingsphere-elasticjob/issues/1551#issuecomment-706815429


   this problem need to analyze,if do this,let me try。


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org