Alert Storage Profiles

Maybe I am missing something, but when I create a new Alert Storage Profile it does not seem to be creating the data table in the database. I also have the auto create box checked.

Ignition: V7.0.3
Database: SQL Server Express 2008 [10.0.2531.0]
OS: Windows 7 x64 with 12GB RAM


Also when I use the console to add a test alert and then attempt to query from the History tab, I get the error “java.lang.NullPointerException” at the top, just under the tabs.

The error reported in the Log Viewer is:

com.inductiveautomation.ignition.gateway.web.pages.config.systemconsole.LogViewer$SerializableLoggingEvent$ClonedThrowable: Error running query: CREATE TABLE ALERT_LOG (SYSTEM varchar(255),PATH varchar(255),displaypath varchar(255),STATE_NAME varchar(255),STATE_SEVERITY int,ACTIVE_VALUE double,ACTIVE_TIMESTAMP datetime,CLEARED_VALUE double,CLEARED_TIMESTAMP datetime,ACK_TIMESTAMP datetime,ACK_USER varchar(255))
com.inductiveautomation.ignition.gateway.db.schema.DBTableSchema.executeCommandSet(DBTableSchema.java:96)
com.inductiveautomation.ignition.gateway.db.schema.DBTableSchema.createTable(DBTableSchema.java:67)
com.inductiveautomation.ignition.gateway.db.schema.DBTableSchema.verifyAndUpdate(DBTableSchema.java:60)
com.inductiveautomation.ignition.gateway.alert.storage.DatasouceAlertStorageProfile.checkTable(DatasouceAlertStorageProfile.java:165)
com.inductiveautomation.ignition.gateway.alert.storage.DatasouceAlertStorageProfile.init(DatasouceAlertStorageProfile.java:142)
com.inductiveautomation.ignition.gateway.alert.storage.DatasouceAlertStorageProfile.receiveAlert(DatasouceAlertStorageProfile.java:326)
com.inductiveautomation.ignition.gateway.alert.storage.AlertStorageManagerImpl.receiveAlert(AlertStorageManagerImpl.java:288)
com.inductiveautomation.ignition.gateway.alert.AlertBusImpl._publishAlert(AlertBusImpl.java:74)
com.inductiveautomation.ignition.gateway.alert.AlertBusImpl.access$100(AlertBusImpl.java:23)
com.inductiveautomation.ignition.gateway.alert.AlertBusImpl$Receiver.receiveMessage(AlertBusImpl.java:112)
com.inductiveautomation.ignition.gateway.cluster.QueueableMessageReceiver.receiveMessage(QueueableMessageReceiver.java:57)
com.inductiveautomation.ignition.gateway.cluster.ClusterManagerImpl$AsyncMessageReciever.receive(ClusterManagerImpl.java:1539)
com.inductiveautomation.ignition.gateway.cluster.ManagerReceiver.receive(ManagerReceiver.java:41)
org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.handleUpEvent(MessageDispatcher.java:633)
org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.up(MessageDispatcher.java:765)
org.jgroups.JChannel.up(JChannel.java:1265)
org.jgroups.stack.ProtocolStack.up(ProtocolStack.java:444)
org.jgroups.protocols.pbcast.STREAMING_STATE_TRANSFER.up(STREAMING_STATE_TRANSFER.java:243)
org.jgroups.protocols.pbcast.GMS.up(GMS.java:787)
org.jgroups.protocols.pbcast.STABLE.up(STABLE.java:233)
org.jgroups.protocols.pbcast.NAKACK.handleMessage(NAKACK.java:861)
org.jgroups.protocols.pbcast.NAKACK.up(NAKACK.java:693)
org.jgroups.protocols.BARRIER.up(BARRIER.java:136)
org.jgroups.protocols.Discovery.up(Discovery.java:244)
org.jgroups.protocols.TP.passMessageUp(TP.java:1266)
org.jgroups.protocols.TP.access$100(TP.java:49)
org.jgroups.protocols.TP$IncomingPacket.handleMyMessage(TP.java:1809)
org.jgroups.protocols.TP$IncomingPacket.run(TP.java:1788)
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
java.lang.Thread.run(Unknown Source)
com.inductiveautomation.ignition.gateway.web.pages.config.systemconsole.LogViewer$SerializableLoggingEvent$ClonedThrowable: Incorrect syntax near ‘,’.
com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:196)
com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1454)
com.microsoft.sqlserver.jdbc.SQLServerStatement.doExecuteStatement(SQLServerStatement.java:786)
com.microsoft.sqlserver.jdbc.SQLServerStatement$StmtExecCmd.doExecute(SQLServerStatement.java:685)
com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:4026)
com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1416)
com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:185)
com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:160)
com.microsoft.sqlserver.jdbc.SQLServerStatement.executeUpdate(SQLServerStatement.java:642)
org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
com.inductiveautomation.ignition.gateway.datasource.DelegatingStatement.executeUpdate(DelegatingStatement.java:79)
com.inductiveautomation.ignition.gateway.datasource.SRConnectionWrapper$SRStatement.executeUpdate(SRConnectionWrapper.java:634)
com.inductiveautomation.ignition.gateway.db.schema.DBTableSchema.executeCommandSet(DBTableSchema.java:94)
com.inductiveautomation.ignition.gateway.db.schema.DBTableSchema.createTable(DBTableSchema.java:67)
com.inductiveautomation.ignition.gateway.db.schema.DBTableSchema.verifyAndUpdate(DBTableSchema.java:60)
com.inductiveautomation.ignition.gateway.alert.storage.DatasouceAlertStorageProfile.checkTable(DatasouceAlertStorageProfile.java:165)
com.inductiveautomation.ignition.gateway.alert.storage.DatasouceAlertStorageProfile.init(DatasouceAlertStorageProfile.java:142)
com.inductiveautomation.ignition.gateway.alert.storage.DatasouceAlertStorageProfile.receiveAlert(DatasouceAlertStorageProfile.java:326)
com.inductiveautomation.ignition.gateway.alert.storage.AlertStorageManagerImpl.receiveAlert(AlertStorageManagerImpl.java:288)
com.inductiveautomation.ignition.gateway.alert.AlertBusImpl._publishAlert(AlertBusImpl.java:74)
com.inductiveautomation.ignition.gateway.alert.AlertBusImpl.access$100(AlertBusImpl.java:23)
com.inductiveautomation.ignition.gateway.alert.AlertBusImpl$Receiver.receiveMessage(AlertBusImpl.java:112)
com.inductiveautomation.ignition.gateway.cluster.QueueableMessageReceiver.receiveMessage(QueueableMessageReceiver.java:57)
com.inductiveautomation.ignition.gateway.cluster.ClusterManagerImpl$AsyncMessageReciever.receive(ClusterManagerImpl.java:1539)
com.inductiveautomation.ignition.gateway.cluster.ManagerReceiver.receive(ManagerReceiver.java:41)
org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.handleUpEvent(MessageDispatcher.java:633)
org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.up(MessageDispatcher.java:765)
org.jgroups.JChannel.up(JChannel.java:1265)
org.jgroups.stack.ProtocolStack.up(ProtocolStack.java:444)
org.jgroups.protocols.pbcast.STREAMING_STATE_TRANSFER.up(STREAMING_STATE_TRANSFER.java:243)
org.jgroups.protocols.pbcast.GMS.up(GMS.java:787)
org.jgroups.protocols.pbcast.STABLE.up(STABLE.java:233)
org.jgroups.protocols.pbcast.NAKACK.handleMessage(NAKACK.java:861)
org.jgroups.protocols.pbcast.NAKACK.up(NAKACK.java:693)
org.jgroups.protocols.BARRIER.up(BARRIER.java:136)
org.jgroups.protocols.Discovery.up(Discovery.java:244)
org.jgroups.protocols.TP.passMessageUp(TP.java:1266)
org.jgroups.protocols.TP.access$100(TP.java:49)
org.jgroups.protocols.TP$IncomingPacket.handleMyMessage(TP.java:1809)
org.jgroups.protocols.TP$IncomingPacket.run(TP.java:1788)
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
java.lang.Thread.run(Unknown Source)

