Cannot load JDBC driver class 'net.snowflake.client.jdbc.SnowflakeDriver'

Downloaded and installed 8.3 using Docker Compose on an ubuntu server behind Nginx, also in the docker compose. Got all of that working successfully and when I am trying to create a connection to our snowflake environment for the first time I keep getting this error:

Cannot load JDBC driver class 'net.snowflake.client.jdbc.SnowflakeDriver'

I went through the steps found here firstly, when I tried to upload the latest .jar file from snowflake (80mb) through this config, it failed with a http 413 error (too big). So I uploaded it manually through a docker command to the path (/usr/local/bin/ignition/data/config/resources/core/ignition/database-driver/Snowflake). I created a dummy driver using a .txt file renamed to a .jar and then I searched for the file within the container to find it. I discovered it was in the above folder through the uploading interface.

So now that I have this 80mb .jar file installed in the folder named appropriately after the driver name, I try to make a connection and the new connection is failing with the above message. I did a reboot of the container and the error persists. I also modified the web.xml file btw to be 100mb\200mb for the “max-file-size” and “max-request-size” respectfully, but alas btw, this did not resolve the 413 issue on second attempt after reboot.

So now I am stuck, how do I get this connection to run?

Also, I am using the latest revision of the .jar at 3.26.0 as of this date.

Here is the full stack trace of the error found on the Database Connection:

java.sql.SQLException: Cannot load JDBC driver class 'net.snowflake.client.jdbc.SnowflakeDriver' at org.apache.commons.dbcp2.DriverFactory.createDriver(DriverFactory.java:53) at org.apache.commons.dbcp2.BasicDataSource.createConnectionFactory(BasicDataSource.java:474) at org.apache.commons.dbcp2.BasicDataSource.createDataSource(BasicDataSource.java:541) at org.apache.commons.dbcp2.BasicDataSource.getConnection(BasicDataSource.java:723) at com.inductiveautomation.ignition.gateway.datasource.DatasourceImpl.getConnectionInternal(DatasourceImpl.java:360) at com.inductiveautomation.ignition.gateway.datasource.DatasourceImpl.runTest(DatasourceImpl.java:312) at com.inductiveautomation.ignition.gateway.datasource.DatasourceManagerImpl$FaultedDatasourceRetryer.lambda$newRetryRunnable$0(DatasourceManagerImpl.java:1109) at com.inductiveautomation.ignition.common.execution.impl.BasicExecutionEngine$TrackedTask.run(BasicExecutionEngine.java:593) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.base/java.util.concurrent.FutureTask.runAndReset(Unknown Source) at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.base/java.lang.Thread.run(Unknown Source) Caused by: java.lang.ClassNotFoundException: net.snowflake.client.jdbc.SnowflakeDriver at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(Unknown Source) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(Unknown Source) at java.base/java.lang.ClassLoader.loadClass(Unknown Source) at org.eclipse.jetty.ee10.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:443) at java.base/java.lang.ClassLoader.loadClass(Unknown Source) at org.apache.commons.dbcp2.DriverFactory.createDriver(DriverFactory.java:48) at org.apache.commons.dbcp2.BasicDataSource.createConnectionFactory(BasicDataSource.java:474) at org.apache.commons.dbcp2.BasicDataSource.createDataSource(BasicDataSource.java:541) at org.apache.commons.dbcp2.BasicDataSource.getConnection(BasicDataSource.java:723) at com.inductiveautomation.ignition.gateway.datasource.DatasourceImpl.getConnectionInternal(DatasourceImpl.java:360) at com.inductiveautomation.ignition.gateway.datasource.DatasourceImpl.runTest(DatasourceImpl.java:312) at com.inductiveautomation.ignition.gateway.datasource.DatasourceManagerImpl$FaultedDatasourceRetryer.lambda$newRetryRunnable$0(DatasourceManagerImpl.java:1109) at com.inductiveautomation.ignition.common.execution.impl.BasicExecutionEngine$TrackedTask.run(BasicExecutionEngine.java:593) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.base/java.util.concurrent.FutureTask.runAndReset(Unknown Source) at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.base/java.lang.Thread.run(Unknown Source)

Are you sure there isn't a "caused by" clipped off that backtrace?

Hmmm. Maybe open the jar file and make sure it actually contains the specified class?

Can you show the full contents of that folder? You'll need a resource.json file that, in its 'manifest', points at your JAR file for it to be a valid resource for Ignition to pick up.

Here is the entire contents of that folder:
I am surprised the .json files are there as again that Upload process of the .jar file failed with the 413 error.

image

Also in response to pturmel’s comment, I opened the .jar file in notepad++ and I do not find the text “net.snowflake.client.jdbc.SnowflakeDriver” inside the file.

So I don’t know enough about .jar files to speak accurately about this, but it’s interesting that there are similarities but no exact matches. Perhaps it’s in a compiled section of the code?

It’s in the middle of that stack trace post, but here it is a an image if it makes it easier to decipher:
I can see that in the Caused By section there is a ClassNotFoundException which is firing, but I don’t know enough how to rectify it unfortunately.

Jar files are zips. Open them with a zip tool. (Linux figures this out for you.)

