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 2021/03/04 06:09:55 UTC

[GitHub] [shardingsphere-elasticjob] candyYu opened a new issue #1845: error when i use elastic-job-lite with java api

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


   I get the error next
   org.apache.shardingsphere.elasticjob.infra.exception.JobConfigurationException: Can not find executor for elastic job class 
   
   
   i have already import the jar
   
           <dependency>
               <groupId>org.apache.shardingsphere.elasticjob</groupId>
               <artifactId>elasticjob-lite-core</artifactId>
               <version>${elasticjob-version}</version>
           </dependency>
           <dependency>
               <groupId>org.apache.shardingsphere.elasticjob</groupId>
               <artifactId>elasticjob-dataflow-executor</artifactId>
               <version>${elasticjob-version}</version>
           </dependency>


----------------------------------------------------------------
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] candyYu commented on issue #1845: error when i use elastic-job-lite with java api

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


   what depedency i forgot to import?  I got the error next, i can run in my idea when i run it with java -jar  i got the next error
   
   Exception in thread "main" org.apache.shardingsphere.elasticjob.infra.yaml.exception.YamlConfigurationConverterNotFoundException: No YamlConfigurationConverter found for class [org.apache.shardingsphere.elasticjob.tracing.api.TracingConfiguration]
           at org.apache.shardingsphere.elasticjob.infra.pojo.JobConfigurationPOJO.lambda$null$0(JobConfigurationPOJO.java:121)
           at java.util.Optional.orElseThrow(Optional.java:290)
   
   
   > Could you check if your classpath include the following JARs:
   > 
   > * elasticjob-infra-common
   > * elasticjob-error-handler-general
   
   


----------------------------------------------------------------
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] TeslaCN commented on issue #1845: error when i use elastic-job-lite with java api

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


   Since you have configured TracingConfiguration, check if your classpath include the following JARs:
   * elasticjob-tracing-api
   * elasticjob-tracing-rdb


----------------------------------------------------------------
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] TeslaCN commented on issue #1845: error when i use elastic-job-lite with java api

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


   Could you check if your classpath include the following JARs:
   - elasticjob-infra-common
   - elasticjob-error-handler-general


----------------------------------------------------------------
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] candyYu commented on issue #1845: error when i use elastic-job-lite with java api

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


   after i recompile my package it can goes well; but i got the error next
   2021-03-04 15:44:00,003 [org.quartz.core.ErrorLogger.schedulerError(QuartzScheduler.java:2425)][scheduleJob_Worker-1] - [ ERROR ]  Job (DEFAULT.scheduleJob threw an exception.
   org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: java.lang.NullPointerException]
           at org.quartz.core.JobRunShell.run(JobRunShell.java:213)
           at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)
   Caused by: java.lang.NullPointerException
           at org.apache.shardingsphere.elasticjob.executor.context.ExecutorContext.get(ExecutorContext.java:75)
           at org.apache.shardingsphere.elasticjob.executor.ElasticJobExecutor.execute(ElasticJobExecutor.java:79)
           at org.apache.shardingsphere.elasticjob.lite.internal.schedule.LiteJob.execute(LiteJob.java:35)
           at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
           ... 1 more
   
   i could'nt figure out why, because it runs well in my person macbook


----------------------------------------------------------------
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] ilovewsy commented on issue #1845: error when i use elastic-job-lite with java api

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


   i also get the same error when i run it with java -jar
   16:51:35.005 [MySimpleJob_Worker-1] DEBUG org.quartz.core.JobRunShell - Calling execute on job DEFAULT.MySimpleJob
   16:51:35.007 [MySimpleJob_Worker-1] ERROR org.quartz.core.JobRunShell - Job DEFAULT.MySimpleJob threw an unhandled Exception:
   java.lang.NullPointerException: null
   	at org.apache.shardingsphere.elasticjob.executor.context.ExecutorContext.get(ExecutorContext.java:75)
   	at org.apache.shardingsphere.elasticjob.executor.ElasticJobExecutor.execute(ElasticJobExecutor.java:79)
   	at org.apache.shardingsphere.elasticjob.lite.internal.schedule.LiteJob.execute(LiteJob.java:35)
   	at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
   	at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)
   16:51:35.007 [MySimpleJob_Worker-1] ERROR org.quartz.core.ErrorLogger - Job (DEFAULT.MySimpleJob threw an exception.
   org.quartz.SchedulerException: Job threw an unhandled exception.
   	at org.quartz.core.JobRunShell.run(JobRunShell.java:213)
   	at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)
   Caused by: java.lang.NullPointerException: null
   	at org.apache.shardingsphere.elasticjob.executor.context.ExecutorContext.get(ExecutorContext.java:75)
   	at org.apache.shardingsphere.elasticjob.executor.ElasticJobExecutor.execute(ElasticJobExecutor.java:79)
   	at org.apache.shardingsphere.elasticjob.lite.internal.schedule.LiteJob.execute(LiteJob.java:35)
   	at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
   	... 1 common frames omitted


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

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

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



