Error running the Analytics tables

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

Regards=2C

Moemedi Ntunyane
Co-founder KeyInConsulting

=20

···

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

=20
=20
=20
Hi team=2C
I have a problem with the Analytics tables=2C when is running show a me=
ssage that say "Process failed: Exception during execution ". for try to fi=
x it=2C I've done the options then:
1) the Postgres log had a error in the period table and I resolved it adju=
sting a range (see Log 000000).
=20
2) Delete Analitics Tables in the maintenance option .
=20
3) Create Resource tables.
=20
After all the problem with the analytics tables persists.
=20
Attached the logs and a image that show the message error.
=20
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=2C MacOs for testing)
=20
=20
MG. Helder Yesid Castrillon.
Secretar=EDa departamental de salud del Cauca (Colombia)
@heldersoft
=20
                =20

_______________________________________________=0A=
Mailing list: https://launchpad.net/~dhis2-users=0A=
Post to : dhis2-users@lists.launchpad.net=0A=
Unsubscribe : https://launchpad.net/~dhis2-users=0A=
More help : ListHelp - Launchpad Help =

--_ba625a7e-b4dd-4272-a87d-c1a0e6c37b50_
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<html>
<head>
<style><!--
.hmmessage P
{
margin:0px=3B
padding:0px
}
body.hmmessage
{
font-size: 12pt=3B
font-family:Calibri
}
--></style></head>
<body class=3D'hmmessage'><div dir=3D'ltr'>Hi Moemedi=2C<br>thanks for your=
response=2C Knut and Lars&nbsp=3B sent a solution and with it we could sol=
ve our problem. <br><br>Attached mail with solution for close this thread.<=

<br>best regards.<br><br><br><br><div class=3D"gmail_quote">2014-10-20 1=

0:48 GMT-05:00 Marko David Garcia <span dir=3D"ltr">&lt=3B<a href=3D"mailto=
:markodavidgm@gmail.com" target=3D"_blank">markodavidgm@gmail.com</a>&gt=3B=
</span>:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex=3B=
border-left:1px #ccc solid=3Bpadding-left:1ex"><div dir=3D"ltr">Hi Knut.<di=

<br><div>Thank you very much.</div><div>This fixed the error.&nbsp=3B We =

clean the duplicate attributes=2C and fix some errors in periods and now al=
l works fine.</div><div><br></div><div>Thanks.</div></div></div><div class=
=3D"gmail_extra"><br><div class=3D"gmail_quote">2014-10-16 10:35 GMT-05:00 =
Knut Staring <span dir=3D"ltr">&lt=3B<a href=3D"mailto:knutst@gmail.com" ta=
rget=3D"_blank">knutst@gmail.com</a>&gt=3B</span>:<div><div class=3D"h5"><b=

<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex=3Bborder-lef=

t:1px #ccc solid=3Bpadding-left:1ex"><div dir=3D"ltr">Hi Helder and Marko=
=2C<div><br></div><div>Could you please see if this helps with your problem=
?</div><div><br></div><div>Best=2C</div><div>Knut</div><div><br><div class=
=3D"gmail_quote">---------- Forwarded message ----------<br>From: <b class=
=3D"gmail_sendername">Lars Helge =D8verland</b> <span dir=3D"ltr">&lt=3B<a =
href=3D"mailto:larshelge@gmail.com" target=3D"_blank">larshelge@gmail.com</=