Finally got a beta version of MySQL that would run on Windows 7 x64 and Ignition will create the Alert table, but the Console history tab still does not seem to work correctly and comes up with the same error in the 1st post above (“java.lang.NullPointerException”). It does insert the data, but the history tab fails with the Null Pointer when you try to verify that the alert logging worked.

Anyway, maybe there is something I do not have setup correctly, but from looking at the documentation for the older PMI products there does not seem that there should be much too it. Maybe it is deceptive in the simplicity.

Thanks for any help,

Darren

Edit

Here is the error from when I try to query from the History tab on the console for the Alert Settings.

com.inductiveautomation.ignition.gateway.web.pages.config.systemconsole.LogViewer$SerializableLoggingEvent$ClonedThrowable: null
com.inductiveautomation.ignition.gateway.datasource.query.DBQuery$BooleanGroupedClause.add(DBQuery.java:410)
com.inductiveautomation.ignition.gateway.datasource.query.DBQuery$AndClause.add(DBQuery.java:460)
com.inductiveautomation.ignition.gateway.datasource.query.DBQuery$AndClause.(DBQuery.java:466)
com.inductiveautomation.ignition.gateway.alert.storage.DatasouceAlertStorageProfile.query(DatasouceAlertStorageProfile.java:230)
com.inductiveautomation.ignition.gateway.web.pages.config.alertconsole.history.HistoryTable$1.load(HistoryTable.java:52)
com.inductiveautomation.ignition.gateway.web.pages.config.alertconsole.history.HistoryTable$1.load(HistoryTable.java:40)
org.apache.wicket.model.LoadableDetachableModel.getObject(LoadableDetachableModel.java:120)
org.apache.wicket.Component.getDefaultModelObject(Component.java:1657)
org.apache.wicket.markup.html.list.ListView.getViewSize(ListView.java:221)
org.apache.wicket.markup.html.list.ListView.onPopulate(ListView.java:525)
org.apache.wicket.markup.repeater.AbstractRepeater.onBeforeRender(AbstractRepeater.java:131)
org.apache.wicket.Component.internalBeforeRender(Component.java:1061)
org.apache.wicket.Component.beforeRender(Component.java:1095)
org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1727)
org.apache.wicket.Component.onBeforeRender(Component.java:3855)
org.apache.wicket.Component.internalBeforeRender(Component.java:1061)
org.apache.wicket.Component.beforeRender(Component.java:1095)
org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1727)
org.apache.wicket.Component.onBeforeRender(Component.java:3855)
org.apache.wicket.Component.internalBeforeRender(Component.java:1061)
org.apache.wicket.Component.beforeRender(Component.java:1095)
org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1727)
org.apache.wicket.Component.onBeforeRender(Component.java:3855)
org.apache.wicket.Component.internalBeforeRender(Component.java:1061)
org.apache.wicket.Component.beforeRender(Component.java:1095)
org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1727)
org.apache.wicket.Component.onBeforeRender(Component.java:3855)
org.apache.wicket.Component.internalBeforeRender(Component.java:1061)
org.apache.wicket.Component.beforeRender(Component.java:1095)
org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1727)
org.apache.wicket.Component.onBeforeRender(Component.java:3855)
org.apache.wicket.Page.onBeforeRender(Page.java:1501)
com.inductiveautomation.ignition.gateway.web.pages.BasePage.onBeforeRender(BasePage.java:106)
com.inductiveautomation.ignition.gateway.web.pages.AuthenticatedPage.onBeforeRender(AuthenticatedPage.java:88)
org.apache.wicket.Component.internalBeforeRender(Component.java:1061)
org.apache.wicket.Component.beforeRender(Component.java:1095)
org.apache.wicket.Component.prepareForRender(Component.java:2225)
org.apache.wicket.Component.prepareForRender(Component.java:2262)
org.apache.wicket.Page.renderPage(Page.java:893)
org.apache.wicket.protocol.http.WebRequestCycle.redirectTo(WebRequestCycle.java:167)
org.apache.wicket.request.target.component.PageRequestTarget.respond(PageRequestTarget.java:58)
org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:105)
org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1258)
org.apache.wicket.RequestCycle.step(RequestCycle.java:1329)
org.apache.wicket.RequestCycle.steps(RequestCycle.java:1428)
org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:479)
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:312)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
java.lang.Thread.run(Unknown Source)

