OSI PI - Ignition Reporting Module Error

I have connected Ignition to OSI PI Data Archive and Asset Framework Databases using JDBC drivers. All of the queries work perfectly fine within Vision but when attempting to add the queries within the report designer I receive the following error messages below. Any help would be appreciated as I’d really like to use Ignition to report on OSI PI Data.

The gateway indicates this error:
Gateway 13Nov2020 15:10:14 Error serializing response.

When viewing the database connection in the gateway the queries from Vision are shown but the Queries from the Report Designer are not present indicating they weren’t sent from Ignition to the database. It is also interesting that some queries work within the Report designer but others do not. For example changing a working query from Select to Select * will cause this error.

ExecutionException: com.inductiveautomation.ignition.client.gateway_interface.GatewayException: Unable to read response from Gateway.
caused by GatewayException: Unable to read response from Gateway.
caused by org.xml.sax.SAXException: java.io.EOFException
java.io.EOFException

caused by EOFException

Ignition v8.1.0 (b2020110211)
Java: Azul Systems, Inc. 11.0.7

I think you called into support about this and I worked with a rep. From the stack trace I saw them post, the key problem is that the OSI-PI JDBC driver is (sometimes) returning types that aren’t Java-serializable, which is required for Ignition to send the values from the gateway back down to clients.

This is very significant - I would try to isolate exactly which columns are causing the issue (I strongly suspect it’s particular data type(s) that are the culprit) - if you can isolate it to certain column types, then it’s possible you could work around the JDBC driver restriction by manually casting/coercing to different types in your queries.

Thanks for the response Paul,

I was able to modify queries within the Report and cast columns to a specific type which seems to be working so far. Specifically it seems to be datetime columns causing this error. Any idea on why I’m only seeing these type casting errors within the Reporting module and not Vision displays?

All I can guess at is that the Vision module vs the reporting module are going through somewhat different code paths to send values back to the client, and it’s possible somewhere in the Vision code we’re ‘downcasting’ from whatever type the JDBC driver returns into a native Java Date object before serializing to send to the client.

I am experiencing the exact same error with datetime columns. Can I ask you what type you cast your columns to?