[GitHub] [shardingsphere-elasticjob] candyYu commented on issue #1845: error when i use elastic-job-lite with java api

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


   i add it, now my dependency are
    <dependency>
               <groupId>org.apache.shardingsphere.elasticjob</groupId>
               <artifactId>elasticjob-lite-core</artifactId>
               <version>${elasticjob-version}</version>
           </dependency>
           <dependency>
               <groupId>org.apache.shardingsphere.elasticjob</groupId>
               <artifactId>elasticjob-dataflow-executor</artifactId>
               <version>${elasticjob-version}</version>
           </dependency>
           <dependency>
               <groupId>org.apache.shardingsphere.elasticjob</groupId>
               <artifactId>elasticjob-simple-executor</artifactId>
               <version>${elasticjob-version}</version>
           </dependency>
           <dependency>
               <groupId>org.apache.shardingsphere.elasticjob</groupId>
               <artifactId>elasticjob-infra-common</artifactId>
               <version>${elasticjob-version}</version>
           </dependency>
           <dependency>
               <groupId>org.apache.shardingsphere.elasticjob</groupId>
               <artifactId>elasticjob-error-handler-general</artifactId>
               <version>${elasticjob-version}</version>
           </dependency>
   
   but i got the same error
   
   2021-03-04 17:08:38,431 [org.apache.shardingsphere.elasticjob.lite.internal.schedule.JobShutdownHookPlugin.registerShutdownHook(JobShutdownHookPlugin.java:75)][main] - [ INFO ]  Registering Quartz shutdown hook. ScheduleJob
   2021-03-04 17:08:38,431 [org.quartz.simpl.RAMJobStore.initialize(RAMJobStore.java:155)][main] - [ INFO ]  RAMJobStore initialized.
   2021-03-04 17:08:38,431 [org.quartz.core.QuartzScheduler.initialize(QuartzScheduler.java:305)][main] - [ INFO ]  Scheduler meta-data: Quartz Scheduler (v2.2.1) 'ScheduleJob' with instanceId 'NON_CLUSTERED'
     Scheduler class: 'org.quartz.core.QuartzScheduler' - running locally.
     NOT STARTED.
     Currently in standby mode.
     Number of jobs executed: 0
     Using thread pool 'org.quartz.simpl.SimpleThreadPool' - with 1 threads.
     Using job-store 'org.quartz.simpl.RAMJobStore' - which does not support persistence. and is not clustered.
   ..........
   2021-03-04 18:13:00,004 [org.quartz.core.ErrorLogger.schedulerError(QuartzScheduler.java:2425)][ScheduleJob_Worker-1] - [ ERROR ]  Job (DEFAULT.ScheduleJob threw an exception.
   org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: java.lang.NullPointerException]
           at org.quartz.core.JobRunShell.run(JobRunShell.java:213)
           at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)
   Caused by: java.lang.NullPointerException
           at org.apache.shardingsphere.elasticjob.executor.context.ExecutorContext.get(ExecutorContext.java:75)
           at org.apache.shardingsphere.elasticjob.executor.ElasticJobExecutor.execute(ElasticJobExecutor.java:79)
           at org.apache.shardingsphere.elasticjob.lite.internal.schedule.LiteJob.execute(LiteJob.java:35)
           at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
           ... 1 more
   
   Job (DEFAULT.ScheduleJob )   before  Quartz Scheduler (v2.2.1) 'ScheduleJob'   does this matter?


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