Null Pointer Exception/ Status 500 error on accessing Maintenance/Programs and Tracker Capture app

Hello, I’ve recently discovered that I can no longer properly access my tracker programs or TEI details from both the maintenance and the tracker program applications. Errors on the front-end and the catalina.out file attached

DHIS2 Installation Details:

OS: Ubuntu 20
Open JDK 11, Postgres 13, Tomcat 9
DHIS2 Version: 2.37.9

Furthermore, I have a PHP application making calls to access TEI data, and it was working fine, I even populated the db with the respective data. Recently, it is throwing an error indicating that the API GET request doesn’t have a response array, and when I var_dump the response, I receive a NULL, yet there is data present as I can see in an event report, and even with the similar request on Postman

Sorry to hear you’re facing this issue. Would you please share the full Catalina.out (without sensitive info) as text so it’s easier to check?

And may I ask what is the API request (at least the endpoint) that’s being used?

It might help to perform cache clearing and maintenance, please use the steps in the screenshot below (in the same order):

After performing the above, please check again in Guest mode. Thanks!

Unfortunately, clearing cache and maintenance has not helped and the problem persists.

Attached is the catalina.out snippet as relates to the error.

Catalina. out error snippet.docx (18.2 KB)

As for the API endpoint, this is the trackedEntityInstances, attached is the function that is returning a null response (but was previously working w/o any edit on my end), and the same returns data on Postman

public function getOyoStateTEI()
        $curl = curl_init();

        curl_setopt_array($curl, array(
            CURLOPT_URL => '**https://xxxx/api/trackedEntityInstances?trackedEntityType=QZnlVF9iSlD&ou=tlQ8sphSGJm&skipPaging=true'**,
            CURLOPT_RETURNTRANSFER => true,
            CURLOPT_ENCODING => '',
            CURLOPT_FOLLOWLOCATION => true,
            CURLOPT_HTTPHEADER => array(
                'Authorization: Basic xxxx',
                'Cookie: JSESSIONID=xxxxx',
                'Content-Type: application/json',

        $result = curl_exec($curl);


        // Decoding JSON data
        $data = json_decode($result, true);

        return $data;

Is there any response on the same?

1 Like

The errors show that there is an issue with the analytics tables. Please use the Data Administration app first:

And then run the analytics tables export. After running the analytics tables export please check if these errors persist. Thank you!

Hey @Gassim, yes the error persists after taking the recommended steps.

Also, do the analytics tables have to do with accessing tracker programs through maintenance and tracker capture? Not sure how they relate.

Has the snippet of the catalina.out log been of any help?