Database not working after upgrading to 8.1 from 7.9

I am using the same connections for my database as before but 8.1 won’t connect. Here is the error report. I tried creating a JTDS as a connection (saw this in the forum) but it did not help. All my settings are exactly the same as before and I even backed up the old and restored to the new version.

java.sql.SQLException: Cannot create PoolableConnectionFactory (java.lang.ClassCastException: class java.math.BigInteger cannot be cast to class java.lang.Long (java.math.BigInteger and java.lang.Long are in module java.base of loader ‘bootstrap’))
at org.apache.commons.dbcp2.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:656)
at org.apache.commons.dbcp2.BasicDataSource.createDataSource(BasicDataSource.java:534)
at org.apache.commons.dbcp2.BasicDataSource.getConnection(BasicDataSource.java:734)
at com.inductiveautomation.ignition.gateway.datasource.DatasourceImpl.getConnectionInternal(DatasourceImpl.java:299)
at com.inductiveautomation.ignition.gateway.datasource.DatasourceImpl.runTest(DatasourceImpl.java:252)
at com.inductiveautomation.ignition.gateway.datasource.DatasourceManagerImpl$FaultedDatasourceRetryer.lambda$newRetryRunnable$0(DatasourceManagerImpl.java:1096)
at com.inductiveautomation.ignition.common.execution.impl.BasicExecutionEngine$TrackedTask.run(BasicExecutionEngine.java:582)
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.sql.SQLException: java.lang.ClassCastException: class java.math.BigInteger cannot be cast to class java.lang.Long (java.math.BigInteger and java.lang.Long are in module java.base of loader ‘bootstrap’)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1074)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:988)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:974)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:919)
at com.mysql.jdbc.ConnectionImpl.buildCollationMapping(ConnectionImpl.java:1062)
at com.mysql.jdbc.ConnectionImpl.initializePropsFromServer(ConnectionImpl.java:3556)
at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2513)
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2283)
at com.mysql.jdbc.ConnectionImpl.(ConnectionImpl.java:822)
at com.mysql.jdbc.JDBC4Connection.(JDBC4Connection.java:47)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.base/java.lang.reflect.Constructor.newInstance(Unknown Source)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:404)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:317)
at org.apache.commons.dbcp2.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:52)
at org.apache.commons.dbcp2.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:357)
at org.apache.commons.dbcp2.BasicDataSource.validateConnectionFactory(BasicDataSource.java:103)
at org.apache.commons.dbcp2.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:652)
… 12 more
Caused by: java.lang.ClassCastException: class java.math.BigInteger cannot be cast to class java.lang.Long (java.math.BigInteger and java.lang.Long are in module java.base of loader ‘bootstrap’)
at com.mysql.jdbc.ConnectionImpl.buildCollationMapping(ConnectionImpl.java:1007)
… 28 more

8.1.13 (b2021122109)
Azul Systems, Inc. 11.0.13

Make sure to follow the steps above and it is better to create another user login and try again if you haven’t done that already.

Same machine. Same configuration. I am working with them on my laptop.

I even went back to the university instructions twice to verify I wasn’t missing something even though it was working before.

What database are you using? MySQL?

Yes with the MySQL ConnectorJ same as before.

Try making a new connection with MariaDB as the JBDC driver.

I do not have that one how do i set it up and can you show screen shots if possible.

It should come out of the box with Ignition 8.1 In your gateway → Config page → Databse → Conenctions → Create new Database Connection and you should see this

Select MariaDB, enter your db credentials and see how that goes.

You can try remaking with the MyQL driver if you haven’t already, but if that doesn’t work try again with the MariaDB driver.

It did not come with the 8.1 version. Not with the install i downloaded from Ignition today. 8.1.13 for windows x64.

My fault I thought it did. Here’s a tutorial - Installing MariaDB - Connecting to Databases

I use MySQL and ended up needing to use it for the connection to work right.

So let me add more info that might help apparently. I am using windows 7 and Maria won’t work on anything but Windows 10. So will 8.1 even work correctly on Windows 7?

What version of MySQL are you using?

8.0.28

You need to manually update the JDBC driver.

For backwards compatibility reasons, Ignition ‘trusts’ the JDBC drivers contained in a gateway backup over the ones installed on the system, even if the ones on the system might be newer. We cannot bundle MySQL’s JDBC driver directly, but a fresh install of 8.1.X that has not had a .gwbk restored should have a newer version of the MariaDB driver file available, or you can download it yourself. MariaDB’s driver should be compatible with your MySQL version and a drop-in replacement.

https://docs.inductiveautomation.com/display/DOC81/JDBC+Drivers+and+Translators#JDBCDriversandTranslators-JDBCDriversandIgnitionUpgrades

I have windows 7 and Maria doesn’t like anything less than 10 when I try to install it.

You don’t need to install MariaDB. You need a copy of the MariaDB (or MySQL) JDBC driver.

https://dev.mysql.com/downloads/connector/j/

1 Like

Do you have a screenshot of the connection setup?

Follow the steps here:
https://docs.inductiveautomation.com/display/DOC81/JDBC+Drivers+and+Translators#JDBCDriversandTranslators-UpgradeaJDBCDriver

Or get in contact with support, they can help guide you through the process.

I have been to this website and downloaded the .msi file but it won’t install because of windows 7. There is a link to get .jar files but it directs you to a .msi file.