DHIS2 Job Analytics Failed

Hello Community,

I have noticed my DHIS2 server v2.29 is sending the message below. Anyone with pointers as to what the problem/cause and solution could be?
Thanks.

Message: StatementCallback; uncategorized SQLException for SQL [drop table if exists analytics_event_fnghupdwosr;alter table analytics_event_temp_fnghupdwosr rename to analytics_event_fnghupdwosr;]; SQL state [2BP01]; error code [0]; ERROR: cannot drop table analytics_event_fnghupdwosr because other objects depend on it
Detail: table analytics_event_2017_fnghupdwosr depends on table analytics_event_fnghupdwosr
Hint: Use DROP … CASCADE to drop the dependent objects too.; nested exception is org.postgresql.util.PSQLException: ERROR: cannot drop table analytics_event_fnghupdwosr because other objects depend on it
Detail: table analytics_event_2017_fnghupdwosr depends on table analytics_event_fnghupdwosr
Hint: Use DROP … CASCADE to drop the dependent objects too.

Cause: org.postgresql.util.PSQLException: ERROR: cannot drop table analytics_event_fnghupdwosr because other objects depend on it
Detail: table analytics_event_2017_fnghupdwosr depends on table analytics_event_fnghupdwosr
Hint: Use DROP … CASCADE to drop the dependent objects too.
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2422)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2167)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:306)
at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:441)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:365)
at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:307)
at org.postgresql.jdbc.PgStatement.executeCachedSql(PgStatement.java:293)
at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:270)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:266)
at com.mchange.v2.c3p0.impl.NewProxyStatement.execute(NewProxyStatement.java:75)
at org.springframework.jdbc.core.JdbcTemplate$1ExecuteStatementCallback.doInStatement(JdbcTemplate.java:436)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:408)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:445)
at org.hisp.dhis.analytics.table.AbstractJdbcTableManager.executeSilently(AbstractJdbcTableManager.java:344)
at org.hisp.dhis.analytics.table.AbstractJdbcTableManager.swapTable(AbstractJdbcTableManager.java:522)
at org.hisp.dhis.analytics.table.AbstractJdbcTableManager.swapTable(AbstractJdbcTableManager.java:177)
at sun.reflect.GeneratedMethodAccessor2978.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)
at com.sun.proxy.$Proxy145.swapTable(Unknown Source)
at org.hisp.dhis.analytics.table.DefaultAnalyticsTableService.lambda$swapTables$5(DefaultAnalyticsTableService.java:379)
at java.util.ArrayList.forEach(ArrayList.java:1257)
at org.hisp.dhis.analytics.table.DefaultAnalyticsTableService.swapTables(DefaultAnalyticsTableService.java:379)
at org.hisp.dhis.analytics.table.DefaultAnalyticsTableService.update(DefaultAnalyticsTableService.java:182)
at org.hisp.dhis.analytics.table.DefaultAnalyticsTableGenerator.generateTables(DefaultAnalyticsTableGenerator.java:115)
at org.hisp.dhis.analytics.table.scheduling.AnalyticsTableJob.execute(AnalyticsTableJob.java:70)
at org.hisp.dhis.scheduling.DefaultJobInstance.executeJob(DefaultJobInstance.java:145)
at org.hisp.dhis.scheduling.DefaultJobInstance.execute(DefaultJobInstance.java:67)
at org.hisp.dhis.scheduling.DefaultSchedulingManager.lambda$scheduleJob$1(DefaultSchedulingManager.java:158)
at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
at org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:81)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)

Thanks.

Hey @Mulimba!!! Great to see you here! :grin:

I think @Stian may be some help with this one.

1 Like

@Mulimba Have you resolved the issue yet?

Hey @Scott happy to here from you bro and for tagging in some help… still trying to figure this out :sweat_smile:

1 Like

Hello @Hargi thanks for the message… I have not yet resolved it… any ideas how?

1 Like

Hi Mulimba,

I cannot recall exactly but I think this has been fixed in later versions of 2.29 and certainly 2.30. Please try to upgrade your DHIS 2 version to the latest build of 2.29, or to a later major version, such as 2.30 or 2.32.

You can also attempt to clear your analytics tables first and try again, from Apps > Data administration > Maintenance > Clear analytics tables.

best,

Lars

2 Likes

Hi @Lars

Thank you for this. I did drop and ran analytics and the system is no longer generating the email. However it seems the numbers from my tracker capture and event reports don’t seem to match up so am troubleshooting that now. If you have any suggestions for this please help.

Thanks!
Mulimba Aaron Mutinta.

1 Like