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/30 06:00:56 UTC

[GitHub] [shardingsphere-elasticjob] gzdzss opened a new issue #1679: elasticjob-example-lite-java is run error

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


    
    ElasticJob-Lite 
    
   
   ### Actual behavior
   
   Run : org.apache.shardingsphere.elasticjob.lite.example.JavaMain 
   
   
   ```
   [ERROR] 2020-10-30 13:55:23,520 --main-- [org.apache.zookeeper.server.NIOServerCnxnFactory] Thread Thread[main,5,main] died 
   java.lang.NullPointerException: null
   	at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:936) ~[na:1.8.0_231]
   	at org.apache.shardingsphere.elasticjob.infra.spi.ElasticJobServiceLoader.lambda$newTypedServiceInstance$4(ElasticJobServiceLoader.java:81) ~[classes/:na]
   	at java.util.Optional.map(Optional.java:215) ~[na:1.8.0_231]
   	at org.apache.shardingsphere.elasticjob.infra.spi.ElasticJobServiceLoader.newTypedServiceInstance(ElasticJobServiceLoader.java:81) ~[classes/:na]
   	at org.apache.shardingsphere.elasticjob.lite.internal.schedule.JobScheduler.validateJobErrorHandlerProperties(JobScheduler.java:122) ~[classes/:na]
   	at org.apache.shardingsphere.elasticjob.lite.internal.schedule.JobScheduler.validateJobProperties(JobScheduler.java:118) ~[classes/:na]
   	at org.apache.shardingsphere.elasticjob.lite.internal.schedule.JobScheduler.<init>(JobScheduler.java:102) ~[classes/:na]
   	at org.apache.shardingsphere.elasticjob.lite.api.bootstrap.impl.ScheduleJobBootstrap.<init>(ScheduleJobBootstrap.java:40) ~[classes/:na]
   	at org.apache.shardingsphere.elasticjob.lite.example.JavaMain.setUpHttpJob(JavaMain.java:101) ~[classes/:na]
   	at org.apache.shardingsphere.elasticjob.lite.example.JavaMain.main(JavaMain.java:71) ~[classes/:na]
   
   ````
   
   
   ### Reason analyze (If you can)
   
   jobErrorHandlerType  is null , need default to be "LOG".
   
   
   ```java
   private void validateJobErrorHandlerProperties() {
           ElasticJobServiceLoader.newTypedServiceInstance(JobErrorHandlerPropertiesValidator.class, jobConfig.getJobErrorHandlerType(), jobConfig.getProps())
                   .ifPresent(validator -> validator.validate(jobConfig.getProps()));
       }
   ```
   
   
   
     
   


----------------------------------------------------------------
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 #1679: elasticjob-example-lite-java is run error

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


   


----------------------------------------------------------------
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