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


   I run the demo job according to the document 
(https://shardingsphere.apache.org/elasticjob/current/en/quick-start/elasticjob-lite/#import-maven-dependency),
 but it crashed.
   
   **Please help me find what i am wrong.**
   
   Import the dependency 
   
   ```
   <dependency>
               <groupId>org.apache.shardingsphere.elasticjob</groupId>
               <artifactId>elasticjob-lite-core</artifactId>
               <version>3.0.0-RC1</version>
    </dependency>
   
   ```
   
   Then add my job
   ```
   public class MyJob implements SimpleJob {
   
       @Override
       public void execute(ShardingContext context) {
           System.out.println("test");
       }
   }
   
   ```
   
   ```
   public class MyJobDemo {
       public static void main(String[] args) {
           new ScheduleJobBootstrap(createRegistryCenter(), new MyJob(), 
createJobConfiguration()).schedule();
       }
   
   
       private static CoordinatorRegistryCenter createRegistryCenter() {
           CoordinatorRegistryCenter regCenter = new 
ZookeeperRegistryCenter(new ZookeeperConfiguration("127.0.0.1:2181", "my-job"));
           regCenter.init();
           return regCenter;
       }
   
       private static JobConfiguration createJobConfiguration() {
           return JobConfiguration.newBuilder("MyJob", 3).cron("0/5 * * * * 
?").build();
       }
   }
   ```
   
   The error msg is 
   
   ```
   Exception in thread "main" 
org.apache.shardingsphere.elasticjob.reg.exception.RegException: 
org.apache.zookeeper.KeeperException$UnimplementedException: KeeperErrorCode = 
Unimplemented for /my-job/MyJob/config
        at 
org.apache.shardingsphere.elasticjob.reg.exception.RegExceptionHandler.handleException(RegExceptionHandler.java:48)
        at 
org.apache.shardingsphere.elasticjob.reg.zookeeper.ZookeeperRegistryCenter.persist(ZookeeperRegistryCenter.java:219)
        at 
org.apache.shardingsphere.elasticjob.lite.internal.storage.JobNodeStorage.replaceJobNode(JobNodeStorage.java:170)
        at 
org.apache.shardingsphere.elasticjob.lite.internal.config.ConfigurationService.setUpJobConfiguration(ConfigurationService.java:72)
        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:84)
        at 
org.apache.shardingsphere.elasticjob.lite.api.bootstrap.impl.ScheduleJobBootstrap.<init>(ScheduleJobBootstrap.java:36)
        at elastic_job.MyJobDemo.main(MyJobDemo.java:15)
   Caused by: org.apache.zookeeper.KeeperException$UnimplementedException: 
KeeperErrorCode = Unimplemented for /my-job/MyJob/config
   ```
   


----------------------------------------------------------------
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:
[email protected]


Reply via email to