Perspective 8.3 Upgrade Issue: JDBC driver

I just upgraded our gateway to 8.3. The only issue I’m having is the screenshot below. Any sugestions?

Copy the full error stack(click that copy button) and post it here as pre-formatted text. Please see Wiki - how to post code on this forum.

The chopped off text contains important information for troubleshooting.

Additionally, you should check to see if the SQL server Driver is actually present in the JDBC driver folder on your gateway. It should come with Ignition on install but maybe something happened.

java.sql.SQLException: Cannot load JDBC driver class 'com.microsoft.sqlserver.jdbc.SQLServerDriver'
	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:361)
	at com.inductiveautomation.ignition.gateway.datasource.DatasourceImpl.runTest(DatasourceImpl.java:313)
	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: com.microsoft.sqlserver.jdbc.SQLServerDriver
	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:361)
	at com.inductiveautomation.ignition.gateway.datasource.DatasourceImpl.runTest(DatasourceImpl.java:313)
	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)

Do you have the MSSQL JDBC driver module (they're new to 8.3) installed? You either need that or to manually add an MSSQL driver jar. The installation/upgrade process should have installed the module for you automatically.

1 Like

Yes, the module is installed and showing active.

Is this the first gateway start since upgrade? Tried restarting yet?

I have not restarted the server, is that what you're asking? I did just update the gateway a few hours ago.

In addition to Kevin's question, does any of the underlying DB related config (database drivers, translators, etc) show as 'disabled' in the web UI?

Try restarting just the gateway, first.

You may also need support to take a look at this point.

1 Like

Restarting the gateway was the trick!

1 Like

I just went through an upgrade from 8.1 to 8.3, and I had an error with my MSSQL server drivers as well: “Error - either required files are missing or classname is incorrect”. Gateway restarts did not fix the issue for me, as I was missing jar files.

I had to follow this article JDBC Drivers and Translators | Ignition User Manual and download the mssql-jdbc-13.2.1.jre11.jar file from Microsoft Download - JDBC Driver for SQL Server | Microsoft Learn. Then I uploaded the jar file to 8.3 under Connections > Databases > Settings.

After that, my databases connections were still faulted with the new driver giving me this error:

“Cannot create PoolableConnectionFactory ("encrypt" property is set to "true" and "trustServerCertificate" property is set to "false" but the driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption: Error: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target.”

Then I looked at this other article Connecting to Microsoft SQL Server Express | Ignition User Manual. I had to add a parameter to the “Extra Connection Properties” field and separate with a semicolon under each connection like:

trustServerCertificate=true; databaseName=yourDB

That ended up doing the trick.

1 Like