Capture app tracker program import error

I am running a tracker import job on android capture

I get this error on the catalina.out file

 INFO  2024-07-16T21:03:20,341 Tracker import started (NotificationLoggerUtil.java [pool-4-thread-1]) UID:Yvony13hgOk
* INFO  2024-07-16T21:03:20,341 [TRACKER_IMPORT_JOB Yvony13hgOk] Process started: Tracker import started (RecordingJobProgress.java [pool-4-thread-1]) UID:Yvony13hgOk
* INFO  2024-07-16T21:03:20,341 Loading file resource (NotificationLoggerUtil.java [pool-4-thread-1]) UID:Yvony13hgOk
* INFO  2024-07-16T21:03:20,341 [TRACKER_IMPORT_JOB Yvony13hgOk] : Loading file resource (RecordingJobProgress.java [pool-4-thread-1]) UID:Yvony13hgOk
* INFO  2024-07-16T21:03:20,343 [TRACKER_IMPORT_JOB Yvony13hgOk] completed after 0.002s (RecordingJobProgress.java [pool-4-thread-1]) UID:Yvony13hgOk
* INFO  2024-07-16T21:03:20,343 Loading file content (NotificationLoggerUtil.java [pool-4-thread-1]) UID:Yvony13hgOk
* INFO  2024-07-16T21:03:20,343 [TRACKER_IMPORT_JOB Yvony13hgOk] : Loading file content (RecordingJobProgress.java [pool-4-thread-1]) UID:Yvony13hgOk
* INFO  2024-07-16T21:03:20,344 [TRACKER_IMPORT_JOB Yvony13hgOk] completed after 0.001s (RecordingJobProgress.java [pool-4-thread-1]) UID:Yvony13hgOk
* INFO  2024-07-16T21:03:20,347 Running PreHeat (NotificationLoggerUtil.java [pool-4-thread-1]) UID:Yvony13hgOk
* INFO  2024-07-16T21:03:20,348 [TRACKER_IMPORT_JOB Yvony13hgOk] : Running PreHeat (RecordingJobProgress.java [pool-4-thread-1]) UID:Yvony13hgOk
* INFO  2024-07-16T21:03:20,438 [TRACKER_IMPORT_JOB Yvony13hgOk] completed after 0.09s (RecordingJobProgress.java [pool-4-thread-1]) UID:Yvony13hgOk
* INFO  2024-07-16T21:03:20,438 Calculating Payload Size (NotificationLoggerUtil.java [pool-4-thread-1]) UID:Yvony13hgOk
* INFO  2024-07-16T21:03:20,438 [TRACKER_IMPORT_JOB Yvony13hgOk] : Calculating Payload Size (RecordingJobProgress.java [pool-4-thread-1]) UID:Yvony13hgOk
* INFO  2024-07-16T21:03:20,439 [TRACKER_IMPORT_JOB Yvony13hgOk] completed after 0s (RecordingJobProgress.java [pool-4-thread-1]) UID:Yvony13hgOk
* INFO  2024-07-16T21:03:20,439 Running PreProcess (NotificationLoggerUtil.java [pool-4-thread-1]) UID:Yvony13hgOk
* INFO  2024-07-16T21:03:20,439 [TRACKER_IMPORT_JOB Yvony13hgOk] : Running PreProcess (RecordingJobProgress.java [pool-4-thread-1]) UID:Yvony13hgOk
* INFO  2024-07-16T21:03:20,439 [TRACKER_IMPORT_JOB Yvony13hgOk] completed after 0s (RecordingJobProgress.java [pool-4-thread-1]) UID:Yvony13hgOk
* INFO  2024-07-16T21:03:20,439 Running Validation (NotificationLoggerUtil.java [pool-4-thread-1]) UID:Yvony13hgOk
* INFO  2024-07-16T21:03:20,439 [TRACKER_IMPORT_JOB Yvony13hgOk] : Running Validation (RecordingJobProgress.java [pool-4-thread-1]) UID:Yvony13hgOk
* INFO  2024-07-16T21:03:20,450 [TRACKER_IMPORT_JOB Yvony13hgOk] completed after 0.011s (RecordingJobProgress.java [pool-4-thread-1]) UID:Yvony13hgOk
* INFO  2024-07-16T21:03:20,450 Running Rule Engine (NotificationLoggerUtil.java [pool-4-thread-1]) UID:Yvony13hgOk
* INFO  2024-07-16T21:03:20,450 [TRACKER_IMPORT_JOB Yvony13hgOk] : Running Rule Engine (RecordingJobProgress.java [pool-4-thread-1]) UID:Yvony13hgOk
* ERROR 2024-07-16T21:03:20,457 Parameter specified as non-null is null: method org.hisp.dhis.rules.models.RuleEnrollment.<init>, parameter organisationUnitCode (NotificationLoggerUtil.java [pool-4-thread-1]) UID:Yvony13hgOk
* WARN  2024-07-16T21:03:20,457 [TRACKER_IMPORT_JOB Yvony13hgOk] Process aborted after 0.116s: aborted after error: Parameter specified as non-null is null: method org.hisp.dhis.rules.models.RuleEnrollment.<init>, parameter organisation>
* ERROR 2024-07-16T21:03:20,457 [TRACKER_IMPORT_JOB Yvony13hgOk] failed after 0.007s: Parameter specified as non-null is null: method org.hisp.dhis.rules.models.RuleEnrollment.<init>, parameter organisationUnitCode (RecordingJobProgress>
java.lang.NullPointerException: Parameter specified as non-null is null: method org.hisp.dhis.rules.models.RuleEnrollment.<init>, parameter organisationUnitCode
        at org.hisp.dhis.rules.models.RuleEnrollment.<init>(RuleEnrollment.kt) ~[rule-engine-jvm-3.0.0.jar:?]
        at org.hisp.dhis.programrule.engine.DefaultProgramRuleEntityMapperService.toMappedRuleEnrollment(DefaultProgramRuleEntityMapperService.java:231) ~[dhis-service-program-rule-2.41.0.1.jar:?]
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
        at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344) ~[spring-aop-5.3.33.jar:5.3.33]
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198) ~[spring-aop-5.3.33.jar:5.3.33]
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) ~[spring-aop-5.3.33.jar:5.3.33]
        at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:123) ~[spring-tx-5.3.33.jar:5.3.33]
        at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:388) ~[spring-tx-5.3.33.jar:5.3.33]
        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119) ~[spring-tx-5.3.33.jar:5.3.33]
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.3.33.jar:5.3.33]
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:241) ~[spring-aop-5.3.33.jar:5.3.33]
        at jdk.proxy3/jdk.proxy3.$Proxy491.toMappedRuleEnrollment(Unknown Source) ~[?:?]
        at org.hisp.dhis.programrule.engine.ProgramRuleEngine.getRuleEnrollment(ProgramRuleEngine.java:258) ~[dhis-service-program-rule-2.41.0.1.jar:?]
        at org.hisp.dhis.programrule.engine.ProgramRuleEngine.evaluateEnrollmentAndEvents(ProgramRuleEngine.java:120) ~[dhis-service-program-rule-2.41.0.1.jar:?]
        at org.hisp.dhis.tracker.imports.programrule.DefaultProgramRuleService.lambda$calculateEnrollmentRuleEffects$0(DefaultProgramRuleService.java:118) ~[dhis-service-tracker-2.41.0.1.jar:?]
        at java.base/java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:273) ~[?:?]
        at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625) ~[?:?]
        at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) ~[?:?]
        at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) ~[?:?]
        at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:575) ~[?:?]
        at java.base/java.util.stream.AbstractPipeline.evaluateToArrayNode(AbstractPipeline.java:260) ~[?:?]
        at java.base/java.util.stream.ReferencePipeline.toArray(ReferencePipeline.java:616) ~[?:?]
        at java.base/java.util.stream.ReferencePipeline.toArray(ReferencePipeline.java:622) ~[?:?]
