We are encountered an issue with the Scheduler app in DHIS2 versions 2.40.4.1 When trying to schedule the Data Exchange service through scheduler app,
The API Response is {
“klass”: “org.hisp.dhis.scheduling.JobConfiguration”,
“index”: 0,
“errorReports”: [
{
“message”: “Failed to execute job: New D
”,
“mainKlass”: “org.hisp.dhis.scheduling.JobConfiguration”,
“errorCode”: “E7006”,
“errorProperties”:
}
]
}
and the logs indicate an error. Below is an excerpt from the logs:
ERROR 2024-09-23T16:35:00,548 java.lang.NullPointerException
at org.hisp.dhis.dxf2.datavalueset.ImportContext.getCurrentUserName(ImportContext.java:204)
Log
- INFO 2024-09-23T16:33:50,035 [AGGREGATE_DATA_EXCHANGE hDPEltcdhDJ] Process started: Aggregate data exchange of 1 exchange(s) started (ControlledJobProgress.java [taskScheduler-23]) UID:hDPEltcdhDJ
- INFO 2024-09-23T16:33:50,046 [AGGREGATE_DATA_EXCHANGE hDPEltcdhDJ] Stage started: exchange aggregate data new D to INTERNAL target (local) (ControlledJobProgress.java [taskScheduler-23]) UID:hDPEltcdhDJ
- INFO 2024-09-23T16:35:00,325 Is ISO calendar: true, skip lock exception check: true (DefaultDataValueSetService.java [taskScheduler-23]) UID:hDPEltcdhDJ
- INFO 2024-09-23T16:35:00,327 Skip audit: false, has authority to skip: false (DefaultDataValueSetService.java [taskScheduler-23]) UID:hDPEltcdhDJ
- INFO 2024-09-23T16:35:00,417 Import options: ImportOptions(idSchemes=IdSchemes{idScheme=null, dataElementIdScheme=IdScheme{identifiableProperty=CODE, attribute=null}, dataElementGroupIdScheme=null, categoryOptionComboIdScheme=IdScheme{identifiableProperty=CODE, attribute=null}, categoryOptionIdScheme=null, categoryIdScheme=null, orgUnitIdScheme=IdScheme{identifiableProperty=UID, attribute=null}, orgUnitGroupIdScheme=null, programIdScheme=null, programStageIdScheme=null, trackedEntityIdScheme=null, trackedEntityAttributeIdScheme=null, dataSetIdScheme=null, attributeOptionComboIdScheme=null, programStageInstanceIdScheme=null}, dryRun=false, preheatCache=null, async=false, importStrategy=CREATE_AND_UPDATE, mergeMode=REPLACE, reportMode=FULL, skipExistingCheck=false, sharing=false, skipNotifications=false, skipAudit=false, datasetAllowsPeriods=false, strictPeriods=false, strictDataElements=false, strictCategoryOptionCombos=false, strictAttributeOptionCombos=false, strictOrganisationUnits=false, strictDataSetApproval=false, strictDataSetLocking=false, strictDataSetInputPeriods=false, requireCategoryOptionCombo=false, requireAttributeOptionCombo=false, skipPatternValidation=false, ignoreEmptyCollection=false, force=false, firstRowIsHeader=true, filename=null, notificationLevel=null, skipLastUpdated=false, mergeDataValues=false, skipCache=false, dataSet=null) (DefaultDataValueSetService.java [taskScheduler-23]) UID:hDPEltcdhDJ
- INFO 2024-09-23T16:35:00,419 Identifier scheme: IdScheme{identifiableProperty=UID, attribute=null}, data element: IdScheme{identifiableProperty=CODE, attribute=null}, org unit: IdScheme{identifiableProperty=UID, attribute=null}, category option combo: IdScheme{identifiableProperty=CODE, attribute=null}, data set: IdScheme{identifiableProperty=UID, attribute=null} (DefaultDataValueSetService.java [taskScheduler-23]) UID:hDPEltcdhDJ
- INFO 2024-09-23T16:35:00,429 Starting data value import, options: ImportOptions(idSchemes=IdSchemes{idScheme=null, dataElementIdScheme=IdScheme{identifiableProperty=CODE, attribute=null}, dataElementGroupIdScheme=null, categoryOptionComboIdScheme=IdScheme{identifiableProperty=CODE, attribute=null}, categoryOptionIdScheme=null, categoryIdScheme=null, orgUnitIdScheme=IdScheme{identifiableProperty=UID, attribute=null}, orgUnitGroupIdScheme=null, programIdScheme=null, programStageIdScheme=null, trackedEntityIdScheme=null, trackedEntityAttributeIdScheme=null, dataSetIdScheme=null, attributeOptionComboIdScheme=null, programStageInstanceIdScheme=null}, dryRun=false, preheatCache=null, async=false, importStrategy=CREATE_AND_UPDATE, mergeMode=REPLACE, reportMode=FULL, skipExistingCheck=false, sharing=false, skipNotifications=false, skipAudit=false, datasetAllowsPeriods=false, strictPeriods=false, strictDataElements=false, strictCategoryOptionCombos=false, strictAttributeOptionCombos=false, strictOrganisationUnits=false, strictDataSetApproval=false, strictDataSetLocking=false, strictDataSetInputPeriods=false, requireCategoryOptionCombo=false, requireAttributeOptionCombo=false, skipPatternValidation=false, ignoreEmptyCollection=false, force=false, firstRowIsHeader=true, filename=null, notificationLevel=null, skipLastUpdated=false, mergeDataValues=false, skipCache=false, dataSet=null): 00:00:00.000 (Clock.java [taskScheduler-23]) UID:hDPEltcdhDJ
- INFO 2024-09-23T16:35:00,449 Validated outer meta-data: 00:00:00.028 (Clock.java [taskScheduler-23]) UID:hDPEltcdhDJ
- ERROR 2024-09-23T16:35:00,548 java.lang.NullPointerException
at org.hisp.dhis.dxf2.datavalueset.ImportContext.getCurrentUserName(ImportContext.java:204)
at org.hisp.dhis.dxf2.datavalueset.ImportContext.getStoredBy(ImportContext.java:258)
at org.hisp.dhis.dxf2.datavalueset.DefaultDataValueSetService.createDataValue(DefaultDataValueSetService.java:1293)
at org.hisp.dhis.dxf2.datavalueset.DefaultDataValueSetService.importDataValue(DefaultDataValueSetService.java:812)
at org.hisp.dhis.dxf2.datavalueset.DefaultDataValueSetService.importDataValueSet(DefaultDataValueSetService.java:745)
at org.hisp.dhis.dxf2.datavalueset.DefaultDataValueSetService.importDataValueSet(DefaultDataValueSetService.java:635)
at org.hisp.dhis.dxf2.datavalueset.DefaultDataValueSetService.importDataValueSet(DefaultDataValueSetService.java:575)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:123)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:388)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:241)
at com.sun.proxy.$Proxy258.importDataValueSet(Unknown Source)
at org.hisp.dhis.dataexchange.aggregate.AggregateDataExchangeService.pushToInternal(AggregateDataExchangeService.java:226)
at org.hisp.dhis.dataexchange.aggregate.AggregateDataExchangeService.exchangeData(AggregateDataExchangeService.java:204)
at org.hisp.dhis.dataexchange.aggregate.AggregateDataExchangeService.lambda$exchangeData$0(AggregateDataExchangeService.java:150)
at org.hisp.dhis.scheduling.JobProgress.runStage(JobProgress.java:325)
at org.hisp.dhis.dataexchange.aggregate.AggregateDataExchangeService.exchangeData(AggregateDataExchangeService.java:145)
at org.hisp.dhis.dataexchange.aggregate.AggregateDataExchangeService$$FastClassBySpringCGLIB$$e9a6e2ff.invoke()
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:792)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:762)
at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:123)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:388)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:762)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:707)
at org.hisp.dhis.dataexchange.aggregate.AggregateDataExchangeService$$EnhancerBySpringCGLIB$$bfae617.exchangeData()
at org.hisp.dhis.dataexchange.aggregate.AggregateDataExchangeJob.execute(AggregateDataExchangeJob.java:88)
at org.hisp.dhis.scheduling.AbstractSchedulingManager.execute(AbstractSchedulingManager.java:295)
at org.hisp.dhis.scheduling.DefaultSchedulingManager.lambda$executeNow$6(DefaultSchedulingManager.java:201)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
(DefaultDataValueSetService.java [taskScheduler-23]) UID:hDPEltcdhDJ - INFO 2024-09-23T16:35:00,551 [AGGREGATE_DATA_EXCHANGE hDPEltcdhDJ] Stage completed after 1m10.505s: Aggregate data exchange completed (1/1): ‘GNBCMUvDkX5’, type: ‘INTERNAL’ (ControlledJobProgress.java [taskScheduler-23]) UID:hDPEltcdhDJ
- ERROR 2024-09-23T16:35:00,559 [AGGREGATE_DATA_EXCHANGE hDPEltcdhDJ] Process failed after 1m10.524s: Aggregate data exchange completed with errors (ControlledJobProgress.java [taskScheduler-23]) UID:hDPEltcdhDJ
This is happening only for Scheduling Exchange job in 2.40.4.1 and also in 40.5
Manually triggering ADX through the ADX app works fine when using small parameter selections like a limited period or a few org units However, when scheduling the same ADX service, it fails due to a NullPointerException error related to the getStoredBy. This seems to be an issue in versions 2.40.4.1 and 2.4.5.
If anyone has encountered similar issues or has suggestions on resolving problems with the scheduler app, I’d greatly appreciate your assistance. Thanks!