← Back to team overview

dhis2-devs team mailing list archive

[Bug 1457198] [NEW] analytics fails with mysql on 2.18

 

Public bug reported:

Analytics process fails with latest 2.18 on mysql. BadSQLgrammar. Error
below. Tested with "real" database, and with a blank database where I've
added a few values to test.


* INFO  2015-05-20 21:43:02,748 Data element category option combo table generated (DefaultResourceTableService.java [taskScheduler-1])
* INFO  2015-05-20 21:43:02,955 [Level: INFO, category: DATAMART, time: Wed May 20 21:43:02 CEST 2015, message: Updating analytics tables] (InMemoryNotifier.java [taskScheduler-1])
* INFO  2015-05-20 21:43:02,959 Starting update, processes: 7, org unit levels: 3: 0:00:00.000 (Clock.java [taskScheduler-1])
* INFO  2015-05-20 21:43:02,965 Approval enabled: false (JdbcAnalyticsTableManager.java [taskScheduler-1])
* INFO  2015-05-20 21:43:02,966 Get tables using earliest: null (AbstractJdbcTableManager.java [taskScheduler-1])
* INFO  2015-05-20 21:43:03,065 Table update start: analytics, partitions: [analytics_1990, analytics_1991, analytics_1992, analytics_1993, analytics_1994, analytics_1995, analytics_1996, analytics_1997, analytics_1998, analytics_1999, analytics_2000, analytics_2001, analytics_2002, analytics_2003, analytics_2004, analytics_2005, analytics_2006, analytics_2007, analytics_2008, analytics_2009, analytics_2010, analytics_2011, analytics_2012, analytics_2013, analytics_2014], last years: null, earliest: null: 0:00:00.108 (Clock.java [taskScheduler-1])
* INFO  2015-05-20 21:43:03,065 [Level: INFO, category: DATAMART, time: Wed May 20 21:43:03 CEST 2015, message: Performing pre-create table work, processes: 7, org unit levels: 3] (InMemoryNotifier.java [taskScheduler-1])
* INFO  2015-05-20 21:43:03,068 Performed pre-create table work: 0:00:00.111 (Clock.java [taskScheduler-1])
* INFO  2015-05-20 21:43:03,068 [Level: INFO, category: DATAMART, time: Wed May 20 21:43:03 CEST 2015, message: Creating analytics tables] (InMemoryNotifier.java [taskScheduler-1])
* INFO  2015-05-20 21:43:03,076 Creating table: analytics_temp_1990, columns: 26 (JdbcAnalyticsTableManager.java [taskScheduler-1])
* INFO  2015-05-20 21:43:03,084 Creating table: analytics_temp_1991, columns: 26 (JdbcAnalyticsTableManager.java [taskScheduler-1])
* INFO  2015-05-20 21:43:03,091 Creating table: analytics_temp_1992, columns: 26 (JdbcAnalyticsTableManager.java [taskScheduler-1])
* INFO  2015-05-20 21:43:03,099 Creating table: analytics_temp_1993, columns: 26 (JdbcAnalyticsTableManager.java [taskScheduler-1])
* INFO  2015-05-20 21:43:03,108 Creating table: analytics_temp_1994, columns: 26 (JdbcAnalyticsTableManager.java [taskScheduler-1])
* INFO  2015-05-20 21:43:03,116 Creating table: analytics_temp_1995, columns: 26 (JdbcAnalyticsTableManager.java [taskScheduler-1])
* INFO  2015-05-20 21:43:03,125 Creating table: analytics_temp_1996, columns: 26 (JdbcAnalyticsTableManager.java [taskScheduler-1])
* INFO  2015-05-20 21:43:03,134 Creating table: analytics_temp_1997, columns: 26 (JdbcAnalyticsTableManager.java [taskScheduler-1])
* INFO  2015-05-20 21:43:03,143 Creating table: analytics_temp_1998, columns: 26 (JdbcAnalyticsTableManager.java [taskScheduler-1])
* INFO  2015-05-20 21:43:03,152 Creating table: analytics_temp_1999, columns: 26 (JdbcAnalyticsTableManager.java [taskScheduler-1])
* INFO  2015-05-20 21:43:03,161 Creating table: analytics_temp_2000, columns: 26 (JdbcAnalyticsTableManager.java [taskScheduler-1])
* INFO  2015-05-20 21:43:03,170 Creating table: analytics_temp_2001, columns: 26 (JdbcAnalyticsTableManager.java [taskScheduler-1])
* INFO  2015-05-20 21:43:03,178 Creating table: analytics_temp_2002, columns: 26 (JdbcAnalyticsTableManager.java [taskScheduler-1])
* INFO  2015-05-20 21:43:03,185 Creating table: analytics_temp_2003, columns: 26 (JdbcAnalyticsTableManager.java [taskScheduler-1])
* INFO  2015-05-20 21:43:03,191 Creating table: analytics_temp_2004, columns: 26 (JdbcAnalyticsTableManager.java [taskScheduler-1])
* INFO  2015-05-20 21:43:03,198 Creating table: analytics_temp_2005, columns: 26 (JdbcAnalyticsTableManager.java [taskScheduler-1])
* INFO  2015-05-20 21:43:03,205 Creating table: analytics_temp_2006, columns: 26 (JdbcAnalyticsTableManager.java [taskScheduler-1])
* INFO  2015-05-20 21:43:03,213 Creating table: analytics_temp_2007, columns: 26 (JdbcAnalyticsTableManager.java [taskScheduler-1])
* INFO  2015-05-20 21:43:03,221 Creating table: analytics_temp_2008, columns: 26 (JdbcAnalyticsTableManager.java [taskScheduler-1])
* INFO  2015-05-20 21:43:03,229 Creating table: analytics_temp_2009, columns: 26 (JdbcAnalyticsTableManager.java [taskScheduler-1])
* INFO  2015-05-20 21:43:03,238 Creating table: analytics_temp_2010, columns: 26 (JdbcAnalyticsTableManager.java [taskScheduler-1])
* INFO  2015-05-20 21:43:03,246 Creating table: analytics_temp_2011, columns: 26 (JdbcAnalyticsTableManager.java [taskScheduler-1])
* INFO  2015-05-20 21:43:03,254 Creating table: analytics_temp_2012, columns: 26 (JdbcAnalyticsTableManager.java [taskScheduler-1])
* INFO  2015-05-20 21:43:03,264 Creating table: analytics_temp_2013, columns: 26 (JdbcAnalyticsTableManager.java [taskScheduler-1])
* INFO  2015-05-20 21:43:03,273 Creating table: analytics_temp_2014, columns: 26 (JdbcAnalyticsTableManager.java [taskScheduler-1])
* INFO  2015-05-20 21:43:03,275 Created analytics tables: 0:00:00.318 (Clock.java [taskScheduler-1])
* INFO  2015-05-20 21:43:03,275 [Level: INFO, category: DATAMART, time: Wed May 20 21:43:03 CEST 2015, message: Populating analytics tables] (InMemoryNotifier.java [taskScheduler-1])
* INFO  2015-05-20 21:43:03,276 Populate table task number: 7 (DefaultAnalyticsTableService.java [taskScheduler-1])
* INFO  2015-05-20 21:43:03,301 [Level: ERROR, category: DATAMART, time: Wed May 20 21:43:03 CEST 2015, message: Process failed: Exception during execution] (InMemoryNotifier.java [taskScheduler-1])
* INFO  2015-05-20 21:43:03,333 SMSLib: A Java API library for sending and receiving SMS via a GSM modem or other supported gateways.
This software is distributed under the terms of the Apache v2.0 License.
Web Site: http://smslib.org (Service.java [taskScheduler-1])
* INFO  2015-05-20 21:43:03,334 Version: 3.5.3 (Service.java [taskScheduler-1])
* INFO  2015-05-20 21:43:03,334 JRE Version: 1.8.0_25 (Service.java [taskScheduler-1])
* INFO  2015-05-20 21:43:03,334 JRE Impl Version: 25.25-b02 (Service.java [taskScheduler-1])
* INFO  2015-05-20 21:43:03,335 O/S: Mac OS X / x86_64 / 10.10.3 (Service.java [taskScheduler-1])
* ERROR 2015-05-20 21:43:03,348 Unexpected error occurred in scheduled task. (TaskUtils.java [taskScheduler-1])
java.lang.RuntimeException: Exception during execution
	at org.hisp.dhis.system.util.ConcurrentUtils.waitForCompletion(ConcurrentUtils.java:55)
	at org.hisp.dhis.analytics.table.DefaultAnalyticsTableService.populateTables(DefaultAnalyticsTableService.java:216)
	at org.hisp.dhis.analytics.table.DefaultAnalyticsTableService.update(DefaultAnalyticsTableService.java:128)
	at org.hisp.dhis.analytics.scheduling.AnalyticsTableTask.run(AnalyticsTableTask.java:137)
	at org.hisp.dhis.scheduling.ScheduledTasks.run(ScheduledTasks.java:60)
	at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.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)