&gt=3B</span><br>Date: Thu=2C Oct 16=2C 2014 at 9:31 PM<br>Subject: [Dhis=

2-devs] [Bug 1328273] Re: Executing analytics table fails: Process failed: =
Exception during execution<br>To: <a href=3D"mailto:dhis2-devs@lists.launch=
pad.net" target=3D"_blank">dhis2-devs@lists.launchpad.net</a><br><br><br>Th=
e problem happens because there are duplicate columns in the event<br>=0A=
analytics tables. Likely this happens because of a database upgrade<br>=0A=
error with programs.<br>=0A=
<br>=0A=
Check all programs for attributes which appear to have<br>=0A=
duplicate/multiple members for one or more attributes.<br>=0A=
<br>=0A=
I have built into trunk better validation and feedback in the logs.<br>=0A=
<br>=0A=
** Changed in: dhis2<br>=0A=
&nbsp=3B &nbsp=3B &nbsp=3B &nbsp=3BStatus: New =3D&gt=3B Won't Fix<br>=0A=
<br>=0A=
** Changed in: dhis2<br>=0A=
&nbsp=3B &nbsp=3BImportance: Undecided =3D&gt=3B Medium<br>=0A=
<br>=0A=
** Changed in: dhis2<br>=0A=
&nbsp=3B &nbsp=3B &nbsp=3BAssignee: (unassigned) =3D&gt=3B Lars Helge =D8ve=
rland (larshelge)<br>=0A=
<span><br>=0A=
--<br>=0A=
You received this bug notification because you are a member of DHIS 2<br>=
=0A=
developers=2C which is subscribed to DHIS.<br>=0A=
<a href=3D"https://bugs.launchpad.net/bugs/1328273&quot; target=3D"_blank">https=
://bugs.launchpad.net/<wbr>bugs/1328273</a><br>=0A=
<br>=0A=
Title:<br>=0A=
&nbsp=3B Executing analytics table fails: Process failed: Exception during<=

=0A=

&nbsp=3B execution<br>=0A=
<br>=0A=
Status in DHIS 2:<br>=0A=
</span>&nbsp=3B Won't Fix<br>=0A=
<div><div><br>=0A=
Bug description:<br>=0A=
&nbsp=3B In version 2.14=2C I am running tracker. When I try executing anal=
ytics table=2C I get the following error:<br>=0A=
&nbsp=3B 'Process failed. Exeception during execution'.<br>=0A=
<br>=0A=
<br>=0A=
&nbsp=3B Here is an extraction from the last lines in catalina.out that cou=
ld help in error identification:<br>=0A=
<br>=0A=
&nbsp=3B patientidentifier where patientid=3Dpi.patientid and =0A=
patientidentifiertypeid=3D71) as "iEoIwcIBRFB"=2C(select identifier from =
=0A=
patientidentifier where patientid=3Dpi.patientid and =0A=
patientidentifiertypeid=3D71) as "iEoIwcIBRFB"=2C(select identifier from =
=0A=
patientidentifier where patientid=3Dpi.patientid and =0A=
patientidentifiertypeid=3D71) as "iEoIwcIBRFB"=2Cpsi.uid=2Cps.uid=2C<wbr>ps=
i.executiondate=2Cpsi.<wbr>longitude=2Cpsi.latitude=2Cou.uid=2C<a href=3D"h=
ttp://ou.name" target=3D"_blank"><wbr>ou.name</a>=2Cou.code from programsta=
geinstance psi left join programinstance pi on psi.programinstanceid=3Dpi.<=

programinstanceid left join programstage ps on psi.programstageid=3Dps.=

