OH3 com.mysql.jdbc.Driver deprecated

Platform: Linux

I’m seeing the following error on startup after migration from OH2 to OH3 is this an issue or normal?
in openhab.log
Registered driver with driverClassName=com.mysql.jdbc.Driver was not found, trying direct instantiation.
and system log

karaf[117921]: Loading class com.mysql.jdbc.Driver’. This is deprecated. The new driver class is com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.

also found this on startup which looks related:

Dec 31 11:05:54 mythbox karaf[118801]: Thu Dec 31 11:05:54 AEDT 2020 WARN: Caught while disconnecting…
Dec 31 11:05:54 mythbox karaf[118801]: EXCEPTION STACK TRACE:
Dec 31 11:05:54 mythbox karaf[118801]: ** BEGIN NESTED EXCEPTION **
Dec 31 11:05:54 mythbox karaf[118801]: javax.net.ssl.SSLException
Dec 31 11:05:54 mythbox karaf[118801]: MESSAGE: closing inbound before receiving peer’s close_notify
Dec 31 11:05:54 mythbox karaf[118801]: STACKTRACE:
Dec 31 11:05:54 mythbox karaf[118801]: javax.net.ssl.SSLException: closing inbound before receiving peer’s close_notify
Dec 31 11:05:54 mythbox karaf[118801]: #011at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:133)
Dec 31 11:05:54 mythbox karaf[118801]: #011at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:117)
Dec 31 11:05:54 mythbox karaf[118801]: #011at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:337)
Dec 31 11:05:54 mythbox karaf[118801]: #011at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:293)
Dec 31 11:05:54 mythbox karaf[118801]: #011at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:284)
Dec 31 11:05:54 mythbox karaf[118801]: #011at java.base/sun.security.ssl.SSLSocketImpl.shutdownInput(SSLSocketImpl.java:742)
Dec 31 11:05:54 mythbox karaf[118801]: #011at java.base/sun.security.ssl.SSLSocketImpl.shutdownInput(SSLSocketImpl.java:721)
Dec 31 11:05:54 mythbox karaf[118801]: #011at com.mysql.cj.protocol.a.NativeProtocol.quit(NativeProtocol.java:1312)
Dec 31 11:05:54 mythbox karaf[118801]: #011at com.mysql.cj.NativeSession.quit(NativeSession.java:182)
Dec 31 11:05:54 mythbox karaf[118801]: #011at com.mysql.cj.jdbc.ConnectionImpl.realClose(ConnectionImpl.java:1750)
Dec 31 11:05:54 mythbox karaf[118801]: #011at com.mysql.cj.jdbc.ConnectionImpl.close(ConnectionImpl.java:720)
Dec 31 11:05:54 mythbox karaf[118801]: #011at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:506)
Dec 31 11:05:54 mythbox karaf[118801]: #011at com.zaxxer.hikari.pool.HikariPool.(HikariPool.java:118)
Dec 31 11:05:54 mythbox karaf[118801]: #011at com.zaxxer.hikari.HikariDataSource.(HikariDataSource.java:71)
Dec 31 11:05:54 mythbox karaf[118801]: #011at org.knowm.yank.YankPoolManager.createPool(YankPoolManager.java:101)
Dec 31 11:05:54 mythbox karaf[118801]: #011at org.knowm.yank.YankPoolManager.addDefaultConnectionPool(YankPoolManager.java:69)
Dec 31 11:05:54 mythbox karaf[118801]: #011at org.knowm.yank.Yank.setupDefaultConnectionPool(Yank.java:705)
Dec 31 11:05:54 mythbox karaf[118801]: #011at org.openhab.persistence.jdbc.internal.JdbcMapper.openConnection(JdbcMapper.java:179)
Dec 31 11:05:54 mythbox karaf[118801]: #011at org.openhab.persistence.jdbc.internal.JdbcMapper.pingDB(JdbcMapper.java:57)
Dec 31 11:05:54 mythbox karaf[118801]: #011at org.openhab.persistence.jdbc.internal.JdbcMapper.checkDBAccessability(JdbcMapper.java:203)
Dec 31 11:05:54 mythbox karaf[118801]: #011at org.openhab.persistence.jdbc.internal.JdbcPersistenceService.updateConfig(JdbcPersistenceService.java:216)
Dec 31 11:05:54 mythbox karaf[118801]: #011at org.openhab.persistence.jdbc.internal.JdbcPersistenceService.activate(JdbcPersistenceService.java:80)
Dec 31 11:05:54 mythbox karaf[118801]: #011at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Dec 31 11:05:54 mythbox karaf[118801]: #011at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
Dec 31 11:05:54 mythbox karaf[118801]: #011at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

I found some similar messages which where resolved by disabling SSL on connection string
eg
url=jdbc:mysql://localhost:3306/OpenHAB?useSSL=false

this solves part of this issue with the exemption stack no longer appears.
however the deprecated driver still exists…

1 Like