The error in the console was a regression problem introduced in 7.0.3, this has been fixed for the next release.

We’re looking into your table creation error now.

This error is caused by a bad datatype being used by your translator when creating the ALERT_LOG table. This has been fixed in newer versions but must be manually changed in your case.

To do this, open the Gateway configuration section. Navigate to Databases->Drivers and click the Translators tab. Edit the MSSQL driver and scroll all the way to the bottom. In the Data Type Mapping section, your value for Double (R8) should read “double”. Change this to “double precision” and click the Save Changes button. When Ignition tries to create the table again, it will use the new data type.

Thanks, did not realize that was buried in there.

Darren

I am having the same problem with version 7.0.3 (b4519) and MS SQL Server 2008 Express.
I have made the change to the translator, but it doesn’t seem to have any effect.

The error message is as follows:

com.inductiveautomation.ignition.gateway.web.pages.config.systemconsole.LogViewer$SerializableLoggingEvent$ClonedThrowable: Error running query: CREATE TABLE ALERT_LOG (SYSTEM varchar(255),PATH varchar(255),displaypath varchar(255),STATE_NAME varchar(255),STATE_SEVERITY int,ACTIVE_VALUE double,ACTIVE_TIMESTAMP datetime,CLEARED_VALUE double,CLEARED_TIMESTAMP datetime,ACK_TIMESTAMP datetime,ACK_USER varchar(255)) com.inductiveautomation.ignition.gateway.db.schema.DBTableSchema.executeCommandSet(DBTableSchema.java:96) com.inductiveautomation.ignition.gateway.db.schema.DBTableSchema.createTable(DBTableSchema.java:67) com.inductiveautomation.ignition.gateway.db.schema.DBTableSchema.verifyAndUpdate(DBTableSchema.java:60) com.inductiveautomation.ignition.gateway.alert.storage.DatasouceAlertStorageProfile.checkTable(DatasouceAlertStorageProfile.java:165) com.inductiveautomation.ignition.gateway.alert.storage.DatasouceAlertStorageProfile.init(DatasouceAlertStorageProfile.java:142) com.inductiveautomation.ignition.gateway.alert.storage.DatasouceAlertStorageProfile.receiveAlert(DatasouceAlertStorageProfile.java:326) com.inductiveautomation.ignition.gateway.alert.storage.AlertStorageManagerImpl.receiveAlert(AlertStorageManagerImpl.java:288) com.inductiveautomation.ignition.gateway.alert.AlertBusImpl._publishAlert(AlertBusImpl.java:74) com.inductiveautomation.ignition.gateway.alert.AlertBusImpl.access$100(AlertBusImpl.java:23) com.inductiveautomation.ignition.gateway.alert.AlertBusImpl$Receiver.receiveMessage(AlertBusImpl.java:112) com.inductiveautomation.ignition.gateway.cluster.QueueableMessageReceiver.receiveMessage(QueueableMessageReceiver.java:57) com.inductiveautomation.ignition.gateway.cluster.ClusterManagerImpl$AsyncMessageReciever.receive(ClusterManagerImpl.java:1539) com.inductiveautomation.ignition.gateway.cluster.ManagerReceiver.receive(ManagerReceiver.java:41) org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.handleUpEvent(MessageDispatcher.java:633) org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.up(MessageDispatcher.java:765) org.jgroups.JChannel.up(JChannel.java:1265) org.jgroups.stack.ProtocolStack.up(ProtocolStack.java:444) org.jgroups.protocols.pbcast.STREAMING_STATE_TRANSFER.up(STREAMING_STATE_TRANSFER.java:243) org.jgroups.protocols.pbcast.GMS.up(GMS.java:787) org.jgroups.protocols.pbcast.STABLE.up(STABLE.java:233) org.jgroups.protocols.pbcast.NAKACK.handleMessage(NAKACK.java:861) org.jgroups.protocols.pbcast.NAKACK.up(NAKACK.java:693) org.jgroups.protocols.BARRIER.up(BARRIER.java:136) org.jgroups.protocols.Discovery.up(Discovery.java:244) org.jgroups.protocols.TP.passMessageUp(TP.java:1266) org.jgroups.protocols.TP.access$100(TP.java:49) org.jgroups.protocols.TP$IncomingPacket.handleMyMessage(TP.java:1809) org.jgroups.protocols.TP$IncomingPacket.run(TP.java:1788) java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) java.lang.Thread.run(Unknown Source) com.inductiveautomation.ignition.gateway.web.pages.config.systemconsole.LogViewer$SerializableLoggingEvent$ClonedThrowable: Incorrect syntax near ','. com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:196) com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1454) com.microsoft.sqlserver.jdbc.SQLServerStatement.doExecuteStatement(SQLServerStatement.java:786) com.microsoft.sqlserver.jdbc.SQLServerStatement$StmtExecCmd.doExecute(SQLServerStatement.java:685) com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:4026) com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1416) com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:185) com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:160) com.microsoft.sqlserver.jdbc.SQLServerStatement.executeUpdate(SQLServerStatement.java:642) org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228) com.inductiveautomation.ignition.gateway.datasource.DelegatingStatement.executeUpdate(DelegatingStatement.java:79) com.inductiveautomation.ignition.gateway.datasource.SRConnectionWrapper$SRStatement.executeUpdate(SRConnectionWrapper.java:634) com.inductiveautomation.ignition.gateway.db.schema.DBTableSchema.executeCommandSet(DBTableSchema.java:94) com.inductiveautomation.ignition.gateway.db.schema.DBTableSchema.createTable(DBTableSchema.java:67) com.inductiveautomation.ignition.gateway.db.schema.DBTableSchema.verifyAndUpdate(DBTableSchema.java:60) com.inductiveautomation.ignition.gateway.alert.storage.DatasouceAlertStorageProfile.checkTable(DatasouceAlertStorageProfile.java:165) com.inductiveautomation.ignition.gateway.alert.storage.DatasouceAlertStorageProfile.init(DatasouceAlertStorageProfile.java:142) com.inductiveautomation.ignition.gateway.alert.storage.DatasouceAlertStorageProfile.receiveAlert(DatasouceAlertStorageProfile.java:326) com.inductiveautomation.ignition.gateway.alert.storage.AlertStorageManagerImpl.receiveAlert(AlertStorageManagerImpl.java:288) com.inductiveautomation.ignition.gateway.alert.AlertBusImpl._publishAlert(AlertBusImpl.java:74) com.inductiveautomation.ignition.gateway.alert.AlertBusImpl.access$100(AlertBusImpl.java:23) com.inductiveautomation.ignition.gateway.alert.AlertBusImpl$Receiver.receiveMessage(AlertBusImpl.java:112) com.inductiveautomation.ignition.gateway.cluster.QueueableMessageReceiver.receiveMessage(QueueableMessageReceiver.java:57) com.inductiveautomation.ignition.gateway.cluster.ClusterManagerImpl$AsyncMessageReciever.receive(ClusterManagerImpl.java:1539) com.inductiveautomation.ignition.gateway.cluster.ManagerReceiver.receive(ManagerReceiver.java:41) org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.handleUpEvent(MessageDispatcher.java:633) org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.up(MessageDispatcher.java:765) org.jgroups.JChannel.up(JChannel.java:1265) org.jgroups.stack.ProtocolStack.up(ProtocolStack.java:444) org.jgroups.protocols.pbcast.STREAMING_STATE_TRANSFER.up(STREAMING_STATE_TRANSFER.java:243) org.jgroups.protocols.pbcast.GMS.up(GMS.java:787) org.jgroups.protocols.pbcast.STABLE.up(STABLE.java:233) org.jgroups.protocols.pbcast.NAKACK.handleMessage(NAKACK.java:861) org.jgroups.protocols.pbcast.NAKACK.up(NAKACK.java:693) org.jgroups.protocols.BARRIER.up(BARRIER.java:136) org.jgroups.protocols.Discovery.up(Discovery.java:244) org.jgroups.protocols.TP.passMessageUp(TP.java:1266) org.jgroups.protocols.TP.access$100(TP.java:49) org.jgroups.protocols.TP$IncomingPacket.handleMyMessage(TP.java:1809) org.jgroups.protocols.TP$IncomingPacket.run(TP.java:1788) java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) java.lang.Thread.run(Unknown Source) (Event 44 of 132) < Previous Next >

