We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Data integration: CRON driven scheduling strategy - @OnScheduled method due to java.lang.NullPointerException

Hi,
I'm testing Syncfusion Data Integration Platform and trying to invoke processor by CRON driven scheduling strategy.
I put into "Run Schedule" field this value: 0 19 22 10 7 ? 2017

But when I start processor I immediately get an error:
failed to invoke @OnScheduled method due to java.lang.NullPointerException

That errors happens with all processors which I try to run by CRON driven scheduling strategy.
Timer driven strategy works ok.

What is the reason?

2 Replies

IB Ilya Bo July 10, 2017 05:50 PM UTC

From log file:

ERROR [Timer-Driven Process Thread-2] org.apache.hadoop.util.Shell Failed to locate the winutils binary in the hadoop binary path

java.io.IOException: Could not locate executable null\bin\winutils.exe in the Hadoop binaries.

  at org.apache.hadoop.util.Shell.getQualifiedBinPath(Shell.java:379) [hadoop-common-2.7.3.jar:na]

  at org.apache.hadoop.util.Shell.getWinUtilsPath(Shell.java:394) [hadoop-common-2.7.3.jar:na]

  ....

ERROR [StandardProcessScheduler Thread-1] o.a.n.p.standard.GenerateFlowFile GenerateFlowFile[id=347af75d-b2d1-4460-3037-a4ca4fcd25fb] GenerateFlowFile[id=347af75d-b2d1-4460-3037-a4ca4fcd25fb] failed to invoke @OnScheduled method due to java.lang.NullPointerException; processor will not be scheduled to run for 30 seconds: java.lang.NullPointerException

2017-07-10 23:17:53,844 ERROR [StandardProcessScheduler Thread-1] o.a.n.p.standard.GenerateFlowFile 

java.lang.NullPointerException: null

  at org.apache.nifi.controller.scheduling.QuartzSchedulingAgent.doSchedule(QuartzSchedulingAgent.java:185) ~[na:na]

....









KM Krishna Mohan Syncfusion Team July 12, 2017 09:56 AM UTC

Hi Ilya Bo, 

Thank you for contacting Syncfusion Support. 

Please find the below response. 

I put into "Run Schedule" field this value: 0 19 22 10 7 ? 2017 
But when I start processor I immediately get an error: 
failed to invoke @OnScheduled method due to java.lang.NullPointerException 

Given error may be caused due to following two reasons. 
  1. If the given CRON expression is invalid.
  2. If the given date is in past.

Here the given expression “0 19 22 10 7 ? 2017” is valid.  

Please, ensure that the entered date and time is forth coming date and time or not, if the processor scheduled to particular date. 

Try this CRON expression “0 15 23 12 7 ? 2017” which starts at 11.15 PM on 12th July 2017 (i.e. today). 


Below are the few examples for CRON expression. 

CRON – DRIVEN Expression 
Meaning 
Next Scheduled dates. 
0 0 13 12 JUL ? 2017 
(or) 
0 0 13 12 7 ? 2017 
Starts at 1.00 PM on 12th July 2017 
  • Run only once.
0 0 13 12 JUL ? 2017-2020 
(or) 
0 0 13 12 7 ? 2017-2020 
Starts at 1.00 PM on 12th July during the years 2017,2018,2019 and 2020. 
  • Wednesday, July 12, 2017 1:00 PM
  • Thursday, July 12, 2018 1:00 PM
  • Friday, July 12, 2019 1:00 PM
  • Sunday, July 12, 2020 1:00 PM
0 0 13 12 7 ? * 
(or) 
0 0 13 12 JUL ? * 
Starts at 1:00 PM on 12th July on every year 
  • Wednesday, July 12, 2017 1:00 PM
  • Thursday, July 12, 2018 1:00 PM
  • Friday, July 12, 2019 1:00 PM
  • Sunday, July 12, 2020 1:00 PM
  • Monday, July 12, 2021 1:00 PM
0 0 13 * * ? 2017 
Starts at 1:00 PM every day during the year 2017 
  • Wednesday, July 12, 2017 1:00 PM
  • Thursday, July 13, 2017 1:00 PM
  • Friday, July 14, 2017 1:00 PM
  • Saturday, July 15, 2017 1:00 PM
  • Sunday, July 16, 2017 1:00 PM

Please let us know, if you need any further assistance. 

Regards, 
Krishna M. 


Loader.
Up arrow icon