<wbr>programstageid=0A=
left join program pr on pi.programid=3Dpr.programid left join patient pa =
=0A=
on pi.patientid=3Dpa.patientid left join organisationunit ou on =0A=
psi.organisationunitid=3Dou.<wbr>organisationunitid left join _orgunitstruc=
ture ous on psi.organisationunitid=3Dous.<wbr>organisationunitid left join =
_dateperiodstructure dps on psi.executiondate=3Ddps.<wbr>dateperiod=0A=
where psi.executiondate &gt=3B=3D '2011-01-01' and psi.executiondate &lt=
=3B=3D =0A=
'2011-12-31' and pr.programid=3D68 and psi.organisationunitid is not null =
=0A=
and psi.executiondate is not null]=3B nested exception is =0A=
org.postgresql.util.<wbr>PSQLException: ERROR: relation "analytics_event_te=
mp_2011_<wbr>q3p6c4bgq7o" does not exist<br>=0A=
&nbsp=3B &nbsp=3B Position: 13<br>=0A=
&nbsp=3B &nbsp=3B &nbsp=3B &nbsp=3B at org.springframework.jdbc.<wbr>suppor=
t.<wbr>SQLErrorCodeSQLExceptionTransl<wbr>ator.doTranslate(<wbr>SQLErrorCod=
eSQLExceptionTransl<wbr>ator.java:237)<br>=0A=
&nbsp=3B &nbsp=3B &nbsp=3B &nbsp=3B at org.springframework.jdbc.<wbr>suppor=
t.<wbr>AbstractFallbackSQLExceptionTr<wbr>anslator.translate(<wbr>AbstractF=
allbackSQLExceptionTr<wbr>anslator.java:72)<br>=0A=
&nbsp=3B &nbsp=3B &nbsp=3B &nbsp=3B at org.springframework.jdbc.core.<wbr>J=
dbcTemplate.execute(<wbr>JdbcTemplate.java:407)<br>=0A=
&nbsp=3B &nbsp=3B &nbsp=3B &nbsp=3B at org.springframework.jdbc.core.<wbr>J=
dbcTemplate.execute(<wbr>JdbcTemplate.java:428)<br>=0A=
&nbsp=3B &nbsp=3B &nbsp=3B &nbsp=3B at org.hisp.dhis.analytics.table.<wbr>J=
dbcEventAnalyticsTableManager<wbr>.populateTableAsync(<wbr>JdbcEventAnalyti=
csTableManager<wbr>.java:178)<br>=0A=
&nbsp=3B &nbsp=3B &nbsp=3B &nbsp=3B at sun.reflect.<wbr>GeneratedMethodAcce=
ssor1602.<wbr>invoke(Unknown Source)<br>=0A=
&nbsp=3B &nbsp=3B &nbsp=3B &nbsp=3B at sun.reflect.<wbr>DelegatingMethodAcc=
essorImpl.<wbr>invoke(<wbr>DelegatingMethodAccessorImpl.<wbr>java:43)<br>=
=0A=
&nbsp=3B &nbsp=3B &nbsp=3B &nbsp=3B at java.lang.reflect.Method.<wbr>invoke=
(Method.java:606)<br>=0A=
&nbsp=3B &nbsp=3B &nbsp=3B &nbsp=3B at org.springframework.aop.<wbr>support=
.AopUtils.<wbr>invokeJoinpointUsingReflection<wbr>(AopUtils.java:317)<br>=
=0A=
&nbsp=3B &nbsp=3B &nbsp=3B &nbsp=3B at org.springframework.aop.<wbr>framewo=
rk.<wbr>ReflectiveMethodInvocation.<wbr>invokeJoinpoint(<wbr>ReflectiveMeth=
odInvocation.<wbr>java:183)<br>=0A=
&nbsp=3B &nbsp=3B &nbsp=3B &nbsp=3B at org.springframework.aop.<wbr>framewo=
rk.<wbr>ReflectiveMethodInvocation.<wbr>proceed(<wbr>ReflectiveMethodInvoca=
tion.<wbr>java:150)<br>=0A=
&nbsp=3B &nbsp=3B &nbsp=3B &nbsp=3B at org.springframework.aop.<wbr>interce=
ptor.<wbr>AsyncExecutionInterceptor$1.<wbr>call(<wbr>AsyncExecutionIntercep=
tor.<wbr>java:95)<br>=0A=
&nbsp=3B &nbsp=3B &nbsp=3B &nbsp=3B at java.util.concurrent.<wbr>FutureTask=
$Sync.innerRun(<wbr>FutureTask.java:334)<br>=0A=
&nbsp=3B &nbsp=3B &nbsp=3B &nbsp=3B at java.util.concurrent.<wbr>FutureTask=
.run(FutureTask.<wbr>java:166)<br>=0A=
&nbsp=3B &nbsp=3B &nbsp=3B &nbsp=3B ... 1 more<br>=0A=
&nbsp=3B Caused by: org.postgresql.util.<wbr>PSQLException: ERROR: relation=
"analytics_event_temp_2011_<wbr>q3p6c4bgq7o" does not exist<br>=0A=
&nbsp=3B &nbsp=3B Position: 13<br>=0A=
&nbsp=3B &nbsp=3B &nbsp=3B &nbsp=3B at org.postgresql.core.v3.<wbr>QueryExe=
cutorImpl.<wbr>receiveErrorResponse(<wbr>QueryExecutorImpl.java:2161)<br>=
=0A=
&nbsp=3B &nbsp=3B &nbsp=3B &nbsp=3B at org.postgresql.core.v3.<wbr>QueryExe=
cutorImpl.<wbr>processResults(<wbr>QueryExecutorImpl.java:1890)<br>=0A=
&nbsp=3B &nbsp=3B &nbsp=3B &nbsp=3B at org.postgresql.core.v3.<wbr>QueryExe=
cutorImpl.execute(<wbr>QueryExecutorImpl.java:255)<br>=0A=
&nbsp=3B &nbsp=3B &nbsp=3B &nbsp=3B at org.postgresql.jdbc2.<wbr>AbstractJd=
bc2Statement.<wbr>execute(<wbr>AbstractJdbc2Statement.java:<wbr>560)<br>=0A=
&nbsp=3B &nbsp=3B &nbsp=3B &nbsp=3B at org.postgresql.jdbc2.<wbr>AbstractJd=
bc2Statement.<wbr>executeWithFlags(<wbr>AbstractJdbc2Statement.java:<wbr>40=
3)<br>=0A=
&nbsp=3B &nbsp=3B &nbsp=3B &nbsp=3B at org.postgresql.jdbc2.<wbr>AbstractJd=
bc2Statement.<wbr>execute(<wbr>AbstractJdbc2Statement.java:<wbr>395)<br>=0A=
&nbsp=3B &nbsp=3B &nbsp=3B &nbsp=3B at com.mchange.v2.c3p0.impl.<wbr>NewPro=
xyStatement.execute(<wbr>NewProxyStatement.java:1006)<br>=0A=
&nbsp=3B &nbsp=3B &nbsp=3B &nbsp=3B at org.springframework.jdbc.core.<wbr>J=
dbcTemplate$<wbr>1ExecuteStatementCallback.<wbr>doInStatement(JdbcTemplate.=
<wbr>java:421)<br>=0A=
&nbsp=3B &nbsp=3B &nbsp=3B &nbsp=3B at org.springframework.jdbc.core.<wbr>J=
dbcTemplate.execute(<wbr>JdbcTemplate.java:396)<br>=0A=
&nbsp=3B &nbsp=3B &nbsp=3B &nbsp=3B ... 12 more<br>=0A=
<br>=0A=
To manage notifications about this bug go to:<br>=0A=
<a href=3D"https://bugs.launchpad.net/dhis2/+bug/1328273/+subscriptions&quot; ta=
rget=3D"_blank">https://bugs.launchpad.net/&lt;wbr&gt;dhis2/\+bug/1328273/\+&lt;wbr&gt;su=
bscriptions</a><br>=0A=
<br>=0A=
______________________________<wbr>_________________<br>=0A=
Mailing list: <a href=3D"https://launchpad.net/~dhis2-devs&quot; target=3D"_bl=
ank">https://launchpad.net/~dhis2-&lt;wbr&gt;devs&lt;/a&gt;&lt;br&gt;=0A=
Post to&nbsp=3B &nbsp=3B &nbsp=3B: <a href=3D"mailto:dhis2-devs@lists.launc=
hpad.net" target=3D"_blank">dhis2-devs@lists.launchpad.net</a><br>=0A=
Unsubscribe : <a href=3D"https://launchpad.net/~dhis2-devs&quot; target=3D"_bl=
ank">https://launchpad.net/~dhis2-&lt;wbr&gt;devs&lt;/a&gt;&lt;br&gt;=0A=
More help&nbsp=3B &nbsp=3B: <a href=3D"ListHelp - Launchpad Help"=
target=3D"_blank">https://help.launchpad.net/&lt;wbr&gt;ListHelp&lt;/a&gt;&lt;span&gt;&lt;font =
color=3D"#888888"><br>=0A=
</font></span></div></div></div><span><font color=3D"#888888"><br><br clear=
=3D"all"><div><br></div>-- <br><div dir=3D"ltr"><div>Knut Staring</div><div=

