# Easy Chart Functionality Implementation

**URL:** <https://forum.inductiveautomation.com/t/easy-chart-functionality-implementation/7759>\
**Category:** Ignition\
**Created:** [December 24, 2013, 1:51pm UTC](https://forum.inductiveautomation.com/t/easy-chart-functionality-implementation/7759 "2013-12-24T13:51:14Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![ashish007pict](https://avatars.discourse-cdn.com/v4/letter/a/aca169/32.png) [@ashish007pict](https://forum.inductiveautomation.com/u/ashish007pict)\
**Post date:** [December 24, 2013, 1:51pm UTC](https://forum.inductiveautomation.com/t/easy-chart-functionality-implementation/7759/1 "2013-12-24T13:51:14Z")

</div>

Hello All,

I am using Ignition for Report Generation and Data logging project. Also the part of the project includes data display on chart for last one hour. I have read the help and come to know Easy Chart is the best to suit this requirement.  
But I am not able to assign tag values to easy chart. and from the help they are saying we need to use historian tags. Can some body tell me how to do that?

I am using SQLite database for this application.

Thanks for the help…

---

<div class="post-metadata">

**Author:** ![nmudge](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nmudge/32/3394_2.png) [@nmudge](https://forum.inductiveautomation.com/u/nmudge)\
**Post date:** [December 24, 2013, 4:14pm UTC](https://forum.inductiveautomation.com/t/easy-chart-functionality-implementation/7759/2 "2013-12-24T16:14:06Z")

</div>

Hi,

You need to turn history on on your SQLTags.

Here's how to do that from the Ignition manual:

> [@](#):
>
> How to Turn on History for a Tag  
> [ul]  
> In the Ignition designer, locate the desired tag in the SQLTags browser.  
> Edit the tag by right clicking and selecting "Edit Tag" or merely double click on the tag.  
> Select the history option, and then select "yes" to enable history.  
> Fill in the appropriate settings for the history properties. Refer to this section for property explanation and help: History Properties  
> Finally click ok and history will start being stored for your tag to the history provider you selected.  
> [/ul]

See here in the manual about logging data with tags: [inductiveautomation.com/support/ ... \_a\_tag.htm](http://inductiveautomation.com/support/usermanuals/ignition/index.html?how_do_i_log_history_for_a_tag.htm)

---

<div class="post-metadata">

**Author:** ![anna](https://avatars.discourse-cdn.com/v4/letter/a/779978/32.png) [@anna](https://forum.inductiveautomation.com/u/anna)\
**Post date:** [December 26, 2013, 5:46pm UTC](https://forum.inductiveautomation.com/t/easy-chart-functionality-implementation/7759/3 "2013-12-26T17:46:30Z")

</div>

You can also add a “DB Pen” via the Easy Chart Customizer, which is handy if you want to display data logged by a transaction group. All that needs is a column containing the values and a column containing time stamps.

---

<div class="post-metadata">

**Author:** ![ashish007pict](https://avatars.discourse-cdn.com/v4/letter/a/aca169/32.png) [@ashish007pict](https://forum.inductiveautomation.com/u/ashish007pict)\
**Post date:** [December 27, 2013, 10:17am UTC](https://forum.inductiveautomation.com/t/easy-chart-functionality-implementation/7759/4 "2013-12-27T10:17:00Z")

</div>

Hello All,

Thanks for your help. I used SQLTagHistorian method. I enabled History on my tag. Tag data type is Float4. Ignition has already configured the SQL Tags Historian for my database. The connection between PLC and SQLite database is showing OK in Gateway status tab.

After doing this, when I drag and drop tag from SQL Tag Browser on to Easy Chart, it gives me error for gateway exception and SQL exception nosuch table: sqlth\_drv

The help says that Igntion creates its own table to store the history data. So Am I missing something here?

I cannot use other option as I dont want to modify my database. I want to keep it universal. I am using varchar as a datatype for every table. And data that I want to store is float. And help says that I need to specify table name and columns corresponding to temperature data and time stamp.

Please help.  
I am using Ignition 7.3.7 version.  
Thanks in advance,  
Ashish

---

<div class="post-metadata">

**Author:** ![nmudge](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nmudge/32/3394_2.png) [@nmudge](https://forum.inductiveautomation.com/u/nmudge)\
**Post date:** [December 27, 2013, 2:00pm UTC](https://forum.inductiveautomation.com/t/easy-chart-functionality-implementation/7759/5 "2013-12-27T14:00:12Z")

</div>

Hi Ashish,  
Can you upgrade your Ignition to 7.5 or 7.6? That could possibly resolve the problem.

---

<div class="post-metadata">

**Author:** ![anna](https://avatars.discourse-cdn.com/v4/letter/a/779978/32.png) [@anna](https://forum.inductiveautomation.com/u/anna)\
**Post date:** [December 27, 2013, 6:19pm UTC](https://forum.inductiveautomation.com/t/easy-chart-functionality-implementation/7759/6 "2013-12-27T18:19:41Z")

</div>

> [@](#):
>
> when I drag and drop tag from SQL Tag Browser on to Easy Chart, it gives me error for gateway exception and SQL exception nosuch table: sqlth\_drv

Could you post the complete error message, with the stack trace?

> [@](#):
>
> The help says that Igntion creates its own table to store the history data. So Am I missing something here?

Ignition Historian does create its own schema; that being said, the user Ignition connects to the database with needs to have permissions to create tables, for table creation to happen. Do you see any tables with names starting with "sqlth" or "sqlt' in your database?

> [@](#):
>
> I am using varchar as a datatype for every table. And data that I want to store is float.

Ignition Historian makes its own tables, defining columns and datatypes, so how are you "using varchar as a datatype for every table"? - What exactly do you mean by that?  
I am not sure what SQLite does, but generally you will not be able to store a float value to a varchar column.

> [@](#):
>
> And help says that I need to specify table name and columns corresponding to temperature data and time stamp.

That is something you need to do for a DB Pen

> [@](#):
>
> I am using Ignition 7.3.7 version.

You should definitely upgrade. If you cannot upgrade to at least the most recent 7.5 for licencing reasons, you should at least upgrade to the last bug fix release for 7.3, which was 7.3.9. That is a free upgrade. You can get the installer from the "Archived Downloads" section of [http://www.inductiveautomation.com/downloads/ignition/](http://www.inductiveautomation.com/downloads/ignition/)

---

<div class="post-metadata">

**Author:** ![ashish007pict](https://avatars.discourse-cdn.com/v4/letter/a/aca169/32.png) [@ashish007pict](https://forum.inductiveautomation.com/u/ashish007pict)\
**Post date:** [December 30, 2013, 5:16am UTC](https://forum.inductiveautomation.com/t/easy-chart-functionality-implementation/7759/7 "2013-12-30T05:16:07Z")

</div>

> [@](#):
>
> Could you post the complete error message, with the stack trace?

java.lang.Exception: Error running query:  
TagHistory(paths=[Siemens/Data\_Logging/Actual\_Temperature], start=Mon Dec 30 08:55:48 IST 2013, end=Mon Dec 30 09:55:48 IST 2013, flags=0)@1000ms  
On: Data\_Logging.Root Container.Easy Chart  
at com.inductiveautomation.factorypmi.application.gateway.QueryManager$QueryExecutor.run(QueryManager.java:316)  
at java.lang.Thread.run(Thread.java:636)  
Caused by: com.inductiveautomation.ignition.client.gateway\_interface.GatewayException: no such table: sqlth\_drv  
at com.inductiveautomation.ignition.client.gateway\_interface.GatewayInterface.newGatewayException(GatewayInterface.java:295)  
at com.inductiveautomation.ignition.client.gateway\_interface.GatewayInterface.sendMessage(GatewayInterface.java:269)  
at com.inductiveautomation.ignition.client.gateway\_interface.GatewayInterface.sendMessage(GatewayInterface.java:226)  
at com.inductiveautomation.ignition.client.gateway\_interface.GatewayInterface.runTagHistoryQuery(GatewayInterface.java:569)  
at com.inductiveautomation.factorypmi.application.gateway.GWITagHistoryProvider.query(GWITagHistoryProvider.java:16)  
at com.inductiveautomation.ignition.common.sqltags.history.cache.TagHistoryCache.query(TagHistoryCache.java:188)  
at com.inductiveautomation.factorypmi.application.gateway.TagHistoryQuery.execute(TagHistoryQuery.java:34)  
at com.inductiveautomation.factorypmi.application.gateway.QueryManager$Query.execute(QueryManager.java:697)  
at com.inductiveautomation.factorypmi.application.gateway.QueryManager$Query.access$500(QueryManager.java:670)  
at com.inductiveautomation.factorypmi.application.gateway.QueryManager$QueryExecutor.run(QueryManager.java:314)  
... 1 more  
Caused by: java.sql.SQLException: no such table: sqlth\_drv  
at org.sqlite.DB.throwex(DB.java:288)  
at org.sqlite.NativeDB.prepare(Native Method)  
at org.sqlite.DB.prepare(DB.java:114)  
at org.sqlite.PrepStmt.(PrepStmt.java:37)  
at org.sqlite.Conn.prepareStatement(Conn.java:231)  
at org.sqlite.Conn.prepareStatement(Conn.java:224)  
at org.sqlite.Conn.prepareStatement(Conn.java:213)  
at org.apache.commons.dbcp.DelegatingConnection.prepareStatement(DelegatingConnection.java:248)  
at org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.prepareStatement(PoolingDataSource.java:302)  
at com.inductiveautomation.ignition.gateway.datasource.SRConnectionWrapper.prepareStatement(SRConnectionWrapper.java:400)  
at com.inductiveautomation.ignition.gateway.datasource.SRConnectionWrapper.runScalarPrepQuery(SRConnectionWrapper.java:187)  
at com.inductiveautomation.ignition.gateway.sqltags.history.query.loaders.DatasourceHistoryInterface.getDriverId(DatasourceHistoryInterface.java:87)  
at com.inductiveautomation.ignition.gateway.sqltags.history.query.loaders.DatasourceHistoryLoader.initialize(DatasourceHistoryLoader.java:152)  
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:171)  
at com.inductiveautomation.ignition.gateway.sqltags.history.query.BasicTagHistoryQueryProvider.query(BasicTagHistoryQueryProvider.java:158)  
at com.inductiveautomation.ignition.gateway.servlets.gateway.functions.QueryTagHistory.invoke(QueryTagHistory.java:98)  
at com.inductiveautomation.ignition.gateway.servlets.Gateway.doPost(Gateway.java:398)  
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)  
... 1 more

Ignition v7.3.7 (b642)  
Java: Sun Microsystems Inc. 1.6.0\_20

The above error I get when I drag and drop the rag from SQL tag browser to Easy Chart on my window. I have also attached my screen shot for Tag History Setting.

> [@](#):
>
> Ignition Historian does create its own schema; that being said, the user Ignition connects to the database with needs to have permissions to create tables, for table creation to happen. Do you see any tables with names starting with "sqlth" or "sqlt' in your database?

I have checked my database settings and It is not locked for table creation. I can create tables as I needed from SQLite manager plugin in Firefox. I do not see any table created in the database window. Please check screen shot of SQLite manager plug-in.

[quote]Ignition Historian makes its own tables, defining columns and datatypes, so how are you "using varchar as a datatype for every table"? - What exactly do you mean by that?  
I am not sure what SQLite does, but generally you will not be able to store a float value to a varchar column. [/quote]

I was trying for other option using Transaction Groups ans specifying available free table in my database. As this database is developed by other Real Basic Developer I cannot change its structure. Because his program stores each parameter as a STRING/VARCHAR. This system is used world wide and hence he does not want to change the database structure which will create other issues of taking backup of system for every other customer. And it will be difficult to maintain then.

> [@](#):
>
> You should definitely upgrade. If you cannot upgrade to at least the most recent 7.5 for licencing reasons, you should at least upgrade to the last bug fix release for 7.3, which was 7.3.9. That is a free upgrade. You can get the installer from the "Archived Downloads" section of [inductiveautomation.com/downloads/ignition/](http://www.inductiveautomation.com/downloads/ignition/)

As I mentioned earlier, my Ignition application is used world wide for the systems that we sell. I am adding this additional feature to existing application. Can my existing application work on upgraded versions? Or is there any compatibility issue in doing so? I mean whether all datatypes, fonts, other graphics components and its properties  
will match or it will create some problem.

Thanks,  
Ashish

---

<div class="post-metadata">

**Author:** ![ashish007pict](https://avatars.discourse-cdn.com/v4/letter/a/aca169/32.png) [@ashish007pict](https://forum.inductiveautomation.com/u/ashish007pict)\
**Post date:** [December 30, 2013, 9:04am UTC](https://forum.inductiveautomation.com/t/easy-chart-functionality-implementation/7759/8 "2013-12-30T09:04:09Z")

</div>

Hello Anna,  
I tried with 7.3.9 version but still I get the same error while using Easy Chart.  
Below is the log exported in system console menu.  
I am also attaching the logs.bin.gz file for ur reference

java.lang.Exception: Error running query: CREATE TABLE sqlth\_drv (“id” int NOT NULL AUTO\_INCREMENT,“name” varchar(255),PRIMARY KEY (“id”))  
at com.inductiveautomation.ignition.gateway.db.schema.DBTableSchema.executeCommandSet(DBTableSchema.java:141)  
at com.inductiveautomation.ignition.gateway.db.schema.DBTableSchema.createTable(DBTableSchema.java:110)  
at com.inductiveautomation.ignition.gateway.db.schema.DBTableSchema.verifyAndUpdate(DBTableSchema.java:92)  
at com.inductiveautomation.ignition.gateway.sqltags.history.storage.TagHistoryDatasourceSink.checkTables(TagHistoryDatasourceSink.java:924)  
at com.inductiveautomation.ignition.gateway.sqltags.history.storage.TagHistoryDatasourceSink.initialize(TagHistoryDatasourceSink.java:197)  
at com.inductiveautomation.ignition.gateway.history.sinks.AbstractSink.tryToInit(AbstractSink.java:112)  
at com.inductiveautomation.ignition.gateway.sqltags.history.storage.TagHistoryDatasourceSink.tryToInit(TagHistoryDatasourceSink.java:188)  
at com.inductiveautomation.ignition.gateway.history.sinks.AbstractSink.isAccepting(AbstractSink.java:129)  
at com.inductiveautomation.ignition.gateway.history.sinks.AbstractDatasourceSink.isAccepting(AbstractDatasourceSink.java:81)  
at com.inductiveautomation.ignition.gateway.sqltags.history.storage.TagHistoryDatasourceSink.isAccepting(TagHistoryDatasourceSink.java:258)  
at com.inductiveautomation.ignition.gateway.history.sinks.AggregateSink.isAccepting(AggregateSink.java:88)  
at com.inductiveautomation.ignition.gateway.history.forwarders.ForwarderThread.run(ForwarderThread.java:118)  
Caused by: java.sql.SQLException: near “AUTO\_INCREMENT”: syntax error  
at org.sqlite.DB.throwex(DB.java:288)  
at org.sqlite.NativeDB.prepare(Native Method)  
at org.sqlite.DB.prepare(DB.java:114)  
at org.sqlite.Stmt.executeUpdate(Stmt.java:102)  
at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)  
at com.inductiveautomation.ignition.gateway.datasource.DelegatingStatement.executeUpdate(DelegatingStatement.java:79)  
at com.inductiveautomation.ignition.gateway.datasource.SRConnectionWrapper$SRStatement.executeUpdate(SRConnectionWrapper.java:723)  
at com.inductiveautomation.ignition.gateway.db.schema.DBTableSchema.executeCommandSet(DBTableSchema.java:139)  
… 11 more  
Thanks,  
Ashish

---

<div class="post-metadata">

**Author:** ![anna](https://avatars.discourse-cdn.com/v4/letter/a/779978/32.png) [@anna](https://forum.inductiveautomation.com/u/anna)\
**Post date:** [December 30, 2013, 5:10pm UTC](https://forum.inductiveautomation.com/t/easy-chart-functionality-implementation/7759/9 "2013-12-30T17:10:44Z")

</div>

In the screenshot, there are no Historian tables at all, so the schema was not created. The last stack trace you posted sheds some light on what is going on.

[quote]java.lang.Exception: Error running query: CREATE TABLE sqlth\_drv (“id” int NOT NULL AUTO\_INCREMENT,“name” varchar(255),PRIMARY KEY (“id”))  
…  
Caused by: java.sql.SQLException: near “AUTO\_INCREMENT”: syntax error[/quote]

SQLite uses different syntax do define auto-incrementing PKs. Since it is not one of officially supported databases, we do not have a Translator for it that comes with Ignition. We do, however, allow you to create one (or edit any existing ones you may have). Go to your Gateway, Configure \> Databases / Drivers \> “Translators” tab, and make the necessary changes to account for syntax differences. Check out this user manual page for help: [http://www.inductiveautomation.com/support/usermanuals/ignition/index.html?database\_translators.htm](http://www.inductiveautomation.com/support/usermanuals/ignition/index.html?database_translators.htm)

---

<div class="post-metadata">

**Author:** ![anna](https://avatars.discourse-cdn.com/v4/letter/a/779978/32.png) [@anna](https://forum.inductiveautomation.com/u/anna)\
**Post date:** [December 30, 2013, 5:22pm UTC](https://forum.inductiveautomation.com/t/easy-chart-functionality-implementation/7759/10 "2013-12-30T17:22:42Z")

</div>

> [@](#):
>
> I was trying for other option using Transaction Groups ans specifying available free table in my database. As this database is developed by other Real Basic Developer I cannot change its structure. Because his program stores each parameter as a STRING/VARCHAR

I am not sure how strict SQLite is in this respect and whether it will allow you to store a numeric value to a string column (that is on the database, not on us). Since I do not have any error message / stack trace of what you were getting, I cannot tell you more.

What you could do on Ignition's end, however, is cast your numeric values to string prior to storing them - if you do have to store to a varchar column. You would probably want to use expression items in your transaction group for that. To use those values for EasyChart pens, you would have to cast them back to float, as the chart will not trend strings. You can do that writing your own query for the "DB Pens" property using "SQL Query" binding type.

---

<div class="post-metadata">

**Author:** ![ashish007pict](https://avatars.discourse-cdn.com/v4/letter/a/aca169/32.png) [@ashish007pict](https://forum.inductiveautomation.com/u/ashish007pict)\
**Post date:** [December 31, 2013, 7:47am UTC](https://forum.inductiveautomation.com/t/easy-chart-functionality-implementation/7759/11 "2013-12-31T07:47:06Z")

</div>

Hello Anna,

Thanks for valuable feedback.

Finally I got it working 80% I should say 🙂 . I can now see SQL Historian Schema tables inSQLite Manager. I modified the Translator for SQLite.  
Now I am getting following error if I assign my Historian Tag to Easy Chart.

java.lang.Exception: Error running query:  
TagHistory(paths=[Siemens/Data\_Logging/Actual\_Temperature], start=Tue Dec 31 11:33:24 IST 2013, end=Tue Dec 31 12:33:24 IST 2013, flags=0)@1000ms  
On: Data\_Logging.Root Container.Easy Chart  
at com.inductiveautomation.factorypmi.application.gateway.QueryManager$QueryExecutor.run(QueryManager.java:316)  
at java.lang.Thread.run(Thread.java:636)  
Caused by: com.inductiveautomation.ignition.client.gateway\_interface.GatewayException: Specified driver name not found in history store.  
at com.inductiveautomation.ignition.client.gateway\_interface.GatewayInterface.newGatewayException(GatewayInterface.java:295)  
at com.inductiveautomation.ignition.client.gateway\_interface.GatewayInterface.sendMessage(GatewayInterface.java:269)  
at com.inductiveautomation.ignition.client.gateway\_interface.GatewayInterface.sendMessage(GatewayInterface.java:226)  
at com.inductiveautomation.ignition.client.gateway\_interface.GatewayInterface.runTagHistoryQuery(GatewayInterface.java:569)  
at com.inductiveautomation.factorypmi.application.gateway.GWITagHistoryProvider.query(GWITagHistoryProvider.java:16)  
at com.inductiveautomation.ignition.common.sqltags.history.cache.TagHistoryCache.query(TagHistoryCache.java:188)  
at com.inductiveautomation.factorypmi.application.gateway.TagHistoryQuery.execute(TagHistoryQuery.java:34)  
at com.inductiveautomation.factorypmi.application.gateway.QueryManager$Query.execute(QueryManager.java:697)  
at com.inductiveautomation.factorypmi.application.gateway.QueryManager$Query.access$500(QueryManager.java:670)  
at com.inductiveautomation.factorypmi.application.gateway.QueryManager$QueryExecutor.run(QueryManager.java:314)  
… 1 more  
Caused by: java.lang.Exception: Specified driver name not found in history store.  
at com.inductiveautomation.ignition.gateway.sqltags.history.query.loaders.DatasourceHistoryInterface.getDriverId(DatasourceHistoryInterface.java:89)  
at com.inductiveautomation.ignition.gateway.sqltags.history.query.loaders.DatasourceHistoryLoader.initialize(DatasourceHistoryLoader.java:152)  
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:171)  
at com.inductiveautomation.ignition.gateway.sqltags.history.query.BasicTagHistoryQueryProvider.query(BasicTagHistoryQueryProvider.java:158)  
at com.inductiveautomation.ignition.gateway.servlets.gateway.functions.QueryTagHistory.invoke(QueryTagHistory.java:98)  
at com.inductiveautomation.ignition.gateway.servlets.Gateway.doPost(Gateway.java:398)  
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)  
… 1 more

Ignition v7.3.7 (b642)  
Java: Sun Microsystems Inc. 1.6.0\_20

Can you help me what I am missing now in configuration of database?

When I remove the Tag assigned to Easy Chart I get following error in system console

java.sql.SQLException: NYI  
at org.sqlite.Conn.prepareStatement(Conn.java:217)  
at org.apache.commons.dbcp.DelegatingConnection.prepareStatement(DelegatingConnection.java:458)  
at org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.prepareStatement(PoolingDataSource.java:394)  
at com.inductiveautomation.ignition.gateway.datasource.SRConnectionWrapper.prepareStatement(SRConnectionWrapper.java:380)  
at com.inductiveautomation.ignition.gateway.datasource.SRConnectionWrapper.prepareStatmentForGeneratedKeys(SRConnectionWrapper.java:385)  
at com.inductiveautomation.ignition.gateway.datasource.SRConnectionWrapper.runPrepInsertGetKey(SRConnectionWrapper.java:205)  
at com.inductiveautomation.ignition.gateway.sqltags.history.storage.TagHistoryDatasourceSink.getDriverId(TagHistoryDatasourceSink.java:312)  
at com.inductiveautomation.ignition.gateway.sqltags.history.storage.TagHistoryDatasourceSink.createPartitionManager(TagHistoryDatasourceSink.java:226)  
at com.inductiveautomation.ignition.gateway.sqltags.history.storage.TagHistoryDatasourceSink.initialize(TagHistoryDatasourceSink.java:199)  
at com.inductiveautomation.ignition.gateway.history.sinks.AbstractSink.tryToInit(AbstractSink.java:112)  
at com.inductiveautomation.ignition.gateway.sqltags.history.storage.TagHistoryDatasourceSink.tryToInit(TagHistoryDatasourceSink.java:188)  
at com.inductiveautomation.ignition.gateway.history.sinks.AbstractSink.isAccepting(AbstractSink.java:129)  
at com.inductiveautomation.ignition.gateway.history.sinks.AbstractDatasourceSink.isAccepting(AbstractDatasourceSink.java:81)  
at com.inductiveautomation.ignition.gateway.sqltags.history.storage.TagHistoryDatasourceSink.isAccepting(TagHistoryDatasourceSink.java:258)  
at com.inductiveautomation.ignition.gateway.history.sinks.AggregateSink.isAccepting(AggregateSink.java:88)  
at com.inductiveautomation.ignition.gateway.history.forwarders.ForwarderThread.run(ForwarderThread.java:118)

---

<div class="post-metadata">

**Author:** ![adamaustin](https://avatars.discourse-cdn.com/v4/letter/a/5f8ce5/32.png) [@adamaustin](https://forum.inductiveautomation.com/u/adamaustin)\
**Post date:** [December 31, 2013, 3:37pm UTC](https://forum.inductiveautomation.com/t/easy-chart-functionality-implementation/7759/12 "2013-12-31T15:37:07Z")

</div>

I noticed that you changed the GENERIC translator, so you may want to make sure that your JDBC driver is pointing to the right connection type:

(Sorry. I forgot to point out how to get here: Gateway, Configure \> Databases / Connections \> “edit” your connection)

![](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/7/5725c2d90c35613ac813739ada78773690b6485f.jpeg)

Also you should probably use the the [AUTOINCREMENT](http://www.sqlite.org/autoinc.html) keyword for SQLite:

![](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/e/aea1976f1161c63cb3d15d50defa2ebbd2de31f0.jpeg)

Unfortunately, I don’t think this will fix your current error.

---

<div class="post-metadata">

**Author:** ![ashish007pict](https://avatars.discourse-cdn.com/v4/letter/a/aca169/32.png) [@ashish007pict](https://forum.inductiveautomation.com/u/ashish007pict)\
**Post date:** [January 2, 2014, 4:19am UTC](https://forum.inductiveautomation.com/t/easy-chart-functionality-implementation/7759/13 "2014-01-02T04:19:59Z")

</div>

Hello Adamaustin,

I made changes as per ur advice. But Now I am not able to connect to my database. My database connection is always showing FAULTED.

Following is the error I am getting

org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class ‘sun.jdbc.odbc.JdbcOdbcDriver’  
org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1136)org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)com.inductiveautomation.ignition.gateway.datasource.DatasourceImpl.getConnectionInternal(DatasourceImpl.java:189)com.inductiveautomation.ignition.gateway.datasource.DatasourceImpl.runTest(DatasourceImpl.java:145)com.inductiveautomation.ignition.gateway.datasource.DatasourceManagerImpl$FaultedDatasourceRetryer.run(DatasourceManagerImpl.java:1117)java.lang.Thread.run(Thread.java:636)  
java.lang.ClassNotFoundException: sun.jdbc.odbc.JdbcOdbcDriver  
java.net.URLClassLoader$1.run(URLClassLoader.java:217)java.security.AccessController.doPrivileged(Native Method)java.net.URLClassLoader.findClass(URLClassLoader.java:205)java.lang.ClassLoader.loadClass(ClassLoader.java:321)java.lang.ClassLoader.loadClass(ClassLoader.java:266)java.lang.Class.forName0(Native Method)java.lang.Class.forName(Class.java:186)org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1130)org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)com.inductiveautomation.ignition.gateway.datasource.DatasourceImpl.getConnectionInternal(DatasourceImpl.java:189)com.inductiveautomation.ignition.gateway.datasource.DatasourceImpl.runTest(DatasourceImpl.java:145)com.inductiveautomation.ignition.gateway.datasource.DatasourceManagerImpl$FaultedDatasourceRetryer.run(DatasourceManagerImpl.java:1117)java.lang.Thread.run(Thread.java:636)

And My system Console log is as follows

com.inductiveautomation.ignition.gateway.datasource.FaultedDatasourceException: Datasource “IHAZ2\_SQLite” is FAULTED.  
at com.inductiveautomation.ignition.gateway.datasource.DatasourceManagerImpl.getConnection(DatasourceManagerImpl.java:172)  
at com.inductiveautomation.ignition.gateway.datasource.DatasourceImpl.getConnection(DatasourceImpl.java:184)  
at com.inductiveautomation.ignition.gateway.datasource.DatasourceManagerImpl.getConnection(DatasourceManagerImpl.java:121)  
at com.inductiveautomation.ignition.gateway.sqltags.history.processing.GatewayContextConnectionProvider.getConnection(GatewayContextConnectionProvider.java:30)  
at com.inductiveautomation.ignition.gateway.sqltags.history.processing.GatewayContextConnectionProvider.getConnection(GatewayContextConnectionProvider.java:10)  
at com.inductiveautomation.ignition.gateway.sqltags.history.query.loaders.DatasourceHistoryInterface.getConnection(DatasourceHistoryInterface.java:75)  
at com.inductiveautomation.ignition.gateway.sqltags.history.query.loaders.DatasourceHistoryInterface.getDriverId(DatasourceHistoryInterface.java:86)  
at com.inductiveautomation.ignition.gateway.sqltags.history.query.loaders.DatasourceHistoryLoader.initialize(DatasourceHistoryLoader.java:152)  
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:171)  
at com.inductiveautomation.ignition.gateway.sqltags.history.query.BasicTagHistoryQueryProvider.query(BasicTagHistoryQueryProvider.java:158)  
at com.inductiveautomation.ignition.gateway.servlets.gateway.functions.QueryTagHistory.invoke(QueryTagHistory.java:98)  
at com.inductiveautomation.ignition.gateway.servlets.Gateway.doPost(Gateway.java:398)  
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(Thread.java:636)

I hope anybody knows how to get over this problem.

Thanks,  
Ashish

---

<div class="post-metadata">

**Author:** ![adamaustin](https://avatars.discourse-cdn.com/v4/letter/a/5f8ce5/32.png) [@adamaustin](https://forum.inductiveautomation.com/u/adamaustin)\
**Post date:** [January 2, 2014, 3:18pm UTC](https://forum.inductiveautomation.com/t/easy-chart-functionality-implementation/7759/14 "2014-01-02T15:18:36Z")

</div>

Ouch. OK. Change it back to the driver you were using.

Incidentally, I seem to remember getting the Historian error you were getting.  
If you are running this with just a trial License, then I would make sure you  
always go to the gateway webpage and click “Reset Trial”.

Obviously, you’ll need to fix the database fault first.

---

<div class="post-metadata">

**Author:** ![anna](https://avatars.discourse-cdn.com/v4/letter/a/779978/32.png) [@anna](https://forum.inductiveautomation.com/u/anna)\
**Post date:** [January 2, 2014, 11:56pm UTC](https://forum.inductiveautomation.com/t/easy-chart-functionality-implementation/7759/15 "2014-01-02T23:56:12Z")

</div>

Based on this:

> [@](#):
>
> Caused by: java.lang.Exception: Specified driver name not found in history store.

Once you get it all back to the state where it gives you only that previous error that i am quoting -  
Can you post the screenshot of the output of the following 2 queries:

`SELECT * FROM sqlt_drv
SELECT * FROM sqlth_drv` ?

---

<div class="post-metadata">

**Author:** ![ashish007pict](https://avatars.discourse-cdn.com/v4/letter/a/aca169/32.png) [@ashish007pict](https://forum.inductiveautomation.com/u/ashish007pict)\
**Post date:** [January 3, 2014, 5:07am UTC](https://forum.inductiveautomation.com/t/easy-chart-functionality-implementation/7759/16 "2014-01-03T05:07:10Z")

</div>

Hello Anna,

I have run the given queries in DataBase Query Browser. Please find the screen shots of the same.

---

<div class="post-metadata">

**Author:** ![ashish007pict](https://avatars.discourse-cdn.com/v4/letter/a/aca169/32.png) [@ashish007pict](https://forum.inductiveautomation.com/u/ashish007pict)\
**Post date:** [January 8, 2014, 12:52pm UTC](https://forum.inductiveautomation.com/t/easy-chart-functionality-implementation/7759/17 "2014-01-08T12:52:33Z")

</div>

Hello All,

Anybody reading this discussion can help me? I am almost done with this project except this functionality not working ![:prayer:](https://us1.discourse-cdn.com/inductiveautomation/original/1X/e5a7e3b63facc151ea73e3b45db7bdb3d4bdc316.gif ":prayer:") ![:prayer:](https://us1.discourse-cdn.com/inductiveautomation/original/1X/e5a7e3b63facc151ea73e3b45db7bdb3d4bdc316.gif ":prayer:") ![:prayer:](https://us1.discourse-cdn.com/inductiveautomation/original/1X/e5a7e3b63facc151ea73e3b45db7bdb3d4bdc316.gif ":prayer:")

Thanks,  
Ashish

---

<div class="post-metadata">

**Author:** ![Kyle\_Chase](https://avatars.discourse-cdn.com/v4/letter/k/9de0a6/32.png) [@Kyle\_Chase](https://forum.inductiveautomation.com/u/Kyle_Chase)\
**Post date:** [January 8, 2014, 6:00pm UTC](https://forum.inductiveautomation.com/t/easy-chart-functionality-implementation/7759/18 "2014-01-08T18:00:10Z")

</div>

The problem is there is no entry for your system in the sqlth\_drv table. Are you able to take your translator and its settings, and try it from scratch on a blank system? You could also try changing the name of the gateway in gateway settings. Not sure if that will help, but worth a shot

Also for reference, this is why we use H2 instead of SQLite. If you can get it working reliably, you are a better, more patient man than I.

---

<div class="post-metadata">

**Author:** ![anna](https://avatars.discourse-cdn.com/v4/letter/a/779978/32.png) [@anna](https://forum.inductiveautomation.com/u/anna)\
**Post date:** [January 8, 2014, 6:38pm UTC](https://forum.inductiveautomation.com/t/easy-chart-functionality-implementation/7759/19 "2014-01-08T18:38:17Z")

</div>

> [@](#):
>
> Caused by: java.lang.Exception: Specified driver name not found in history store.

You have no entries in the sqlth\_drv table - that's why the driver name is "not found". Typically, you will have (at least) an entry for the gateway you are running on.  
Try changing the name of the gateway from Configure \> Configuration / Gateway Settings page and see if that creates a new entry. If it does not, you may have to try manually INSERTing that data.

---

<div class="post-metadata">

**Author:** ![ashish007pict](https://avatars.discourse-cdn.com/v4/letter/a/aca169/32.png) [@ashish007pict](https://forum.inductiveautomation.com/u/ashish007pict)\
**Post date:** [January 9, 2014, 5:32am UTC](https://forum.inductiveautomation.com/t/easy-chart-functionality-implementation/7759/20 "2014-01-09T05:32:55Z")

</div>

Hello anna and Kyle Chase,

I tried by changing Gateway name as requested by you. But that didn´t add any record to SQLTH\_DRV table.

Anna,  
I manually inserted the record in SQLTH\_DRV. I have posted the screen shot for this. But I cant insert multiple records. I can add only one. Below is the error message that I get  
if I try to insert another record.

com.inductiveautomation.ignition.client.gateway\_interface.GatewayException: Unable to parse message.  
at com.inductiveautomation.ignition.client.gateway\_interface.GatewayInterface.newGatewayException(GatewayInterface.java:295)  
at com.inductiveautomation.ignition.client.gateway\_interface.GatewayInterface.sendMessage(GatewayInterface.java:269)  
at com.inductiveautomation.ignition.client.gateway\_interface.GatewayInterface.sendMessage(GatewayInterface.java:226)  
at com.inductiveautomation.ignition.client.gateway\_interface.GatewayInterface.runUpdateQuery(GatewayInterface.java:456)  
at com.inductiveautomation.ignition.client.gateway\_interface.GatewayInterface.runUpdateQuery(GatewayInterface.java:446)  
at com.inductiveautomation.ignition.designer.querybrowser.QueryBrowser$5.run(QueryBrowser.java:405)  
at java.lang.Thread.run(Thread.java:636)  
Caused by: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 356; An invalid XML character (Unicode: 0x0) was found in the CDATA section.  
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1234)  
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:525)  
at com.inductiveautomation.ignition.gateway.servlets.Gateway.doPost(Gateway.java:278)  
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)  
… 1 more

Ignition v7.3.7 (b642)  
Java: Sun Microsystems Inc. 1.6.0\_20

I have manually added the data 1 to ID column and ignitionmain to NAME column. PFA of screen shots of the same

[Next page](https://forum.inductiveautomation.com/t/easy-chart-functionality-implementation/7759.md?page=2)
