Problem Overview
When an InfluxDB JDBC driver (for example, the bundled influxdbjdbcdriver.jar shipped by dbschema) is uploaded to an Ignition Gateway through the Config → Databases → Drivers page, the page returns an HTTP 500 — Internal Server Error instead of listing the driver. The Gateway does not report a useful validation message through the UI; the failure surfaces only after the file is parsed by the Gateway's class loader. The same driver works correctly when tested outside Ignition with a standard Java 21 JVM, which strongly suggests a runtime compatibility issue rather than a corrupted archive.
The impact is twofold:
- The driver cannot be registered, so any database connection bound to that driver class fails with a missing-driver exception.
- The Drivers configuration page itself becomes unusable until the offending JAR is removed from
<IGNITION_HOME>/lib/core/optional/oruser-lib/.
Affected Versions and Environment
| Component | Version / Range | Notes |
|---|---|---|
| InfluxDB server | 1.11.x (1.x line) | 1.x query semantics; no Flux or 3.x SQL endpoint. |
| Ignition Gateway | 8.0.x — 8.1.x | Shipped with OpenJDK 17 (JRE 17.0.x). |
| Ignition JRE | Java 17 (class file major version 61) | Hard runtime floor for all loaded user JARs. |
| dbschema influxdb-jdbc JAR | Latest release as of late 2024 | Compiled with class file version 65 (Java 21). |
| Apache Arrow JDBC (InfluxData 3.0) | N/A | Requires JDK 11+ to load, but the runtime footprint is Java 21+; not usable. |
Root Cause: Class File Version Mismatch
The JVM validates every JAR it loads by inspecting the major version encoded in the .class file header. The major version must be less than or equal to the running JVM's supported maximum. The following reference table maps the major version to the corresponding Java SE release:
| Class File Major (Decimal) | Java SE Release | Minimum Runtime |
|---|---|---|
| 52 | Java 8 | JRE 8 |
| 55 | Java 11 | JRE 11 |
| 61 | Java 17 | JRE 17 |
| 65 | Java 21 | JRE 21 |
| 69 | Java 25 | JRE 25 |
The dbschema InfluxDB JDBC driver is compiled with major version 65, which requires Java 21 or newer. Ignition's Gateway is built on Java 17 (major 61) and will refuse to load class files with a higher major version. The class-loader throws an UnsupportedClassVersionError, the JDBC registration servlet catches the failure, and the request returns a generic 500.
Step-by-Step Diagnostic Procedure
- Open a browser, log in to the Ignition Gateway, navigate to Config → Databases → Drivers, and confirm the HTTP 500 response.
- Open the Gateway log file. On a default Linux install:
/opt/ignition/data/logs/wrapper.log
On Windows:C:\Program Files\Inductive Automation\Ignition\logs\wrapper.log - Search for
UnsupportedClassVersionErrorordriver was compiled by Java runtimein the most recent log tail. - Record the offending JAR name and the major version reported in the stack trace.
- Cross-reference the major version against the table above. If the value exceeds 61, the cause is confirmed as a class file version mismatch.
- Remove the offending JAR from
<IGNITION_HOME>/user-lib/(or the database-driver upload folder if used) to restore the Drivers page.
The wrapper.log entry typically looks like:
ERROR | class com.influxdb.jdbc.InfluxDbDriver : Unsupported major.minor version 65.0
java.lang.UnsupportedClassVersionError: com/influxdb/jdbc/InfluxDbDriver has been compiled by a more recent version of the Java Runtime (class file version 65.0), this version of the Java Runtime only recognizes class file versions up to 61.0
Solution Path A — Acquire a Java 17-Compatible Driver
The cleanest fix is to obtain a build of the InfluxDB JDBC driver whose class file major version is 61 or lower.
- Visit the official influxdata/influxdb-java repository and inspect the Releases page.
- Open the most recent release that targets InfluxDB 1.x (look for the
influxdb-client-javaandinfluxdb-client-coremodules, plus any*-jdk8or*-jdk11classifier). - If only Java 21 binaries are offered, clone the repository and rebuild with the project's documented build profile:
git clone https://github.com/influxdata/influxdb-java.gitcd influxdb-java./mvnw -Drelease.java.version=17 -DskipTests clean package - Verify the resulting JAR with the command:
javap -verbose -classpath influxdb-jdbc-*.jar com.influxdb.jdbc.InfluxDbDriver | head -5
Confirm themajor version: 61line. - Upload the verified JAR through Config → Databases → Drivers in the Gateway. The Drivers page must reload without HTTP 500.
Solution Path B — HTTP API Integration (Recommended for InfluxDB 1.11)
If a compatible JDBC build cannot be located, sidestep the JDBC layer entirely and integrate through InfluxDB 1.x's built-in HTTP query endpoint. This path is the most reliable for fixed-version deployments where the server cannot be upgraded.
InfluxDB 1.x HTTP Query Reference
| Endpoint | Method | Purpose |
|---|---|---|
/query |
GET or POST | Execute InfluxQL SELECT, SHOW, and SHOW MEASUREMENTS. |
/write |
POST | Insert line-protocol points. |
/ping |
GET | Health check; returns 204 on success. |
/query?u=<user>&p=<pass>&db=<db>&q=... |
GET | Inline authentication for unauthenticated internal networks. |
Reading a Series into a Perspective Component
- Create a Gateway-level timer script (or a Perspective Session Event script) that polls the
/queryendpoint at a fixed cadence:
import com.inductiveautomation.ignition.common.model.values.QualityCode
url = "http://influx.local:8086/query"
params = "db=plant&q=SELECT mean(\"value\") FROM \"temperature\" WHERE time > now() - 1h GROUP BY time(1m)"
response = system.net.httpClient.get(url, params, timeout=5000)
if response.getStatusCode() == 200:
payload = system.util.jsonDecode(response.getText())
results = payload["results"][0]["series"][0]["values"]
system.tag.writeBlocking(["[default]Influx/TempSeries"], [results])
else:
system.logger.warn("Influx query failed: %s" % response.getStatusCode())
- Bind a Perspective Chart or Table component to the memory tag populated by the polling script.
- For higher cadence (sub-second), use
system.net.httpClient.post()against the same endpoint and pass the query in the body to avoid URL-length limits. - Authenticate using
system.net.httpClient.basicAuthCredentials()when the InfluxDB instance hasauth-enabled = true.
Writing Values Back to InfluxDB
lineProtocol = "machine_state,asset=pump-3 speed=1450,running=true"
writeResp = system.net.httpClient.post(
"http://influx.local:8086/write",
params="db=plant&u=writer&p=secret",
contentType="text/plain",
content=lineProtocol
)
system.tag.writeBlocking(["[default]Influx/WriteStatus"], [writeResp.getStatusCode()])
Solution Path C — Rebuild and Bundle an Internal Driver
For multi-Gateway deployments, build a single Java-17-compatible JAR once and distribute it through an internal Maven repository or a network share:
- Add the influxdb-java repository as a Maven submodule.
- Pin the JDK target to
<maven.compiler.target>17</maven.compiler.target>inpom.xml. - Produce a fat JAR with
maven-shade-pluginso transitive dependencies (OkHttp, Moshi, Retrofit) are bundled. - Upload the fat JAR to each Gateway through the Drivers UI; verify with a test connection.
Verification
- Open Config → Databases → Drivers; the page must render without HTTP 500 and list the new driver.
- Create a database connection of type JDBC, set the
JDBC Driver Classtocom.influxdb.jdbc.InfluxDbDriver, and click Test Connection. The expected response is a green check and a populated list of measurements when a query is run. - If using Path B, open the Perspective component, trigger the polling script manually, and confirm the memory tag receives JSON-encoded series data. Use the Gateway console to verify that no HTTP 4xx/5xx entries are appended to
wrapper.log. - Capture a class-loader verification:
jar -xf influxdb-jdbc.jar com/influxdb/jdbc/InfluxDbDriver.classjavap -v com/influxdb/jdbc/InfluxDbDriver.class | head -3
The output must showmajor version: 61or lower.
Troubleshooting Matrix
| Symptom | Likely Cause | Corrective Action |
|---|---|---|
| HTTP 500 immediately after uploading JAR | Class file version 65 (Java 21) on Java 17 Gateway | Replace with Java 17 build or switch to HTTP API |
| Driver page loads but new driver does not appear | JAR placed in wrong folder | Move to <IGNITION_HOME>/user-lib/ and restart Gateway |
| Test Connection succeeds but queries return empty | Database name mismatch or retention policy | Verify db= parameter and SHOW RETENTION POLICIES
|
HTTP 401 on /query
|
Auth enabled, credentials missing | Add u and p query parameters or Basic Auth header |
HTTP 400 on /write
|
Malformed line protocol or missing timestamp | Validate with influx_inspect export or curl -i against /write
|
| Script timeout on Perspective poll | Default HTTP timeout (60 s) and slow series scan | Pass timeout=5000 and reduce result cardinality |
| Tags or columns drift over time | InfluxDB returns objects with varying fields | Use system.util.jsonDecode defensively; guard on key existence |
Performance and Sizing Notes
When migrating from JDBC to the HTTP API path, account for the following engineering considerations:
-
Result cardinality: InfluxQL
GROUP BY time(1m)over a 24-hour window returns up to 1,440 points. JSON-encoding each value into a memory tag consumes roughly 24 bytes per point; budget around 35 KB per series per day at 1-minute resolution. - Poll interval: Configure the timer script interval to 2× the fastest expected change. Polling faster than the data granularity wastes Gateway CPU.
-
Backpressure: Use
system.util.invokeAsynchronousfor write bursts to avoid blocking the Perspective session. -
Connection pooling:
system.net.httpClientin Ignition reuses connections internally; avoid creating one per component.
Security Considerations
The default InfluxDB 1.x /query endpoint is unauthenticated when auth-enabled = false. In production environments:
- Enable
[http] auth-enabled = trueininfluxdb.conf. - Create a dedicated read-only user:
CREATE USER "ignition_ro" WITH PASSWORD '...'andGRANT READ ON "plant" TO "ignition_ro". - Store credentials in Ignition's Config → Security → Gateway Network Security → Internal Database or in a TLS-protected secret store.
- Front the InfluxDB HTTP listener with a reverse proxy that terminates TLS and rate-limits requests.
Field-Proven Caveats
- The Apache Arrow JDBC driver surfaced in the InfluxData 3.0 documentation is not a viable drop-in for Ignition, because its runtime requirement is Java 21+.
- Ignition 8.0–8.1 ships JRE 17.0.x; Ignition 8.3 retains the same baseline. Until Inductive Automation ships a Java 21 runtime, all JDBC drivers must target class file version 61 or lower.
- Database connection pooling in Ignition is handled by the Gateway, not by the driver. Connection-pool tuning does not affect the class file mismatch.
- Removing the offending JAR does not require a Gateway restart for the Drivers page to recover, but a restart is recommended to clear stale references from the class loader cache.
Frequently Asked Questions
Why does the InfluxDB JDBC driver crash the Ignition Gateway Drivers page with HTTP 500?
The driver is compiled with Java class file major version 65 (Java 21), but the Ignition Gateway runs on Java 17 (class file version 61). The class loader throws an UnsupportedClassVersionError, which the Drivers servlet surfaces as HTTP 500.
Where can I find a Java 17-compatible build of the InfluxDB JDBC driver?
Build it from the official influxdata/influxdb-java repository with mvn -Drelease.java.version=17 clean package. Pre-built Java 21 binaries are not usable in Ignition 8.x until the Gateway runtime is upgraded.
What Java version does Ignition 8.0–8.3 ship with?
Ignition 8.0 through 8.3 ship with OpenJDK 17 (class file version 61). All user-supplied JARs must be compiled with major version 61 or lower to load without throwing UnsupportedClassVersionError.
How do I read InfluxDB 1.11 data into a Perspective component without the JDBC driver?
Poll the /query HTTP endpoint with system.net.httpClient.get, decode the JSON response, and bind the array to a memory tag or a component property. Use timeout and Basic Auth parameters for production deployments.
Does removing the broken JDBC JAR require a Gateway restart?
The Drivers page recovers immediately after the JAR is deleted from user-lib/, but a Gateway restart is recommended to purge stale class references from the cache and avoid inconsistent behavior across pages.