But aside from that, the permissions on your jar file are not ignition:ignition, which is likely why the ignition service cannot load it.

I’m guessing then the full classname we put into Ignition represents the full path to the file including the folder structure as that seems to line up.

ie: “net.snowflake.client.jdbc.SnowflakeDriver”

I will attempt to “chown” the file in the docker container and see if that resolves it. Thanks for the tip.

@Tim_Ryder don't forget this part - we haven't seen the contents of those JSON files, make sure they line up.

image
I was able to perform a “chown” command on the file and then restarted the ignition server, unfortunately this did not resolve the issue.

resource.json

config.json

These match what I SET in the UI and also what I am currently seeing.

I think that "files" array in resource.json may need an entry that matches the JAR file name?

Presumably this is all handled by the Gateway when the UI workflow doesn't fail due to the file size...

Do you have a reference example you could share with me so i can make the override necessary?

Ok so i just tested this locally:

  1. download the JDBC snowflake Jar
  2. install the jar as a connector in the web UI. I did not hit a size issue here, but I admit in my dev environment i might have increased the upload size.
  3. I have successfully created a Database Connection to my test instance of snowflake. Note that i had to alter the default JDBC_QUERY_RESULT_FORMAT to JSON instead of Arrow. It looks like their JDBC driver expects the arrow dependency and its not included in their JDBC driver jar

I basically followed This KB article with the additional bits of setting JDBC_QUERY_RESULT_FORMAT as mentioned here and I end up with valid connections to my snowflake instance

This definitely points to this being a permissions issue or something. After you altered the permissions of the jar file did you trigger a resource rescan? It can be done from the Platform web ui page in the top right corner:

image

database-connection

config.json on disk:

{
  "connectURL": "jdbc:snowflake://<MY_INSTANCE>.snowflakecomputing.com",
  "connectionProps": "",
  "connectionResetParams": "",
  "defaultTransactionLevel": "DEFAULT",
  "driver": "Snowflake",
  "evictionRate": -1,
  "evictionTests": 3,
  "evictionTime": 1800000,
  "failoverMode": "STANDARD",
  "failoverProfile": "",
  "includeSchemaInTableName": false,
  "password": {
    "data": {
      "ciphertext": "XXX",
      "encrypted_key": "XXX",
      "iv": "XXX",
      "protected": "XXX",
      "tag": "XXXX"
    },
    "type": "Embedded"
  },
  "poolInitSize": 3,
  "poolMaxActive": 8,
  "poolMaxIdle": 8,
  "poolMaxWait": 5000,
  "poolMinIdle": 0,
  "slowQueryLogThreshold": 60000,
  "testOnBorrow": true,
  "testOnReturn": false,
  "testWhileIdle": false,
  "translator": "GENERIC",
  "username": "<MY_USER>",
  "validationQuery": "SELECT 1",
  "validationSleepTime": 10000
}

database-driver

config.json:

{
  "classname": "net.snowflake.client.jdbc.SnowflakeDriver",
  "defaultPropInstructions": "",
  "defaultProps": "",
  "defaultTranslator": "GENERIC",
  "defaultValidationQuery": "SELECT 1",
  "type": "GENERIC",
  "urlFormat": "jdbc:snowflake://\u003caccount_identifier\u003e.snowflakecomputing.com",
  "urlInstructions": ""
}

resource.json:

{
  "scope": "A",
  "description": "",
  "version": 1,
  "restricted": false,
  "overridable": true,
  "files": [
    "config.json",
    "snowflake-jdbc-3.26.0.jar"
  ],
  "attributes": {
    "lastModification": {
      "actor": "<IGNITION_USER>",
      "timestamp": "2025-08-22T14:13:01Z"
    },
    "uuid": "6f7f1abc-f9ee-47e9-9ba7-29e5ce828608",
    "lastModificationSignature": "c00060d211ed9a6f4ea287003e26933ec8744ff56922ea0de3da18460ace9a99",
    "enabled": true
  }
}

driver directory overview:

1 Like

Alright, so I was finally successful.

I ended up having to modify the resource.json file outside of the docker container and put it back in. Then I logged into the container with bash and performed a chown command to the json to make sure it matches the already there config.json owner:group.

Once I did this for the “/usr/local/bin/ignition/data/config/resources/core/ignition/database-connection/CONNECTIONNAMEFOLDER” and also to the “/usr/local/bin/ignition/data/config/resources/core/ignition/database-driver/DRIVERNAMEFOLDER” path, I was finally able to load the resource.

Also note: I modified both “web.xml” files accordingly

…and I still cannot up load the 80mb .jar file from snowflake without getting an http: 413 error. The only resolution is to again cp the file into the container using the “docker cp” command and again performing a chmod and chown to the .jar file to match the other files in the directory.

BTW if anyone is struggling to perform these commands inside the container, you have to login as root:
$ docker exec -u root -it CONTAINERNAME /bin/bash

Then you can perform the chown and chmod. What I still can’t do which is very frustrating, is perform either a nano or vim edit to any files from inside of the container. I have to move them out first and then modify them, to move them back in. It’s quite frustrating. But at least now I have connection!

2 Likes