How to use liquibase cmd with db2 ssl connection?

liquibase --driver="com.ibm.db2.jcc.DB2Driver" --changeLogFile="masterchangelog.xml " --url="jdbc:db2://localhost:60001/SMDINTDB:retrieveMessageFromServerOnGetMessage=true;sslConnection=true;" --username="" --password="" --classpath=/home/db2inst1/sqllib/java/db2jcc4.jar validate

Unexpected error running Liquibase: com.ibm.db2.jcc.am.DisconnectNonTransientConnectionException: [jcc][t4][2030][11211][4.26.14] A communication error occurred during operations on the connection's underlying socket, socket input stream, or socket output stream. Error location: Reply.fill() - socketInputStream.read (-1). Message: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target. ERRORCODE=-4499, SQLSTATE=08001

I’m having a similar issue, but when using a SQL Server JDBC connection:

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”.

I use the same driver jar file for other tools, like JetBrains Datagrip and DbVisualizer, and those tools do not have this issue. It appears to have this problem with “mssql-jdbc-9.2.1.jre8.jar” and also with “mssql-jdbc-9.4.0.jre8.jar”. I’ve not tried others yet.

Hello @smcintosh were you able to resolve this? I too am facing the issue with SQL Server.