[BUG] Error on Perspective and Named Queries with 3rd Party JDBC Driver

Attempting to query to a 3rd party historian through their JDBC driver I ran into a few issues.

Running a named query or a perspective based system.db.runQuery against this driver yields this error:

GatewayException: sun.nio.ch.DirectBuffer.cleaner()Lsun/misc/Cleaner;
caused by NoSuchMethodError: sun.nio.ch.DirectBuffer.cleaner()Lsun/misc/Cleaner;

Running a query within Vision, the Script Console, or the Database Query Browser yields the expected returned results, though I receive a HttpChannel warning in the gateway for the same error as above.

Within the Database Query Browser and Named Queries I also cannot browse through tables, which yields the error:

“GatewayException: Unable to read response from Gateway.
caused by org.xml.sax.SAXParseException; lineNumber: 3; columnNumber: 11; The end-tag for element type “Response” must end with a ‘>’ delimiter.”

I am leaning to this being a problem with the JDBC driver, but considering it will probably not be updated for Java 11 anytime soon, I am hopefully that it is not, or at least that I will be able to run queries within Perspective with the gateway warning as it seems like I can do in Vision. The driver claims it is compatible with Java 8-10.

Version: 8.0.0-beta0 (b2018111302)

Hmm. Can you share the driver with us? Is it the PI JDBC driver?

That is is, the 2018 JDBC Driver.

You might be able to work around this issue by installing your own Oracle JDK/JRE 11 on the gateway and then pointing ignition.conf at that instead of the embedded runtime.

It looks like the JDBC Driver didn’t quite get Java 9+ compatibility right.

That would be a shame, I wanted to get away from ever installing Java again. I will give it a shot and let you know how it works out.