Skip to content

MetricsService update to simpleJdbcInsert

Jonathan Cooper requested to merge DCDEV-67-prebuilt-simpleJdbcInserts into develop

The simpleJdbcInsert object used to update both the Download and View tables would only work the first time the app was started, and then would always fail for scheduled synchronisations of the data. The following stackoverflow showed the cause: https://stackoverflow.com/questions/15606588/org-springframework-dao-invaliddataaccessapiusageexception-configuration-cant

The solution was to create a SimpleJdbcInsert object for each table (View and Download). This avoided the problem of using Sqlite and SimpleJdbcInsert in the way we had thought was OK (and indeed it might be OK for other types of database, just not Sqlite).

DCDEV-67

Merge request reports

Loading