Caused by: java.util.concurrent.ExecutionException: org.springframework.jdbc.BadSqlGrammarException: StatementCallback; bad SQL grammar [insert into analytics_temp_1991 (`Ryvpin5RJZM`,`uM9aEW3ptDy`,`OJ8CtfEKUO7`,`MaShSyRIODt`,`DRilySX62w8`,`Jf8GswsWlGW`,`Kt01M6IvAjA`,`Ly8b2oSN196`,`uidlevel1`,`uidlevel2`,`uidlevel3`,`daily`,`weekly`,`monthly`,`bimonthly`,`quarterly`,`sixmonthly`,`sixmonthlyapril`,`yearly`,`financialapril`,`financialjuly`,`financialoct`,`de`,`co`,`ou`,`level`,daysxvalue, daysno, value, textvalue) select ougs.`Ryvpin5RJZM`,ougs.`uM9aEW3ptDy`,ougs.`OJ8CtfEKUO7`,dcs.`MaShSyRIODt`,dcs.`DRilySX62w8`,dcs.`Jf8GswsWlGW`,dcs.`Kt01M6IvAjA`,dcs.`Ly8b2oSN196`,ous.`uidlevel1`,ous.`uidlevel2`,ous.`uidlevel3`,ps.`daily`,ps.`weekly`,ps.`monthly`,ps.`bimonthly`,ps.`quarterly`,ps.`sixmonthly`,ps.`sixmonthlyapril`,ps.`yearly`,ps.`financialapril`,ps.`financialjuly`,ps.`financialoct`,de.uid,co.uid,ou.uid,ous.level,cast(dv.value as decimal(26,1)) * ps.daysno as daysxvalue, ps.daysno as daysno, cast(dv.value as decimal(26,1)) as value, null as textvalue from datavalue dv left join _dataelementgroupsetstructure degs on dv.dataelementid=degs.dataelementid left join _organisationunitgroupsetstructure ougs on dv.sourceid=ougs.organisationunitid left join _categoryoptiongroupsetstructure cogs on dv.attributeoptioncomboid=cogs.categoryoptioncomboid left join _categorystructure dcs on dv.categoryoptioncomboid=dcs.categoryoptioncomboid left join _categorystructure acs on dv.attributeoptioncomboid=acs.categoryoptioncomboid left join _orgunitstructure ous on dv.sourceid=ous.organisationunitid left join _dataelementstructure des on dv.dataelementid = des.dataelementid inner join dataelement de on dv.dataelementid=de.dataelementid inner join categoryoptioncombo co on dv.categoryoptioncomboid=co.categoryoptioncomboid inner join _categoryoptioncomboname aon on dv.attributeoptioncomboid=aon.categoryoptioncomboid inner join period pe on dv.periodid=pe.periodid inner join _periodstructure ps on dv.periodid=ps.periodid inner join organisationunit ou on dv.sourceid=ou.organisationunitid where de.valuetype = 'int' and de.domaintype = 'AGGREGATE' and pe.startdate >= '1991-01-01' and pe.startdate <= '1991-12-31' and dv.value is not null and dv.value regexp '^(-?[0-9]+)(\.[0-9]+)?(E\d+)?$' and ( dv.value != '0' or de.aggregationtype = 'average' or de.zeroissignificant = true ) ]; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'wmrdhis.analytics_temp_1991' doesn't exist
	at java.util.concurrent.FutureTask.report(FutureTask.java:122)
	at java.util.concurrent.FutureTask.get(FutureTask.java:192)
	at org.hisp.dhis.system.util.ConcurrentUtils.waitForCompletion(ConcurrentUtils.java:51)
	... 12 more
