# Sparkline Chart with indirect tag history errors

**URL:** <https://forum.inductiveautomation.com/t/sparkline-chart-with-indirect-tag-history-errors/4863>\
**Category:** Ignition\
**Created:** [July 23, 2012, 7:26pm UTC](https://forum.inductiveautomation.com/t/sparkline-chart-with-indirect-tag-history-errors/4863 "2012-07-23T19:26:58Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Duffanator](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/duffanator/32/3560_2.png) [@Duffanator](https://forum.inductiveautomation.com/u/Duffanator)\
**Post date:** [July 23, 2012, 7:26pm UTC](https://forum.inductiveautomation.com/t/sparkline-chart-with-indirect-tag-history-errors/4863/1 "2012-07-23T19:26:58Z")

</div>

Hey guys,

I upgraded my servers to 7.5.1 over the weekend and now on pages that have sparkline charts with indirect tag history I get this error everytime it refreshed the tag history data, the sparkline goes red and then it actually updated the data and looks fine until the next time it refreshes.

[quote]Message: Error running query:  
TagHistory(paths=[kill floor main plc/synchronization/line -1/current difference], start=Mon Jul 23 15:07:08 EDT 2012, end=Mon Jul 23 15:22:08 EDT 2012, flags=0)@15000ms  
On: Line Sync.Line Sync.Sparkline Chart.data  
Time: Mon Jul 23 3:22:08PM  
Severity: WARN  
Logger: ignition.application.binding.TagHistoryAdapter  
Stack Trace: java.lang.Exception: Error running query:  
TagHistory(paths=[kill floor main plc/synchronization/line -1/current difference], start=Mon Jul 23 15:07:08 EDT 2012, end=Mon Jul 23 15:22:08 EDT 2012, flags=0)@15000ms  
On: Line Sync.Line Sync.Sparkline Chart.data  
&nbsp;&nbsp;&nbsp;&nbsp;at com.inductiveautomation.factorypmi.application.gateway.QueryManager$QueryExecutor.run(QueryManager.java:317)  
&nbsp;&nbsp;&nbsp;&nbsp;at java.lang.Thread.run(Unknown Source)  
Caused by: com.inductiveautomation.ignition.client.gateway\_interface.GatewayException: null  
&nbsp;&nbsp;&nbsp;&nbsp;at com.inductiveautomation.ignition.client.gateway\_interface.GatewayInterface.newGatewayException(GatewayInterface.java:312)  
&nbsp;&nbsp;&nbsp;&nbsp;at com.inductiveautomation.ignition.client.gateway\_interface.GatewayInterface.sendMessage(GatewayInterface.java:286)  
&nbsp;&nbsp;&nbsp;&nbsp;at com.inductiveautomation.ignition.client.gateway\_interface.GatewayInterface.sendMessage(GatewayInterface.java:243)  
&nbsp;&nbsp;&nbsp;&nbsp;at com.inductiveautomation.ignition.client.gateway\_interface.GatewayInterface.runTagHistoryQuery(GatewayInterface.java:626)  
&nbsp;&nbsp;&nbsp;&nbsp;at com.inductiveautomation.factorypmi.application.gateway.GWITagHistoryProvider.query(GWITagHistoryProvider.java:16)  
&nbsp;&nbsp;&nbsp;&nbsp;at com.inductiveautomation.ignition.common.sqltags.history.cache.TagHistoryCache.query(TagHistoryCache.java:193)  
&nbsp;&nbsp;&nbsp;&nbsp;at com.inductiveautomation.factorypmi.application.gateway.TagHistoryQuery.execute(TagHistoryQuery.java:34)  
&nbsp;&nbsp;&nbsp;&nbsp;at com.inductiveautomation.factorypmi.application.gateway.QueryManager$Query.execute(QueryManager.java:701)  
&nbsp;&nbsp;&nbsp;&nbsp;at com.inductiveautomation.factorypmi.application.gateway.QueryManager$Query.access$500(QueryManager.java:674)  
&nbsp;&nbsp;&nbsp;&nbsp;at com.inductiveautomation.factorypmi.application.gateway.QueryManager$QueryExecutor.run(QueryManager.java:315)  
&nbsp;&nbsp;&nbsp;&nbsp;… 1 more  
Caused by: java.lang.NullPointerException  
&nbsp;&nbsp;&nbsp;&nbsp;at com.inductiveautomation.ignition.gateway.sqltags.history.query.loaders.DatasourceHistoryLoader.getEffectiveWindowSizeMS(DatasourceHistoryLoader.java:178)  
&nbsp;&nbsp;&nbsp;&nbsp;at com.inductiveautomation.ignition.gateway.sqltags.history.query.HistoryWriter.calculateBlockSize(HistoryWriter.java:203)  
&nbsp;&nbsp;&nbsp;&nbsp;at com.inductiveautomation.ignition.gateway.sqltags.history.query.HistoryWriter.execute(HistoryWriter.java:236)  
&nbsp;&nbsp;&nbsp;&nbsp;at com.inductiveautomation.ignition.gateway.sqltags.SQLTagsManagerImpl.queryHistory(SQLTagsManagerImpl.java:826)  
&nbsp;&nbsp;&nbsp;&nbsp;at com.inductiveautomation.ignition.gateway.servlets.gateway.functions.QueryTagHistory.invoke(QueryTagHistory.java:105)  
&nbsp;&nbsp;&nbsp;&nbsp;at com.inductiveautomation.ignition.gateway.servlets.Gateway.doPost(Gateway.java:398)  
&nbsp;&nbsp;&nbsp;&nbsp;at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)  
&nbsp;&nbsp;&nbsp;&nbsp;at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)  
&nbsp;&nbsp;&nbsp;&nbsp;at com.inductiveautomation.ignition.gateway.bootstrap.MapServlet.service(MapServlet.java:85)  
&nbsp;&nbsp;&nbsp;&nbsp;at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)  
&nbsp;&nbsp;&nbsp;&nbsp;at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)  
&nbsp;&nbsp;&nbsp;&nbsp;at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)  
&nbsp;&nbsp;&nbsp;&nbsp;at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)  
&nbsp;&nbsp;&nbsp;&nbsp;at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)  
&nbsp;&nbsp;&nbsp;&nbsp;at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)  
&nbsp;&nbsp;&nbsp;&nbsp;at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)  
&nbsp;&nbsp;&nbsp;&nbsp;at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)  
&nbsp;&nbsp;&nbsp;&nbsp;at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)  
&nbsp;&nbsp;&nbsp;&nbsp;at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)  
&nbsp;&nbsp;&nbsp;&nbsp;at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)  
&nbsp;&nbsp;&nbsp;&nbsp;at java.lang.Thread.run(null)  
  