Dept. of Informatics=2C&nbsp=3BUniversity of Oslo</div><div><a href=3D"tel=

:%2B4791880522" value=3D"+4791880522" target=3D"_blank">+4791880522</a></di=

<div>Skype: knutstar</div><div><a href=3D"http://dhis2.org" target=3D"_bl=

ank">http://dhis2.org</a>=0A=
</div></div>=0A=
</font></span></div></div>=0A=
</blockquote></div></div></div><span class=3D"HOEnZb"><font color=3D"#88888=
8"><br><br clear=3D"all"><div><br></div>-- <br><div dir=3D"ltr">Cordialment=
e=2C<div><br><br><font face=3D"arial=2C helvetica=2C sans-serif"><b><font c=
olor=3D"#336666">Ing. Marko David Garcia M.<br></font></b></font><div><font=
face=3D"arial=2C helvetica=2C sans-serif" color=3D"#336666"><b>Secretar=ED=
a Departamental de Salud del Cauca</b></font></div></div><div><font face=3D=
"arial=2C helvetica=2C sans-serif" color=3D"#336666"><b>=C1rea de Salud Amb=
iental</b></font></div><div><font face=3D"arial=2C helvetica=2C sans-serif"=
color=3D"#336666"><b>Skype: marko_david</b></font></div></div>=0A=
</font></span></div>=0A=
</blockquote></div><br><br clear=3D"all"><br><br><br><br><br><b>MG. Helder =
Yesid Castrillon.</b><br>Secretar=EDa departamental de salud del Cauca (Col=
ombia)<br>@heldersoft<br><br><br><div><hr id=3D"stopSpelling">From: moemedi=
.ntunyane@hotmail.com<br>To: helder_947@hotmail.com=3B dhis2-users@lists.la=
unchpad.net<br>Subject: RE: [Dhis2-users] Error running the Analytics table=
s<br>Date: Wed=2C 24 Sep 2014 08:55:24 +0200<br><br>=0A=
=0A=
<style><!--=0A=
.ExternalClass .ecxhmmessage P {=0A=
padding:0px=3B=0A=
}=0A=
=0A=
.ExternalClass body.ecxhmmessage {=0A=
font-size:12pt=3B=0A=
font-family:Calibri=3B=0A=
}=0A=
=0A=
--></style>=0A=
<div dir=3D"ltr">If the problem still exist try taking up meta data and dat=
a into a fresh dhis local instance and do the deployment after fixing it. Y=
ou will loose few information like settings but not much. <br><br>Regards=
=2C<br><br><font face=3D"Courier New" color=3D"#00b050"><b><i><font style=
=3D"font-size:8pt=3B" size=3D"1">Moemedi Ntunyane</font><font style=3D"font=
-size:8pt=3B" size=3D"1"><br></font><font style=3D"font-size:8pt=3B" size=
=3D"1">Co-founder KeyInConsulting</font></i></b></font><br><br>&nbsp=3B<br>=
<div>From: helder_947@hotmail.com<br>To: dhis2-users@lists.launchpad.net<br=