Caused by: org.springframework.jdbc.BadSqlGrammarException: StatementCallback; bad SQL grammar [insert into analytics_temp_1991 (`Ryvpin5RJZM`,`uM9aEW3ptDy`,`OJ8CtfEKUO7`,`MaShSyRIODt`,`DRilySX62w8`,`Jf8GswsWlGW`,`Kt01M6IvAjA`,`Ly8b2oSN196`,`uidlevel1`,`uidlevel2`,`uidlevel3`,`daily`,`weekly`,`monthly`,`bimonthly`,`quarterly`,`sixmonthly`,`sixmonthlyapril`,`yearly`,`financialapril`,`financialjuly`,`financialoct`,`de`,`co`,`ou`,`level`,daysxvalue, daysno, value, textvalue) select ougs.`Ryvpin5RJZM`,ougs.`uM9aEW3ptDy`,ougs.`OJ8CtfEKUO7`,dcs.`MaShSyRIODt`,dcs.`DRilySX62w8`,dcs.`Jf8GswsWlGW`,dcs.`Kt01M6IvAjA`,dcs.`Ly8b2oSN196`,ous.`uidlevel1`,ous.`uidlevel2`,ous.`uidlevel3`,ps.`daily`,ps.`weekly`,ps.`monthly`,ps.`bimonthly`,ps.`quarterly`,ps.`sixmonthly`,ps.`sixmonthlyapril`,ps.`yearly`,ps.`financialapril`,ps.`financialjuly`,ps.`financialoct`,de.uid,co.uid,ou.uid,ous.level,cast(dv.value as decimal(26,1)) * ps.daysno as daysxvalue, ps.daysno as daysno, cast(dv.value as decimal(26,1)) as value, null as textvalue from datavalue dv left join _dataelementgroupsetstructure degs on dv.dataelementid=degs.dataelementid left join _organisationunitgroupsetstructure ougs on dv.sourceid=ougs.organisationunitid left join _categoryoptiongroupsetstructure cogs on dv.attributeoptioncomboid=cogs.categoryoptioncomboid left join _categorystructure dcs on dv.categoryoptioncomboid=dcs.categoryoptioncomboid left join _categorystructure acs on dv.attributeoptioncomboid=acs.categoryoptioncomboid left join _orgunitstructure ous on dv.sourceid=ous.organisationunitid left join _dataelementstructure des on dv.dataelementid = des.dataelementid inner join dataelement de on dv.dataelementid=de.dataelementid inner join categoryoptioncombo co on dv.categoryoptioncomboid=co.categoryoptioncomboid inner join _categoryoptioncomboname aon on dv.attributeoptioncomboid=aon.categoryoptioncomboid inner join period pe on dv.periodid=pe.periodid inner join _periodstructure ps on dv.periodid=ps.periodid inner join organisationunit ou on dv.sourceid=ou.organisationunitid where de.valuetype = 'int' and de.domaintype = 'AGGREGATE' and pe.startdate >= '1991-01-01' and pe.startdate <= '1991-12-31' and dv.value is not null and dv.value regexp '^(-?[0-9]+)(\.[0-9]+)?(E\d+)?$' and ( dv.value != '0' or de.aggregationtype = 'average' or de.zeroissignificant = true ) ]; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'wmrdhis.analytics_temp_1991' doesn't exist
	at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:231)
	at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:73)
	at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:416)
	at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:440)
	at org.hisp.dhis.analytics.table.AbstractJdbcTableManager.populateAndLog(AbstractJdbcTableManager.java:330)
	at org.hisp.dhis.analytics.table.JdbcAnalyticsTableManager.populateTable(JdbcAnalyticsTableManager.java:253)
	at org.hisp.dhis.analytics.table.JdbcAnalyticsTableManager.populateTableAsync(JdbcAnalyticsTableManager.java:173)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	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.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
	at org.springframework.aop.interceptor.AsyncExecutionInterceptor$1.call(AsyncExecutionInterceptor.java:110)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	... 1 more
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'wmrdhis.analytics_temp_1991' doesn't exist
	at sun.reflect.GeneratedConstructorAccessor71.newInstance(Unknown Source)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:408)
	at com.mysql.jdbc.Util.handleNewInstance(Util.java:377)
	at com.mysql.jdbc.Util.getInstance(Util.java:360)
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:978)
	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3887)
	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3823)
	at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2435)
	at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2582)
	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2526)
	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2484)
	at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:848)
	at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:742)
	at com.mchange.v2.c3p0.impl.NewProxyStatement.execute(NewProxyStatement.java:1006)
	at org.springframework.jdbc.core.JdbcTemplate$1ExecuteStatementCallback.doInStatement(JdbcTemplate.java:432)
	at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:405)
	... 14 more