Stack Trace: com.inductiveautomation.factorypmi.application.gateway.QueryManager$QueryExecutor.run(QueryManager.java:317)  
java.lang.Thread.run(Unknown Source)  
[/quote]

Also, if it means anything, the sparkline charts are part of templates as well.

---

<div class="post-metadata">

**Author:** ![Colby.Clegg](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/colby.clegg/32/3282_2.png) [@Colby.Clegg](https://forum.inductiveautomation.com/u/Colby.Clegg)\
**Post date:** [July 23, 2012, 10:36pm UTC](https://forum.inductiveautomation.com/t/sparkline-chart-with-indirect-tag-history-errors/4863/2 "2012-07-23T22:36:07Z")

</div>

I doubt it has anything to do with the type of chart, but instead perhaps with the binding settings & some sort of issue with the data. In particular, take a look and see if the binding on “data” is set to a sample size of “Natural”. If so, when you look at the console in the gateway, do you see any messages like “No scan class information found for tags”?

If it’s not “natural”, let me know. Otherwise I would recommend trying either on-change or fixed. Ultimately, it’s trying to figure out what the tag’s scan class was running at, and is failing for some reason. If you want, you can call in and we can try to track down what’s really going on, but trying one of the other modes should at least work around it for now.

Regards,

---

<div class="post-metadata">

**Author:** ![Duffanator](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/duffanator/32/3560_2.png) [@Duffanator](https://forum.inductiveautomation.com/u/Duffanator)\
**Post date:** [July 23, 2012, 10:42pm UTC](https://forum.inductiveautomation.com/t/sparkline-chart-with-indirect-tag-history-errors/4863/3 "2012-07-23T22:42:05Z")

</div>

Well, I think the actual problem is this:

> [@](#):
>
> TagHistory(paths=[kill floor main plc/synchronization/line -1/current difference]

Even though it's supposed to be getting an actual number for "line -1" it's putting a -1 in there, of course there is no line -1. It does this everytime it refreshes. Instead of using the indirection it's putting -1 in for the indirect value. It was working fine before the upgrade to 7.5.1 (from 7.5.0).

---

<div class="post-metadata">

**Author:** ![Colby.Clegg](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/colby.clegg/32/3282_2.png) [@Colby.Clegg](https://forum.inductiveautomation.com/u/Colby.Clegg)\
**Post date:** [July 23, 2012, 10:59pm UTC](https://forum.inductiveautomation.com/t/sparkline-chart-with-indirect-tag-history-errors/4863/4 "2012-07-23T22:59:53Z")

</div>

Ah, ok, I’ll take a look at that scenario. However, my main suggestion still applies: this is an error that should only be able to happen if using “natural” results. If you can use a different result type, you should be able to get around it until we fix the main issue.

Regards,

---

<div class="post-metadata">

**Author:** ![Duffanator](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/duffanator/32/3560_2.png) [@Duffanator](https://forum.inductiveautomation.com/u/Duffanator)\
**Post date:** [July 23, 2012, 11:05pm UTC](https://forum.inductiveautomation.com/t/sparkline-chart-with-indirect-tag-history-errors/4863/5 "2012-07-23T23:05:55Z")

</div>

Will do, I’ll take a look at that tomorrow.

Also, after thinking about it the indirection is pointing to a user defined datatype and the chart is part of a template whose drop target is the user defined data type. Maybe all of that has something to do with it too. FYI.

---

<div class="post-metadata">

**Author:** ![Duffanator](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/duffanator/32/3560_2.png) [@Duffanator](https://forum.inductiveautomation.com/u/Duffanator)\
**Post date:** [July 24, 2012, 11:27am UTC](https://forum.inductiveautomation.com/t/sparkline-chart-with-indirect-tag-history-errors/4863/6 "2012-07-24T11:27:09Z")

</div>

FYI, Changing the sample size to fixed seems to have gotten rid of that error on the client.

However I’m still getting a ton of these errors in the gateway console:

 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/b/ba23a26b2f82c3098781c68e8d31dcc32ac59129.png)

---

<div class="post-metadata">

**Author:** ![Colby.Clegg](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/colby.clegg/32/3282_2.png) [@Colby.Clegg](https://forum.inductiveautomation.com/u/Colby.Clegg)\
**Post date:** [July 27, 2012, 11:44pm UTC](https://forum.inductiveautomation.com/t/sparkline-chart-with-indirect-tag-history-errors/4863/7 "2012-07-27T23:44:19Z")

</div>

Hi,

It seems to be having some difficulty dealing with tags that don’t exist (the paths have -1, so I’m guessing these are happening in the designer when you don’t have a valid property there). It shouldn’t hurt anything, but I’ll take a look- it’s supposed to just return bad quality.

Regards,

---

<div class="post-metadata">

**Author:** ![Colby.Clegg](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/colby.clegg/32/3282_2.png) [@Colby.Clegg](https://forum.inductiveautomation.com/u/Colby.Clegg)\
**Post date:** [August 13, 2012, 5:10pm UTC](https://forum.inductiveautomation.com/t/sparkline-chart-with-indirect-tag-history-errors/4863/8 "2012-08-13T17:10:16Z")

</div>

Looking at your latest log, I think we’ve fixed all of the actual errors. The log message about “no tag info found” is a nuisance, but technically correct, and useful for troubleshooting. However, I’ve changed that logger to only log once per minute, so it should cut down on the number of messages.

Regards,

---

<div class="post-metadata">

**Author:** ![Duffanator](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/duffanator/32/3560_2.png) [@Duffanator](https://forum.inductiveautomation.com/u/Duffanator)\
**Post date:** [August 13, 2012, 7:13pm UTC](https://forum.inductiveautomation.com/t/sparkline-chart-with-indirect-tag-history-errors/4863/9 "2012-08-13T19:13:50Z")

</div>

Ok, that’s fair. Thank you!
