Connect to SQL Database using DatabaseConnector

0
Can someone please verify the jdbc string and the jar files needed to connect to a SQL Server 2016 Db using Mendix version 10.4.1? I put a few versions but I'm not sure if that is causing the problem. I had just one version and it didn't work. I am not sure if I have too many or maybe not even the correct ones.   Here's my jdbc url string:      jdbc:sqlserver://localhost:1433;databaseName=POLOG;encrypt=true;trustServerCertificate=false   ---------------------------------------- Here are the jdbc files I have in userLib folder:     a. mssql-jdbc-12.4.2.jre8.jar     b.  mssql-jdbc-12.4.2.jre8-javadoc.jar     c. mssql-jdbc-12.4.2.jre8-sources.jar     d. mssql-jdbc-12.4.2.jre11.jar     e. mssql-jdbc-12.4.2.jre11-javadoc.jar     f. mssql-jdbc-12.4.2.jre11-sources.jar     g. sqljdbc42.jar     h. sqljdbc41.jar     i. mssql-jdbc-12.2.0.jre8.jar     j. mssql-jdbc-12.2.0.jre11.jar   ------------------------ Error: An error has occurred while handling the request. [User 'Anonymous_2aba920c-72c4-4523-956e-5ef63664274b' with session id 'b0a26247-XXXX-XXXX-XXXX-XXXXXXXXc71e' and roles 'Administrator'] -------- com.mendix.webui.WebUIException: Exception while retrieving data for 'MyFirstModule.Home_Web.listView1' on document 'MyFirstModule.Home_Web'    at com.mendix.webui.actions.client.RetrieveAction.$anonfun$apply$3(RetrieveAction.scala:96) Caused by: com.mendix.modules.microflowengine.MicroflowException: com.mendix.systemwideinterfaces.MendixRuntimeException: com.microsoft.sqlserver.jdbc.SQLServerException: "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. ClientConnectionId:b707b291-61fc-4b1e-8078-530329db81d2    at MyFirstModule.purchase_orders_show (JavaAction : 'Execute query') Advanced stacktrace:    at com.mendix.modules.microflowengine.MicroflowUtil.processException(MicroflowUtil.java:83) Caused by: com.mendix.core.CoreRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: com.microsoft.sqlserver.jdbc.SQLServerException: "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. ClientConnectionId:b707b291-61fc-4b1e-8078-530329db81d2    at com.mendix.basis.actionmanagement.ActionManager.executeSync(ActionManager.scala:108) Caused by: com.mendix.systemwideinterfaces.MendixRuntimeException: com.microsoft.sqlserver.jdbc.SQLServerException: "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. ClientConnectionId:b707b291-61fc-4b1e-8078-530329db81d2    at com.mendix.util.classloading.Runner$.withContextClassLoader(Runner.scala:23) Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: "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. ClientConnectionId:b707b291-61fc-4b1e-8078-530329db81d2    at com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.java:4026) Caused by: javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target    at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:131) Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target    at java.base/sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:439)    Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target    
asked
1 answers
0

Please try with latest version of Studio pro it will automatically include the required jar files

answered