Date: Tue=2C 23 Sep 2014 22:27:26 -0500<br>Subject: [Dhis2-users] Error ru=

nning the Analytics tables<br><br><pre> <br> <br> <br>Hi team=2C<br>I have =
a problem with the Analytics tables=2C when is running show a message t=
hat say "Process failed: Exception during execution ". for try to fix it=2C=
I've done the options then:<br>1) the Postgres log had a error in the peri=
od table and I resolved it adjusting a range (see Log 000000).<br> <br>2) =
Delete Analitics Tables in the maintenance option .<br> <br>3) Create Res=
ource tables.<br> <br>After all the problem with the analytics tables persi=
sts.<br> <br>Attached the logs and a image that show the message error.<br>=
<br>information about the instalation:<br>Dhis ver 2.16.<br>Compilation 16=
452 ( 23/09/2014).<br>Postgres 9.3<br>Tomcat 7.<br>Server ubuntu 12.03 (and=
windows xp=2C MacOs for testing)<br> <br> <br>MG. Helder Yesid Castrillon.=
<br>Secretar=EDa departamental de salud del Cauca (Colombia)<br>@heldersoft=
<br> <br> <br></pre><br>________________________________________=
_______=0A=
Mailing list: https://launchpad.net/~dhis2-users=0A=
Post to : dhis2-users@lists.launchpad.net=0A=
Unsubscribe : https://launchpad.net/~dhis2-users=0A=
More help : https://help.launchpad.net/ListHelp&lt;/div&gt; </div></=

                </div></body>

</html>=

--_ba625a7e-b4dd-4272-a87d-c1a0e6c37b50_--