AtlasOfLivingAustralia / logger-service

Atlas event logging
https://logger.ala.org.au
1 stars 8 forks source link

The table for EventSummaryBreakdownReasonSourceEntity doesn't seem to exist #12

Closed ansell closed 5 years ago

ansell commented 6 years ago

The table backing EventSummaryBreakdownReasonSourceEntity, logger.event_summary_breakdown_reason_entity_source, does not appear to exist right now.

Stacktraces from logs look like:

2017-11-02 14:32:51,877 ERROR [SqlExceptionHelper] Table 'logger.event_summary_breakdown_reason_entity_source' doesn't exist
2017-11-02 14:32:51,908 ERROR [GrailsExceptionResolver] MySQLSyntaxErrorException occurred when processing request: [GET] /service/sourceBreakdownCSV
Table 'logger.event_summary_breakdown_reason_entity_source' doesn't exist. Stacktrace follows:
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'logger.event_summary_breakdown_reason_entity_source' doesn't exist
    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:2530)
    at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1907)
    at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2030)
    at org.grails.datastore.gorm.GormStaticApi.methodMissing(GormStaticApi.groovy:104)
    at au.org.ala.logger.LoggerService.getLogEventsBySource(LoggerService.groovy:242)
    at au.org.ala.logger.LoggerController.getSourceBreakdownCSV(LoggerController.groovy:229)
    at grails.plugin.cache.web.filter.PageFragmentCachingFilter.doFilter(PageFragmentCachingFilter.java:198)
    at grails.plugin.cache.web.filter.AbstractFilter.doFilter(AbstractFilter.java:63)
    at au.org.ala.cas.client.UriFilter.doFilter(UriFilter.java:199)
    at au.org.ala.web.filter.ParametersFilterProxy.doFilter(ParametersFilterProxy.java:24)
    at au.org.ala.cas.client.UriFilter.doFilter(UriFilter.java:199)
    at au.org.ala.web.filter.ParametersFilterProxy.doFilter(ParametersFilterProxy.java:24)
    at au.org.ala.cas.client.UriFilter.doFilter(UriFilter.java:199)
    at au.org.ala.web.filter.ParametersFilterProxy.doFilter(ParametersFilterProxy.java:24)
    at org.jasig.cas.client.session.SingleSignOutFilter.doFilter(SingleSignOutFilter.java:97)
    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:745)

Given it is a summary table, it should be compilable from the source detail/event tables. Just opening this issue to track its creation and testing.

nickdos commented 6 years ago

Looks like it was added here: https://github.com/AtlasOfLivingAustralia/logger-service/commit/188c107210f5fe3d64b808a3b98fd1cf288f15cf and I suspect the DB setting of dbCreate = "validate" means that table needs to be manually created?

vjrj commented 5 years ago

I think that this is fixed, see: https://github.com/AtlasOfLivingAustralia/ala-install/issues/211

ansell commented 5 years ago

Thanks, that looks like it would fix the issue.