Error running the Analytics tables

Hi team,
I have a problem with the Analytics tables, when is running show a message that say "Process failed: Exception during execution ". for try to fix it, I've done the options then:
1) the Postgres log had a error in the period table and I resolved it adjusting a range (see Log 000000).

2) Delete Analitics Tables in the maintenance option .

3) Create Resource tables.

After all the problem with the analytics tables persists.

Attached the logs and a image that show the message error.

information about the instalation:
Dhis ver 2.16.
Compilation 16452 ( 23/09/2014).
Postgres 9.3
Tomcat 7.
Server ubuntu 12.03 (and windows xp, MacOs for testing)

MG. Helder Yesid Castrillon.
Secretaría departamental de salud del Cauca (Colombia)
@heldersoft

Copia de postgresql-2014-09-22_000000.log (7.25 KB)

postgresql-2014-09-23_171141.log (7.25 KB)

If the problem still exist try taking up meta data and data into a fresh dhis local instance and do the deployment after fixing it. You will loose few information like settings but not much.

Regards,

Moemedi Ntunyane
Co-founder KeyInConsulting

···

From: helder_947@hotmail.com
To: dhis2-users@lists.launchpad.net
Date: Tue, 23 Sep 2014 22:27:26 -0500
Subject: [Dhis2-users] Error running the Analytics tables


Hi team,
I have a problem with the Analytics tables, when is running show a message that say "Process failed: Exception during execution ". for try to fix it, I've done the options then:
1) the Postgres log had a error in the period table and I resolved it adjusting a range (see Log 000000).

2) Delete Analitics Tables in the maintenance option .

3) Create Resource tables.

After all the problem with the analytics tables persists.

Attached the logs and a image that show the message error.

information about the instalation:
Dhis ver 2.16.
Compilation 16452 ( 23/09/2014).
Postgres 9.3
Tomcat 7.
Server ubuntu 12.03 (and windows xp, MacOs for testing)

MG. Helder Yesid Castrillon.
Secretaría departamental de salud del Cauca (Colombia)
@heldersoft


Mailing list: https://launchpad.net/~dhis2-users
Post to : dhis2-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-users
More help : https://help.launchpad.net/ListHelp

Hi Moemedi,
thanks for your response, Knut and Lars sent a solution and with it we could solve our problem.

Attached mail with solution for close this thread.

best regards.

···

2014-10-20 10:48 GMT-05:00 Marko David Garcia <markodavidgm@gmail.com>:
Hi Knut.
Thank you very much.This fixed the error. We clean the duplicate attributes, and fix some errors in periods and now all works fine.
Thanks.
2014-10-16 10:35 GMT-05:00 Knut Staring <knutst@gmail.com>:
Hi Helder and Marko,
Could you please see if this helps with your problem?
Best,Knut
---------- Forwarded message ----------
From: Lars Helge Øverland <larshelge@gmail.com>
Date: Thu, Oct 16, 2014 at 9:31 PM
Subject: [Dhis2-devs] [Bug 1328273] Re: Executing analytics table fails: Process failed: Exception during execution
To: dhis2-devs@lists.launchpad.net

The problem happens because there are duplicate columns in the event

analytics tables. Likely this happens because of a database upgrade

error with programs.

Check all programs for attributes which appear to have

duplicate/multiple members for one or more attributes.

I have built into trunk better validation and feedback in the logs.

** Changed in: dhis2

       Status: New => Won't Fix

** Changed in: dhis2

   Importance: Undecided => Medium

** Changed in: dhis2

     Assignee: (unassigned) => Lars Helge Øverland (larshelge)

--

You received this bug notification because you are a member of DHIS 2

developers, which is subscribed to DHIS.

https://bugs.launchpad.net/bugs/1328273

Title:

  Executing analytics table fails: Process failed: Exception during

  execution

Status in DHIS 2:

  Won't Fix

Bug description:

  In version 2.14, I am running tracker. When I try executing analytics table, I get the following error:

  'Process failed. Exeception during execution'.

  Here is an extraction from the last lines in catalina.out that could help in error identification:

  patientidentifier where patientid=pi.patientid and
patientidentifiertypeid=71) as "iEoIwcIBRFB",(select identifier from
patientidentifier where patientid=pi.patientid and
patientidentifiertypeid=71) as "iEoIwcIBRFB",(select identifier from
patientidentifier where patientid=pi.patientid and
patientidentifiertypeid=71) as "iEoIwcIBRFB",psi.uid,ps.uid,psi.executiondate,psi.longitude,psi.latitude,ou.uid,ou.name,ou.code from programstageinstance psi left join programinstance pi on psi.programinstanceid=pi.programinstanceid left join programstage ps on psi.programstageid=ps.programstageid
left join program pr on pi.programid=pr.programid left join patient pa
on pi.patientid=pa.patientid left join organisationunit ou on
psi.organisationunitid=ou.organisationunitid left join _orgunitstructure ous on psi.organisationunitid=ous.organisationunitid left join _dateperiodstructure dps on psi.executiondate=dps.dateperiod
where psi.executiondate >= '2011-01-01' and psi.executiondate <=
'2011-12-31' and pr.programid=68 and psi.organisationunitid is not null
and psi.executiondate is not null]; nested exception is
org.postgresql.util.PSQLException: ERROR: relation "analytics_event_temp_2011_q3p6c4bgq7o" does not exist

    Position: 13

        at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:237)

        at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72)

        at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:407)

        at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:428)

        at org.hisp.dhis.analytics.table.JdbcEventAnalyticsTableManager.populateTableAsync(JdbcEventAnalyticsTableManager.java:178)

        at sun.reflect.GeneratedMethodAccessor1602.invoke(Unknown Source)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

        at java.lang.reflect.Method.invoke(Method.java:606)

        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)

        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)

        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)

        at org.springframework.aop.interceptor.AsyncExecutionInterceptor$1.call(AsyncExecutionInterceptor.java:95)

        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)

        at java.util.concurrent.FutureTask.run(FutureTask.java:166)

        ... 1 more

  Caused by: org.postgresql.util.PSQLException: ERROR: relation "analytics_event_temp_2011_q3p6c4bgq7o" does not exist

    Position: 13

        at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2161)

        at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1890)

        at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)

        at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:560)

        at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:403)

        at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:395)

        at com.mchange.v2.c3p0.impl.NewProxyStatement.execute(NewProxyStatement.java:1006)

        at org.springframework.jdbc.core.JdbcTemplate$1ExecuteStatementCallback.doInStatement(JdbcTemplate.java:421)

        at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:396)

        ... 12 more

To manage notifications about this bug go to:

https://bugs.launchpad.net/dhis2/+bug/1328273/+subscriptions

_______________________________________________

Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

--
Knut StaringDept. of Informatics, University of Oslo+4791880522Skype: knutstarhttp://dhis2.org

--
Cordialmente,

Ing. Marko David Garcia M.
Secretaría Departamental de Salud del CaucaÁrea de Salud AmbientalSkype: marko_david

MG. Helder Yesid Castrillon.
Secretaría departamental de salud del Cauca (Colombia)
@heldersoft