← Back to team overview

dhis2-devs team mailing list archive

Re: "Analytics table dimensions contain duplicates" Error

 

Hi,

To follow up with this, with a bit of sql I tracked this UID to
a trackedentityattribute. Tracing it further I discovered that there were
two entries in the program_attributes table for this trackedentityattribute
and a particular program. Basically it looks like somehow the attribute got
assigned to the program twice. I'm not sure how that is possible, although
perhaps it could have been via the API?

When removing one of the attributes via the edit program UI (the attribute
was repeated in the select list), the analytics now run.

Although this seems like a fluke edge case, I'm wondering if it is possible
to improve the error handling around the assigning of attributes to a
program so that it can't be done twice? And also if it is possible to
improve the error message in the analytics generation for this to point to
what exactly is duplicated?

Thanks,

Lorill



On Mon, Aug 8, 2016 at 5:03 PM, Lorill Crees <lcrees@xxxxxxxxxx> wrote:

> Hi,
>
> When running analytics on one of our instances, we get the error "Process
> failed: Analytics table dimensions contain duplicates: ["oZXosvGYth6"]".
> The full stack is pasted below.
>
> How can I fix this? I took a quick look through a couple tables to see if
> I could find this UID but no success, and wasn't sure where I should be
> looking.
>
> We are on 2.22 R 22089.
>
> Thanks!
>
> Lorill
>
>
> * ERROR 2016-08-08 16:48:12,556 Unexpected error occurred in scheduled
> task. (TaskUtils.java [taskScheduler-4])
>
> java.lang.IllegalStateException: Analytics table dimensions contain
> duplicates: ["oZXosvGYth6"]
>
> at org.hisp.dhis.analytics.table.AbstractJdbcTableManager.
> validateDimensionColumns(AbstractJdbcTableManager.java:323)
>
> at org.hisp.dhis.analytics.table.JdbcEventAnalyticsTableManager
> .createTable(JdbcEventAnalyticsTableManager.java:145)
>
> at sun.reflect.GeneratedMethodAccessor935.invoke(Unknown Source)
>
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:43)
>
> at java.lang.reflect.Method.invoke(Method.java:483)
>
> at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection
> (AopUtils.java:317)
>
> at org.springframework.aop.framework.JdkDynamicAopProxy.
> invoke(JdkDynamicAopProxy.java:201)
>
> at com.sun.proxy.$Proxy146.createTable(Unknown Source)
>
> at org.hisp.dhis.analytics.table.DefaultAnalyticsTableService.
> createTables(DefaultAnalyticsTableService.java:193)
>
> at org.hisp.dhis.analytics.table.DefaultAnalyticsTableService.update(
> DefaultAnalyticsTableService.java:124)
>
> at org.hisp.dhis.analytics.table.scheduling.AnalyticsTableTask.
> call(AnalyticsTableTask.java:158)
>
> at org.hisp.dhis.security.NoSecurityContextRunnable.run(
> NoSecurityContextRunnable.java:47)
>
> at org.springframework.scheduling.support.DelegatingErrorHandlingRunnabl
> e.run(DelegatingErrorHandlingRunnable.java:54)
>
> 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:1142)
>
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(
> ThreadPoolExecutor.java:617)
>
> at java.lang.Thread.run(Thread.java:745)
>
> *
>

References