I am also getting the following problem when the system is trying to write data to the history tables:
It did work for a while, and then I made some changes to the database connection, (just changed Max wait to 5005 from 5000 to see if that would cause a restart of the connection to apply my translator changes) and now nothing is working.

com.inductiveautomation.ignition.gateway.web.pages.config.systemconsole.LogViewer$SerializableLoggingEvent$ClonedThrowable: Error running query: CREATE TABLE sqlth_drv ("id" int IDENTITY(1,1),"name" varchar(255),PRIMARY KEY ("id")) com.inductiveautomation.ignition.gateway.db.schema.DBTableSchema.executeCommandSet(DBTableSchema.java:96) com.inductiveautomation.ignition.gateway.db.schema.DBTableSchema.createTable(DBTableSchema.java:67) com.inductiveautomation.ignition.gateway.db.schema.DBTableSchema.verifyAndUpdate(DBTableSchema.java:60) com.inductiveautomation.ignition.gateway.history.sinks.TagHistoryDatasourceSink.checkTables(TagHistoryDatasourceSink.java:482) com.inductiveautomation.ignition.gateway.history.sinks.TagHistoryDatasourceSink.initialize(TagHistoryDatasourceSink.java:144) com.inductiveautomation.ignition.gateway.history.sinks.AbstractSink.tryToInit(AbstractSink.java:81) com.inductiveautomation.ignition.gateway.history.sinks.TagHistoryDatasourceSink.tryToInit(TagHistoryDatasourceSink.java:135) com.inductiveautomation.ignition.gateway.history.sinks.AbstractSink.isAccepting(AbstractSink.java:98) com.inductiveautomation.ignition.gateway.history.sinks.AbstractDatasourceSink.isAccepting(AbstractDatasourceSink.java:75) com.inductiveautomation.ignition.gateway.history.sinks.TagHistoryDatasourceSink.isAccepting(TagHistoryDatasourceSink.java:175) com.inductiveautomation.ignition.gateway.history.sinks.AggregateSink.isAccepting(AggregateSink.java:81) com.inductiveautomation.ignition.gateway.history.ForwarderThread.run(ForwarderThread.java:74) com.inductiveautomation.ignition.gateway.web.pages.config.systemconsole.LogViewer$SerializableLoggingEvent$ClonedThrowable: There is already an object named 'sqlth_drv' in the database. com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:196) com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1454) com.microsoft.sqlserver.jdbc.SQLServerStatement.doExecuteStatement(SQLServerStatement.java:786) com.microsoft.sqlserver.jdbc.SQLServerStatement$StmtExecCmd.doExecute(SQLServerStatement.java:685) com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:4026) com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1416) com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:185) com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:160) com.microsoft.sqlserver.jdbc.SQLServerStatement.executeUpdate(SQLServerStatement.java:642) org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228) com.inductiveautomation.ignition.gateway.datasource.DelegatingStatement.executeUpdate(DelegatingStatement.java:79) com.inductiveautomation.ignition.gateway.datasource.SRConnectionWrapper$SRStatement.executeUpdate(SRConnectionWrapper.java:634) com.inductiveautomation.ignition.gateway.db.schema.DBTableSchema.executeCommandSet(DBTableSchema.java:94) com.inductiveautomation.ignition.gateway.db.schema.DBTableSchema.createTable(DBTableSchema.java:67) com.inductiveautomation.ignition.gateway.db.schema.DBTableSchema.verifyAndUpdate(DBTableSchema.java:60) com.inductiveautomation.ignition.gateway.history.sinks.TagHistoryDatasourceSink.checkTables(TagHistoryDatasourceSink.java:482) com.inductiveautomation.ignition.gateway.history.sinks.TagHistoryDatasourceSink.initialize(TagHistoryDatasourceSink.java:144) com.inductiveautomation.ignition.gateway.history.sinks.AbstractSink.tryToInit(AbstractSink.java:81) com.inductiveautomation.ignition.gateway.history.sinks.TagHistoryDatasourceSink.tryToInit(TagHistoryDatasourceSink.java:135) com.inductiveautomation.ignition.gateway.history.sinks.AbstractSink.isAccepting(AbstractSink.java:98) com.inductiveautomation.ignition.gateway.history.sinks.AbstractDatasourceSink.isAccepting(AbstractDatasourceSink.java:75) com.inductiveautomation.ignition.gateway.history.sinks.TagHistoryDatasourceSink.isAccepting(TagHistoryDatasourceSink.java:175) com.inductiveautomation.ignition.gateway.history.sinks.AggregateSink.isAccepting(AggregateSink.java:81) com.inductiveautomation.ignition.gateway.history.ForwarderThread.run(ForwarderThread.java:74)