at java.base/java.util.stream.ReferencePipeline.toList(ReferencePipeline.java:627) ~[?:?]
        at org.hisp.dhis.tracker.imports.programrule.DefaultProgramRuleService.calculateEnrollmentRuleEffects(DefaultProgramRuleService.java:124) ~[dhis-service-tracker-2.41.0.1.jar:?]
        at org.hisp.dhis.tracker.imports.programrule.DefaultProgramRuleService.calculateRuleEffects(DefaultProgramRuleService.java:95) ~[dhis-service-tracker-2.41.0.1.jar:?]
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
        at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344) ~[spring-aop-5.3.33.jar:5.3.33]
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198) ~[spring-aop-5.3.33.jar:5.3.33]
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) ~[spring-aop-5.3.33.jar:5.3.33]
        at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:123) ~[spring-tx-5.3.33.jar:5.3.33]
        at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:388) ~[spring-tx-5.3.33.jar:5.3.33]
        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119) ~[spring-tx-5.3.33.jar:5.3.33]
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.3.33.jar:5.3.33]
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:241) ~[spring-aop-5.3.33.jar:5.3.33]
        at jdk.proxy3/jdk.proxy3.$Proxy523.calculateRuleEffects(Unknown Source) ~[?:?]
        at org.hisp.dhis.tracker.imports.bundle.DefaultTrackerBundleService.runRuleEngine(DefaultTrackerBundleService.java:105) ~[dhis-service-tracker-2.41.0.1.jar:?]
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
        at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344) ~[spring-aop-5.3.33.jar:5.3.33]
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:234) ~[spring-aop-5.3.33.jar:5.3.33]
        at jdk.proxy3/jdk.proxy3.$Proxy524.runRuleEngine(Unknown Source) ~[?:?]
        at org.hisp.dhis.tracker.imports.DefaultTrackerImportService.lambda$importTracker$4(DefaultTrackerImportService.java:102) ~[dhis-service-tracker-2.41.0.1.jar:?]
        at org.hisp.dhis.scheduling.JobProgress.runStage(JobProgress.java:481) ~[dhis-api-2.41.0.1.jar:?]
        at org.hisp.dhis.scheduling.JobProgress.runStage(JobProgress.java:463) ~[dhis-api-2.41.0.1.jar:?]
        at org.hisp.dhis.scheduling.JobProgress.runStage(JobProgress.java:456) ~[dhis-api-2.41.0.1.jar:?]
        at org.hisp.dhis.tracker.imports.DefaultTrackerImportService.importTracker(DefaultTrackerImportService.java:102) ~[dhis-service-tracker-2.41.0.1.jar:?]
        at org.hisp.dhis.webapi.controller.tracker.imports.TrackerImportJob.execute(TrackerImportJob.java:77) ~[dhis-web-api-2.41.0.1.jar:?]
        at org.hisp.dhis.scheduling.JobScheduler.runDueJob(JobScheduler.java:231) ~[dhis-service-core-2.41.0.1.jar:?]
        at org.hisp.dhis.scheduling.JobScheduler.runContinuous(JobScheduler.java:186) ~[dhis-service-core-2.41.0.1.jar:?]
        at org.hisp.dhis.scheduling.JobScheduler.lambda$runIfDue$1(JobScheduler.java:173) ~[dhis-service-core-2.41.0.1.jar:?]
        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) [?:?]
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) [?:?]
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [?:?]
        at java.base/java.lang.Thread.run(Thread.java:840) [?:?]
* ERROR 2024-07-16T21:03:20,458 Process failed: java.util.concurrent.CancellationException (NotificationLoggerUtil.java [pool-4-thread-1]) UID:Yvony13hgOk
* ERROR 2024-07-16T21:03:20,461 Job failed: 'TRACKER_IMPORT_JOB (1721153000310)' (DefaultJobSchedulerLoopService.java [pool-4-thread-1]) UID:Yvony13hgOk

How do I know what is wrong?

The ous don’t use codes! So I am getting confused as to why the error is stating that oucode is non-null but is null

I experienced this is version 2.40 and 2.41

Hi @lillian1n2

Sorry to see you’re facing this issue. I see the following in the error log:

It seems that one of the OUs you are trying to enroll in, doesn’t have a ‘code’ in its configuration please add that and see if it works.

Thanks!