7.3 Beta 4 - History problem

After racking my brains and smashing my head against the wall (and leaving it for the weekend) I can in the morning to find that it still wasn’t storing history data. Finally I remembered to look at the console log and found this error:

[code] TagHistoryDatasourceSink Error inserting tag information into the database.

org.postgresql.util.PSQLException: ERROR: relation “sqlth_te_“id”_seq” does not exist
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1608)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1343)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:194)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:451)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:350)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:254)
at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:93)
at com.inductiveautomation.ignition.gateway.datasource.SRConnectionWrapper$SRPreparedStatement.executeQuery(SRConnectionWrapper.java:803)
at com.inductiveautomation.ignition.gateway.datasource.SRConnectionWrapper.runScalarPrepQuery(SRConnectionWrapper.java:192)
at com.inductiveautomation.ignition.gateway.datasource.SRConnectionWrapper.runScalarQuery(SRConnectionWrapper.java:181)
at com.inductiveautomation.ignition.gateway.datasource.SRConnectionWrapper.fetchGeneratedKey(SRConnectionWrapper.java:236)
at com.inductiveautomation.ignition.gateway.datasource.SRConnectionWrapper.runPrepInsertGetKey(SRConnectionWrapper.java:210)
at com.inductiveautomation.ignition.gateway.sqltags.history.storage.TagHistoryDatasourceSink.getTagIds(TagHistoryDatasourceSink.java:574)
at com.inductiveautomation.ignition.gateway.sqltags.history.storage.TagHistoryDatasourceSink.insertTagValues(TagHistoryDatasourceSink.java:676)
at com.inductiveautomation.ignition.gateway.sqltags.history.storage.TagHistoryDatasourceSink.storeDataToDatasource(TagHistoryDatasourceSink.java:274)
at com.inductiveautomation.ignition.gateway.history.sinks.AbstractDatasourceSink.storeToDatasource(AbstractDatasourceSink.java:120)
at com.inductiveautomation.ignition.gateway.history.sinks.AbstractDatasourceSink.storeData(AbstractDatasourceSink.java:97)
at com.inductiveautomation.ignition.gateway.history.sinks.AggregateSink.storeData(AggregateSink.java:142)
at com.inductiveautomation.ignition.gateway.history.forwarders.ForwarderThread.run(ForwarderThread.java:134)

less[/code]

There was no data in the store and forward either.
I tried to create the sequence but it already existed. At least the “slqth_te_id_seq” existed. the “sqlth_te_“id”_seq” does not. I’m not sure I can create it either :confused:

This error might have something to do with the empty store and forward:

[code]12:24:13 PM StoreAndForward.HistoryDB.HSQLDataStore Error deserializing data from data store.

java.lang.ClassNotFoundException: com.inductiveautomation.ignition.gateway.sqltags.model.BasicScanclassHistorySet
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at java.io.ObjectInputStream.resolveClass(Unknown Source)
at com.inductiveautomation.ignition.gateway.cluster.ModuleObjectInputStream.resolveClass(ModuleObjectInputStream.java:41)
at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)
at java.io.ObjectInputStream.readClassDesc(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.readObject(Unknown Source)
at com.inductiveautomation.ignition.gateway.cluster.ClusterUtil.deserializeObject(ClusterUtil.java:60)
at com.inductiveautomation.ignition.gateway.cluster.ClusterUtil.deserializeObject(ClusterUtil.java:52)
at com.inductiveautomation.ignition.gateway.history.stores.AbstractDatasourceStore.deserializeObject(AbstractDatasourceStore.java:476)
at com.inductiveautomation.ignition.gateway.history.stores.AbstractDatasourceStore.loadTransactions(AbstractDatasourceStore.java:531)
at com.inductiveautomation.ignition.gateway.history.stores.AbstractDatasourceStore.syncdTakeNext(AbstractDatasourceStore.java:491)
at com.inductiveautomation.ignition.gateway.history.stores.AbstractStore.takeNext(AbstractStore.java:191)
at com.inductiveautomation.ignition.gateway.history.stores.MultiStageStore.syncdTakeNext(MultiStageStore.java:171)
at com.inductiveautomation.ignition.gateway.history.stores.AbstractStore.takeNext(AbstractStore.java:191)
at com.inductiveautomation.ignition.gateway.history.forwarders.ForwarderThread.synchedTakeNext(ForwarderThread.java:193)
at com.inductiveautomation.ignition.gateway.history.forwarders.RedundancyAwareForwarder.synchedTakeNext(RedundancyAwareForwarder.java:67)
at com.inductiveautomation.ignition.gateway.history.forwarders.ForwarderThread.run(ForwarderThread.java:124)
[/code]

I think you’re looking at two different issues here. The de-serialization problem definitely indicates a problem we should fix. However, I think your first problem could be related to what’s described in this post. Check that out and let me know if the suggestions there don’t help.

Regards,

I have followed the recommendations in the other thread and posted there for the postgres issuse.

I will await the deserialization fix.