And now I’m getting this when I try to view the trend. Everything trend and history related seems to have stopped working.

com.inductiveautomation.ignition.client.gateway_interface.GatewayException: Gateway Error 500: Specified driver name not found in history store.
	at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.newGatewayException(GatewayInterface.java:236)
	at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.sendMessage(GatewayInterface.java:211)
	at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.sendMessage(GatewayInterface.java:201)
	at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.runTagHistoryQuery(GatewayInterface.java:472)
	at com.inductiveautomation.factorypmi.application.gateway.QueryManager$TagHistoryQuery.execute(QueryManager.java:673)
	at com.inductiveautomation.factorypmi.application.gateway.QueryManager$QueryExecutor.run(QueryManager.java:340)
	at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.Exception: Specified driver name not found in history store.
	at com.inductiveautomation.ignition.gateway.sqltags.history.query.loaders.DatasourceHistoryLoader.loadDriverId(DatasourceHistoryLoader.java:133)
	at com.inductiveautomation.ignition.gateway.sqltags.history.query.loaders.DatasourceHistoryLoader.initialize(DatasourceHistoryLoader.java:120)
	at com.inductiveautomation.ignition.gateway.sqltags.history.query.loaders.AggregateHistoryLoader.initialize(AggregateHistoryLoader.java:50)
	at com.inductiveautomation.ignition.gateway.sqltags.history.query.HistoryWriter.execute(HistoryWriter.java:117)
	at com.inductiveautomation.ignition.gateway.sqltags.history.query.BasicTagHistoryQueryProvider.query(BasicTagHistoryQueryProvider.java:110)
	at com.inductiveautomation.ignition.gateway.servlets.gateway.functions.QueryTagHistory.invoke(QueryTagHistory.java:81)
	at com.inductiveautomation.ignition.gateway.servlets.Gateway.doPost(Gateway.java:375)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	at com.inductiveautomation.ignition.gateway.bootstrap.MapServlet.service(MapServlet.java:85)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
	at java.lang.Thread.run(null)