** Affects: dhis2
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of DHIS 2
developers, which is subscribed to DHIS.
https://bugs.launchpad.net/bugs/1457198

Title:
  analytics fails with mysql on 2.18

Status in DHIS 2:
  New

Bug description:
  Analytics process fails with latest 2.18 on mysql. BadSQLgrammar.
  Error below. Tested with "real" database, and with a blank database
  where I've added a few values to test.



  * INFO  2015-05-20 21:43:02,748 Data element category option combo table generated (DefaultResourceTableService.java [taskScheduler-1])
  * INFO  2015-05-20 21:43:02,955 [Level: INFO, category: DATAMART, time: Wed May 20 21:43:02 CEST 2015, message: Updating analytics tables] (InMemoryNotifier.java [taskScheduler-1])
  * INFO  2015-05-20 21:43:02,959 Starting update, processes: 7, org unit levels: 3: 0:00:00.000 (Clock.java [taskScheduler-1])
  * INFO  2015-05-20 21:43:02,965 Approval enabled: false (JdbcAnalyticsTableManager.java [taskScheduler-1])
  * INFO  2015-05-20 21:43:02,966 Get tables using earliest: null (AbstractJdbcTableManager.java [taskScheduler-1])
  * INFO  2015-05-20 21:43:03,065 Table update start: analytics, partitions: [analytics_1990, analytics_1991, analytics_1992, analytics_1993, analytics_1994, analytics_1995, analytics_1996, analytics_1997, analytics_1998, analytics_1999, analytics_2000, analytics_2001, analytics_2002, analytics_2003, analytics_2004, analytics_2005, analytics_2006, analytics_2007, analytics_2008, analytics_2009, analytics_2010, analytics_2011, analytics_2012, analytics_2013, analytics_2014], last years: null, earliest: null: 0:00:00.108 (Clock.java [taskScheduler-1])
  * INFO  2015-05-20 21:43:03,065 [Level: INFO, category: DATAMART, time: Wed May 20 21:43:03 CEST 2015, message: Performing pre-create table work, processes: 7, org unit levels: 3] (InMemoryNotifier.java [taskScheduler-1])
  * INFO  2015-05-20 21:43:03,068 Performed pre-create table work: 0:00:00.111 (Clock.java [taskScheduler-1])
  * INFO  2015-05-20 21:43:03,068 [Level: INFO, category: DATAMART, time: Wed May 20 21:43:03 CEST 2015, message: Creating analytics tables] (InMemoryNotifier.java [taskScheduler-1])
  * INFO  2015-05-20 21:43:03,076 Creating table: analytics_temp_1990, columns: 26 (JdbcAnalyticsTableManager.java [taskScheduler-1])
  * INFO  2015-05-20 21:43:03,084 Creating table: analytics_temp_1991, columns: 26 (JdbcAnalyticsTableManager.java [taskScheduler-1])
  * INFO  2015-05-20 21:43:03,091 Creating table: analytics_temp_1992, columns: 26 (JdbcAnalyticsTableManager.java [taskScheduler-1])
  * INFO  2015-05-20 21:43:03,099 Creating table: analytics_temp_1993, columns: 26 (JdbcAnalyticsTableManager.java [taskScheduler-1])
  * INFO  2015-05-20 21:43:03,108 Creating table: analytics_temp_1994, columns: 26 (JdbcAnalyticsTableManager.java [taskScheduler-1])
  * INFO  2015-05-20 21:43:03,116 Creating table: analytics_temp_1995, columns: 26 (JdbcAnalyticsTableManager.java [taskScheduler-1])
  * INFO  2015-05-20 21:43:03,125 Creating table: analytics_temp_1996, columns: 26 (JdbcAnalyticsTableManager.java [taskScheduler-1])
  * INFO  2015-05-20 21:43:03,134 Creating table: analytics_temp_1997, columns: 26 (JdbcAnalyticsTableManager.java [taskScheduler-1])
  * INFO  2015-05-20 21:43:03,143 Creating table: analytics_temp_1998, columns: 26 (JdbcAnalyticsTableManager.java [taskScheduler-1])
  * INFO  2015-05-20 21:43:03,152 Creating table: analytics_temp_1999, columns: 26 (JdbcAnalyticsTableManager.java [taskScheduler-1])
  * INFO  2015-05-20 21:43:03,161 Creating table: analytics_temp_2000, columns: 26 (JdbcAnalyticsTableManager.java [taskScheduler-1])
  * INFO  2015-05-20 21:43:03,170 Creating table: analytics_temp_2001, columns: 26 (JdbcAnalyticsTableManager.java [taskScheduler-1])
  * INFO  2015-05-20 21:43:03,178 Creating table: analytics_temp_2002, columns: 26 (JdbcAnalyticsTableManager.java [taskScheduler-1])
  * INFO  2015-05-20 21:43:03,185 Creating table: analytics_temp_2003, columns: 26 (JdbcAnalyticsTableManager.java [taskScheduler-1])
  * INFO  2015-05-20 21:43:03,191 Creating table: analytics_temp_2004, columns: 26 (JdbcAnalyticsTableManager.java [taskScheduler-1])
  * INFO  2015-05-20 21:43:03,198 Creating table: analytics_temp_2005, columns: 26 (JdbcAnalyticsTableManager.java [taskScheduler-1])
  * INFO  2015-05-20 21:43:03,205 Creating table: analytics_temp_2006, columns: 26 (JdbcAnalyticsTableManager.java [taskScheduler-1])
  * INFO  2015-05-20 21:43:03,213 Creating table: analytics_temp_2007, columns: 26 (JdbcAnalyticsTableManager.java [taskScheduler-1])
  * INFO  2015-05-20 21:43:03,221 Creating table: analytics_temp_2008, columns: 26 (JdbcAnalyticsTableManager.java [taskScheduler-1])
  * INFO  2015-05-20 21:43:03,229 Creating table: analytics_temp_2009, columns: 26 (JdbcAnalyticsTableManager.java [taskScheduler-1])
  * INFO  2015-05-20 21:43:03,238 Creating table: analytics_temp_2010, columns: 26 (JdbcAnalyticsTableManager.java [taskScheduler-1])
  * INFO  2015-05-20 21:43:03,246 Creating table: analytics_temp_2011, columns: 26 (JdbcAnalyticsTableManager.java [taskScheduler-1])
  * INFO  2015-05-20 21:43:03,254 Creating table: analytics_temp_2012, columns: 26 (JdbcAnalyticsTableManager.java [taskScheduler-1])
  * INFO  2015-05-20 21:43:03,264 Creating table: analytics_temp_2013, columns: 26 (JdbcAnalyticsTableManager.java [taskScheduler-1])
  * INFO  2015-05-20 21:43:03,273 Creating table: analytics_temp_2014, columns: 26 (JdbcAnalyticsTableManager.java [taskScheduler-1])
  * INFO  2015-05-20 21:43:03,275 Created analytics tables: 0:00:00.318 (Clock.java [taskScheduler-1])
  * INFO  2015-05-20 21:43:03,275 [Level: INFO, category: DATAMART, time: Wed May 20 21:43:03 CEST 2015, message: Populating analytics tables] (InMemoryNotifier.java [taskScheduler-1])
  * INFO  2015-05-20 21:43:03,276 Populate table task number: 7 (DefaultAnalyticsTableService.java [taskScheduler-1])
  * INFO  2015-05-20 21:43:03,301 [Level: ERROR, category: DATAMART, time: Wed May 20 21:43:03 CEST 2015, message: Process failed: Exception during execution] (InMemoryNotifier.java [taskScheduler-1])
  * INFO  2015-05-20 21:43:03,333 SMSLib: A Java API library for sending and receiving SMS via a GSM modem or other supported gateways.
  This software is distributed under the terms of the Apache v2.0 License.
  Web Site: http://smslib.org (Service.java [taskScheduler-1])
  * INFO  2015-05-20 21:43:03,334 Version: 3.5.3 (Service.java [taskScheduler-1])
  * INFO  2015-05-20 21:43:03,334 JRE Version: 1.8.0_25 (Service.java [taskScheduler-1])
  * INFO  2015-05-20 21:43:03,334 JRE Impl Version: 25.25-b02 (Service.java [taskScheduler-1])
  * INFO  2015-05-20 21:43:03,335 O/S: Mac OS X / x86_64 / 10.10.3 (Service.java [taskScheduler-1])
  * ERROR 2015-05-20 21:43:03,348 Unexpected error occurred in scheduled task. (TaskUtils.java [taskScheduler-1])
  java.lang.RuntimeException: Exception during execution
  	at org.hisp.dhis.system.util.ConcurrentUtils.waitForCompletion(ConcurrentUtils.java:55)
  	at org.hisp.dhis.analytics.table.DefaultAnalyticsTableService.populateTables(DefaultAnalyticsTableService.java:216)
  	at org.hisp.dhis.analytics.table.DefaultAnalyticsTableService.update(DefaultAnalyticsTableService.java:128)
  	at org.hisp.dhis.analytics.scheduling.AnalyticsTableTask.run(AnalyticsTableTask.java:137)
  	at org.hisp.dhis.scheduling.ScheduledTasks.run(ScheduledTasks.java:60)
  	at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.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)
  Caused by: java.util.concurrent.ExecutionException: org.springframework.jdbc.BadSqlGrammarException: StatementCallback; bad SQL grammar [insert into analytics_temp_1991 (`Ryvpin5RJZM`,`uM9aEW3ptDy`,`OJ8CtfEKUO7`,`MaShSyRIODt`,`DRilySX62w8`,`Jf8GswsWlGW`,`Kt01M6IvAjA`,`Ly8b2oSN196`,`uidlevel1`,`uidlevel2`,`uidlevel3`,`daily`,`weekly`,`monthly`,`bimonthly`,`quarterly`,`sixmonthly`,`sixmonthlyapril`,`yearly`,`financialapril`,`financialjuly`,`financialoct`,`de`,`co`,`ou`,`level`,daysxvalue, daysno, value, textvalue) select ougs.`Ryvpin5RJZM`,ougs.`uM9aEW3ptDy`,ougs.`OJ8CtfEKUO7`,dcs.`MaShSyRIODt`,dcs.`DRilySX62w8`,dcs.`Jf8GswsWlGW`,dcs.`Kt01M6IvAjA`,dcs.`Ly8b2oSN196`,ous.`uidlevel1`,ous.`uidlevel2`,ous.`uidlevel3`,ps.`daily`,ps.`weekly`,ps.`monthly`,ps.`bimonthly`,ps.`quarterly`,ps.`sixmonthly`,ps.`sixmonthlyapril`,ps.`yearly`,ps.`financialapril`,ps.`financialjuly`,ps.`financialoct`,de.uid,co.uid,ou.uid,ous.level,cast(dv.value as decimal(26,1)) * ps.daysno as daysxvalue, ps.daysno as daysno, cast(dv.value as decimal(26,1)) as value, null as textvalue from datavalue dv left join _dataelementgroupsetstructure degs on dv.dataelementid=degs.dataelementid left join _organisationunitgroupsetstructure ougs on dv.sourceid=ougs.organisationunitid left join _categoryoptiongroupsetstructure cogs on dv.attributeoptioncomboid=cogs.categoryoptioncomboid left join _categorystructure dcs on dv.categoryoptioncomboid=dcs.categoryoptioncomboid left join _categorystructure acs on dv.attributeoptioncomboid=acs.categoryoptioncomboid left join _orgunitstructure ous on dv.sourceid=ous.organisationunitid left join _dataelementstructure des on dv.dataelementid = des.dataelementid inner join dataelement de on dv.dataelementid=de.dataelementid inner join categoryoptioncombo co on dv.categoryoptioncomboid=co.categoryoptioncomboid inner join _categoryoptioncomboname aon on dv.attributeoptioncomboid=aon.categoryoptioncomboid inner join period pe on dv.periodid=pe.periodid inner join _periodstructure ps on dv.periodid=ps.periodid inner join organisationunit ou on dv.sourceid=ou.organisationunitid where de.valuetype = 'int' and de.domaintype = 'AGGREGATE' and pe.startdate >= '1991-01-01' and pe.startdate <= '1991-12-31' and dv.value is not null and dv.value regexp '^(-?[0-9]+)(\.[0-9]+)?(E\d+)?$' and ( dv.value != '0' or de.aggregationtype = 'average' or de.zeroissignificant = true ) ]; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'wmrdhis.analytics_temp_1991' doesn't exist
  	at java.util.concurrent.FutureTask.report(FutureTask.java:122)
  	at java.util.concurrent.FutureTask.get(FutureTask.java:192)
  	at org.hisp.dhis.system.util.ConcurrentUtils.waitForCompletion(ConcurrentUtils.java:51)
  	... 12 more
  Caused by: org.springframework.jdbc.BadSqlGrammarException: StatementCallback; bad SQL grammar [insert into analytics_temp_1991 (`Ryvpin5RJZM`,`uM9aEW3ptDy`,`OJ8CtfEKUO7`,`MaShSyRIODt`,`DRilySX62w8`,`Jf8GswsWlGW`,`Kt01M6IvAjA`,`Ly8b2oSN196`,`uidlevel1`,`uidlevel2`,`uidlevel3`,`daily`,`weekly`,`monthly`,`bimonthly`,`quarterly`,`sixmonthly`,`sixmonthlyapril`,`yearly`,`financialapril`,`financialjuly`,`financialoct`,`de`,`co`,`ou`,`level`,daysxvalue, daysno, value, textvalue) select ougs.`Ryvpin5RJZM`,ougs.`uM9aEW3ptDy`,ougs.`OJ8CtfEKUO7`,dcs.`MaShSyRIODt`,dcs.`DRilySX62w8`,dcs.`Jf8GswsWlGW`,dcs.`Kt01M6IvAjA`,dcs.`Ly8b2oSN196`,ous.`uidlevel1`,ous.`uidlevel2`,ous.`uidlevel3`,ps.`daily`,ps.`weekly`,ps.`monthly`,ps.`bimonthly`,ps.`quarterly`,ps.`sixmonthly`,ps.`sixmonthlyapril`,ps.`yearly`,ps.`financialapril`,ps.`financialjuly`,ps.`financialoct`,de.uid,co.uid,ou.uid,ous.level,cast(dv.value as decimal(26,1)) * ps.daysno as daysxvalue, ps.daysno as daysno, cast(dv.value as decimal(26,1)) as value, null as textvalue from datavalue dv left join _dataelementgroupsetstructure degs on dv.dataelementid=degs.dataelementid left join _organisationunitgroupsetstructure ougs on dv.sourceid=ougs.organisationunitid left join _categoryoptiongroupsetstructure cogs on dv.attributeoptioncomboid=cogs.categoryoptioncomboid left join _categorystructure dcs on dv.categoryoptioncomboid=dcs.categoryoptioncomboid left join _categorystructure acs on dv.attributeoptioncomboid=acs.categoryoptioncomboid left join _orgunitstructure ous on dv.sourceid=ous.organisationunitid left join _dataelementstructure des on dv.dataelementid = des.dataelementid inner join dataelement de on dv.dataelementid=de.dataelementid inner join categoryoptioncombo co on dv.categoryoptioncomboid=co.categoryoptioncomboid inner join _categoryoptioncomboname aon on dv.attributeoptioncomboid=aon.categoryoptioncomboid inner join period pe on dv.periodid=pe.periodid inner join _periodstructure ps on dv.periodid=ps.periodid inner join organisationunit ou on dv.sourceid=ou.organisationunitid where de.valuetype = 'int' and de.domaintype = 'AGGREGATE' and pe.startdate >= '1991-01-01' and pe.startdate <= '1991-12-31' and dv.value is not null and dv.value regexp '^(-?[0-9]+)(\.[0-9]+)?(E\d+)?$' and ( dv.value != '0' or de.aggregationtype = 'average' or de.zeroissignificant = true ) ]; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'wmrdhis.analytics_temp_1991' doesn't exist
  	at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:231)
  	at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:73)
  	at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:416)
  	at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:440)
  	at org.hisp.dhis.analytics.table.AbstractJdbcTableManager.populateAndLog(AbstractJdbcTableManager.java:330)
  	at org.hisp.dhis.analytics.table.JdbcAnalyticsTableManager.populateTable(JdbcAnalyticsTableManager.java:253)
  	at org.hisp.dhis.analytics.table.JdbcAnalyticsTableManager.populateTableAsync(JdbcAnalyticsTableManager.java:173)
  	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  	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.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
  	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
  	at org.springframework.aop.interceptor.AsyncExecutionInterceptor$1.call(AsyncExecutionInterceptor.java:110)
  	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
  	... 1 more
  Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'wmrdhis.analytics_temp_1991' doesn't exist
  	at sun.reflect.GeneratedConstructorAccessor71.newInstance(Unknown Source)
  	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
  	at java.lang.reflect.Constructor.newInstance(Constructor.java:408)
  	at com.mysql.jdbc.Util.handleNewInstance(Util.java:377)
  	at com.mysql.jdbc.Util.getInstance(Util.java:360)
  	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:978)
  	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3887)
  	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3823)
  	at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2435)
  	at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2582)
  	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2526)
  	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2484)
  	at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:848)
  	at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:742)
  	at com.mchange.v2.c3p0.impl.NewProxyStatement.execute(NewProxyStatement.java:1006)
  	at org.springframework.jdbc.core.JdbcTemplate$1ExecuteStatementCallback.doInStatement(JdbcTemplate.java:432)
  	at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:405)
  	... 14 more

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1457198/+subscriptions


Follow ups

References