dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #33471
Re: [Bug 1328273] Re: Executing analytics table fails: Process failed: Exception during execution
I did not try, but will now. Here is the error report.
nalytics table process failed, please check the logs. Message: Exception
during execution Cause: java.util.concurrent.ExecutionException:
org.springframework.jdbc.BadSqlGrammarException: StatementCallback; bad SQL
grammar [insert into analytics_event_temp_2012_XPwePtbNCSB
("U3eQda5XlA2","mYvlji093BS","uidlevel1","uidlevel2","uidlevel3","uidlevel4","uidlevel5","daily","weekly","monthly","bimonthly","quarterly","sixmonthly","sixmonthlyapril","yearly","financialapril","financialjuly","financialoct","lrbkrnNd1Gz","XJgv2HwHfSX","hAQiDxyXEUz","kdstuCyxFmJ","kdstuCyxFmJ","kdstuCyxFmJ","kdstuCyxFmJ","kdstuCyxFmJ","kdstuCyxFmJ","kdstuCyxFmJ","kdstuCyxFmJ","kdstuCyxFmJ","kdstuCyxFmJ","kcMTeJgLr51","kcMTeJgLr51","kcMTeJgLr51","kcMTeJgLr51","kcMTeJgLr51","kcMTeJgLr51","kcMTeJgLr51","kcMTeJgLr51","kcMTeJgLr51","kcMTeJgLr51","psi","ps","executiondate","longitude","latitude","ou","ouname","oucode","tei")
select
ougs."U3eQda5XlA2",ougs."mYvlji093BS",ous."uidlevel1",ous."uidlevel2",ous."uidlevel3",ous."uidlevel4",ous."uidlevel5",dps."daily",dps."weekly",dps."monthly",dps."bimonthly",dps."quarterly",dps."sixmonthly",dps."sixmonthlyapril",dps."yearly",dps."financialapril",dps."financialjuly",dps."financialoct",(select
value from trackedentitydatavalue where
programstageinstanceid=psi.programstageinstanceid and dataelementid=69892)
as "lrbkrnNd1Gz",(select value from trackedentitydatavalue where
programstageinstanceid=psi.programstageinstanceid and dataelementid=69894)
as "XJgv2HwHfSX",(select value from trackedentitydatavalue where
programstageinstanceid=psi.programstageinstanceid and dataelementid=69887)
as "hAQiDxyXEUz",(select value from trackedentityattributevalue where
trackedentityinstanceid=pi.trackedentityinstanceid and
trackedentityattributeid=5292) as "kdstuCyxFmJ",(select value from
trackedentityattributevalue where
trackedentityinstanceid=pi.trackedentityinstanceid and
trackedentityattributeid=5292) as "kdstuCyxFmJ",(select value from
trackedentityattributevalue where
trackedentityinstanceid=pi.trackedentityinstanceid and
trackedentityattributeid=5292) as "kdstuCyxFmJ",(select value from
trackedentityattributevalue where
trackedentityinstanceid=pi.trackedentityinstanceid and
trackedentityattributeid=5292) as "kdstuCyxFmJ",(select value from
trackedentityattributevalue where
trackedentityinstanceid=pi.trackedentityinstanceid and
trackedentityattributeid=5292) as "kdstuCyxFmJ",(select value from
trackedentityattributevalue where
trackedentityinstanceid=pi.trackedentityinstanceid and
trackedentityattributeid=5292) as "kdstuCyxFmJ",(select value from
trackedentityattributevalue where
trackedentityinstanceid=pi.trackedentityinstanceid and
trackedentityattributeid=5292) as "kdstuCyxFmJ",(select value from
trackedentityattributevalue where
trackedentityinstanceid=pi.trackedentityinstanceid and
trackedentityattributeid=5292) as "kdstuCyxFmJ",(select value from
trackedentityattributevalue where
trackedentityinstanceid=pi.trackedentityinstanceid and
trackedentityattributeid=5292) as "kdstuCyxFmJ",(select value from
trackedentityattributevalue where
trackedentityinstanceid=pi.trackedentityinstanceid and
trackedentityattributeid=5292) as "kdstuCyxFmJ",(select value from
trackedentityattributevalue where
trackedentityinstanceid=pi.trackedentityinstanceid and
trackedentityattributeid=5293) as "kcMTeJgLr51",(select value from
trackedentityattributevalue where
trackedentityinstanceid=pi.trackedentityinstanceid and
trackedentityattributeid=5293) as "kcMTeJgLr51",(select value from
trackedentityattributevalue where
trackedentityinstanceid=pi.trackedentityinstanceid and
trackedentityattributeid=5293) as "kcMTeJgLr51",(select value from
trackedentityattributevalue where
trackedentityinstanceid=pi.trackedentityinstanceid and
trackedentityattributeid=5293) as "kcMTeJgLr51",(select value from
trackedentityattributevalue where
trackedentityinstanceid=pi.trackedentityinstanceid and
trackedentityattributeid=5293) as "kcMTeJgLr51",(select value from
trackedentityattributevalue where
trackedentityinstanceid=pi.trackedentityinstanceid and
trackedentityattributeid=5293) as "kcMTeJgLr51",(select value from
trackedentityattributevalue where
trackedentityinstanceid=pi.trackedentityinstanceid and
trackedentityattributeid=5293) as "kcMTeJgLr51",(select value from
trackedentityattributevalue where
trackedentityinstanceid=pi.trackedentityinstanceid and
trackedentityattributeid=5293) as "kcMTeJgLr51",(select value from
trackedentityattributevalue where
trackedentityinstanceid=pi.trackedentityinstanceid and
trackedentityattributeid=5293) as "kcMTeJgLr51",(select value from
trackedentityattributevalue where
trackedentityinstanceid=pi.trackedentityinstanceid and
trackedentityattributeid=5293) as
"kcMTeJgLr51",psi.uid,ps.uid,psi.executiondate,psi.longitude,psi.latitude,ou.uid,
ou.name,ou.code,tei.uid from programstageinstance psi left join
_organisationunitgroupsetstructure ougs on
psi.organisationunitid=ougs.organisationunitid 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 trackedentityinstance tei on
pi.trackedentityinstanceid=tei.trackedentityinstanceid 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 >= '2012-01-01' and psi.executiondate <=
'2012-12-31' and pr.programid=69888 and psi.organisationunitid is not null
and psi.executiondate is not null]; nested exception is
org.postgresql.util.PSQLException: ERROR: relation
"analytics_event_temp_2012_xpweptbncsb" does not exist
Position: 13
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:188)
at
org.hisp.dhis.system.util.ConcurrentUtils.waitForCompletion(ConcurrentUtils.java:51)
at
org.hisp.dhis.analytics.table.DefaultAnalyticsTableService.populateTables(DefaultAnalyticsTableService.java:212)
at
org.hisp.dhis.analytics.table.DefaultAnalyticsTableService.update(DefaultAnalyticsTableService.java:121)
at
org.hisp.dhis.analytics.scheduling.AnalyticsTableTask.run(AnalyticsTableTask.java:151)
at org.hisp.dhis.scheduling.ScheduledTasks.run(ScheduledTasks.java:60)
at
org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:53)
at
org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:81)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
Caused by: org.springframework.jdbc.BadSqlGrammarException:
StatementCallback; bad SQL grammar [insert into
analytics_event_temp_2012_XPwePtbNCSB
("U3eQda5XlA2","mYvlji093BS","uidlevel1","uidlevel2","uidlevel3","uidlevel4","uidlevel5","daily","weekly","monthly","bimonthly","quarterly","sixmonthly","sixmonthlyapril","yearly","financialapril","financialjuly","financialoct","lrbkrnNd1Gz","XJgv2HwHfSX","hAQiDxyXEUz","kdstuCyxFmJ","kdstuCyxFmJ","kdstuCyxFmJ","kdstuCyxFmJ","kdstuCyxFmJ","kdstuCyxFmJ","kdstuCyxFmJ","kdstuCyxFmJ","kdstuCyxFmJ","kdstuCyxFmJ","kcMTeJgLr51","kcMTeJgLr51","kcMTeJgLr51","kcMTeJgLr51","kcMTeJgLr51","kcMTeJgLr51","kcMTeJgLr51","kcMTeJgLr51","kcMTeJgLr51","kcMTeJgLr51","psi","ps","executiondate","longitude","latitude","ou","ouname","oucode","tei")
select
ougs."U3eQda5XlA2",ougs."mYvlji093BS",ous."uidlevel1",ous."uidlevel2",ous."uidlevel3",ous."uidlevel4",ous."uidlevel5",dps."daily",dps."weekly",dps."monthly",dps."bimonthly",dps."quarterly",dps."sixmonthly",dps."sixmonthlyapril",dps."yearly",dps."financialapril",dps."financialjuly",dps."financialoct",(select
value from trackedentitydatavalue where
programstageinstanceid=psi.programstageinstanceid and dataelementid=69892)
as "lrbkrnNd1Gz",(select value from trackedentitydatavalue where
programstageinstanceid=psi.programstageinstanceid and dataelementid=69894)
as "XJgv2HwHfSX",(select value from trackedentitydatavalue where
programstageinstanceid=psi.programstageinstanceid and dataelementid=69887)
as "hAQiDxyXEUz",(select value from trackedentityattributevalue where
trackedentityinstanceid=pi.trackedentityinstanceid and
trackedentityattributeid=5292) as "kdstuCyxFmJ",(select value from
trackedentityattributevalue where
trackedentityinstanceid=pi.trackedentityinstanceid and
trackedentityattributeid=5292) as "kdstuCyxFmJ",(select value from
trackedentityattributevalue where
trackedentityinstanceid=pi.trackedentityinstanceid and
trackedentityattributeid=5292) as "kdstuCyxFmJ",(select value from
trackedentityattributevalue where
trackedentityinstanceid=pi.trackedentityinstanceid and
trackedentityattributeid=5292) as "kdstuCyxFmJ",(select value from
trackedentityattributevalue where
trackedentityinstanceid=pi.trackedentityinstanceid and
trackedentityattributeid=5292) as "kdstuCyxFmJ",(select value from
trackedentityattributevalue where
trackedentityinstanceid=pi.trackedentityinstanceid and
trackedentityattributeid=5292) as "kdstuCyxFmJ",(select value from
trackedentityattributevalue where
trackedentityinstanceid=pi.trackedentityinstanceid and
trackedentityattributeid=5292) as "kdstuCyxFmJ",(select value from
trackedentityattributevalue where
trackedentityinstanceid=pi.trackedentityinstanceid and
trackedentityattributeid=5292) as "kdstuCyxFmJ",(select value from
trackedentityattributevalue where
trackedentityinstanceid=pi.trackedentityinstanceid and
trackedentityattributeid=5292) as "kdstuCyxFmJ",(select value from
trackedentityattributevalue where
trackedentityinstanceid=pi.trackedentityinstanceid and
trackedentityattributeid=5292) as "kdstuCyxFmJ",(select value from
trackedentityattributevalue where
trackedentityinstanceid=pi.trackedentityinstanceid and
trackedentityattributeid=5293) as "kcMTeJgLr51",(select value from
trackedentityattributevalue where
trackedentityinstanceid=pi.trackedentityinstanceid and
trackedentityattributeid=5293) as "kcMTeJgLr51",(select value from
trackedentityattributevalue where
trackedentityinstanceid=pi.trackedentityinstanceid and
trackedentityattributeid=5293) as "kcMTeJgLr51",(select value from
trackedentityattributevalue where
trackedentityinstanceid=pi.trackedentityinstanceid and
trackedentityattributeid=5293) as "kcMTeJgLr51",(select value from
trackedentityattributevalue where
trackedentityinstanceid=pi.trackedentityinstanceid and
trackedentityattributeid=5293) as "kcMTeJgLr51",(select value from
trackedentityattributevalue where
trackedentityinstanceid=pi.trackedentityinstanceid and
trackedentityattributeid=5293) as "kcMTeJgLr51",(select value from
trackedentityattributevalue where
trackedentityinstanceid=pi.trackedentityinstanceid and
trackedentityattributeid=5293) as "kcMTeJgLr51",(select value from
trackedentityattributevalue where
trackedentityinstanceid=pi.trackedentityinstanceid and
trackedentityattributeid=5293) as "kcMTeJgLr51",(select value from
trackedentityattributevalue where
trackedentityinstanceid=pi.trackedentityinstanceid and
trackedentityattributeid=5293) as "kcMTeJgLr51",(select value from
trackedentityattributevalue where
trackedentityinstanceid=pi.trackedentityinstanceid and
trackedentityattributeid=5293) as
"kcMTeJgLr51",psi.uid,ps.uid,psi.executiondate,psi.longitude,psi.latitude,ou.uid,
ou.name,ou.code,tei.uid from programstageinstance psi left join
_organisationunitgroupsetstructure ougs on
psi.organisationunitid=ougs.organisationunitid 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 trackedentityinstance tei on
pi.trackedentityinstanceid=tei.trackedentityinstanceid 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 >= '2012-01-01' and psi.executiondate <=
'2012-12-31' and pr.programid=69888 and psi.organisationunitid is not null
and psi.executiondate is not null]; nested exception is
org.postgresql.util.PSQLException: ERROR: relation
"analytics_event_temp_2012_xpweptbncsb" 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:188)
at sun.reflect.GeneratedMethodAccessor938.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.run(FutureTask.java:262)
... 1 more
Caused by: org.postgresql.util.PSQLException: ERROR: relation
"analytics_event_temp_2012_xpweptbncsb" 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)
... 11 more
On Mon, Oct 13, 2014 at 5:27 PM, Lars Helge Øverland <larshelge@xxxxxxxxx>
wrote:
> Sure.. From the logs in the bug report it says "patientidentifier where
> patientid=pi.patientid and patientidentifiertypeid=7" indicating that the
> server is still on 2.14.
>
> Would be good with a separate report for your issue. Did you try clearing
> cache from data admin> caching?
>
--
Jason P. Pickering
email: jason.p.pickering@xxxxxxxxx
tel:+46764147049
Follow ups
References