Robert.McKenzie,

Odd. Finally got back to this and it is in there already as you requested. Is it possible you are using the wrong translator file when working with MSSQL? I am kind of suspicious that you may be picking up the translator settings for “MySQL” and using on “MSSQL”.

Just a thought.

Darren

Darren,

It’s funny, that’s exactly what I was thinking myself, because the"Create" statement still comes out as:

CREATE TABLE ALERT_LOG (SYSTEM varchar(255),PATH varchar(255),displaypath varchar(255),STATE_NAME varchar(255),STATE_SEVERITY int,ACTIVE_VALUE double,ACTIVE_TIMESTAMP datetime,CLEARED_VALUE double,CLEARED_TIMESTAMP datetime,ACK_TIMESTAMP datetime,ACK_USER varchar(255))

even though the translator for MSSQL in Version 7.03 already has the “double precision” in it.

Well, you raise an interesting question. I’ll check it out, but I don’t think that this is the case.

I resolved this by creating my own ALERT_LOG table manually in SQL Server as follows:

CREATE TABLE ALERT_LOG (SYSTEM varchar(255),
PATH varchar(255),
displaypath varchar(255),
STATE_NAME varchar(255),
STATE_SEVERITY int,
ACTIVE_VALUE float,
ACTIVE_TIMESTAMP datetime,
CLEARED_VALUE float,
CLEARED_TIMESTAMP datetime,
ACK_TIMESTAMP datetime,
ACK_USER varchar(255))