今日测试Pentaho ,用的是MSSQL
Pentaho Kettle 连接MSSQL 数据库报错,数据库JDBC 驱动安装正确的情况下
报 ConectionServicelmpl.ERROR_0009-到数据库的连接失败。
分析下原因:
日志位置:/tomcat/logs
ERROR [org.pentaho.platform.dataaccess.datasource.wizard.service.impl.ConnectionServiceImpl] ::: ConnectFactory.ERROR_0001 – 无法与 com.microsoft.sqlserver.jdbc.SQLServerDriver jdbc:sqlserver://localhost:1433;databaseName=FANBI;integratedSecurity=false 建立数据库连接
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: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target. ClientConnectionId:c3cc3aa8-b21b-4f5a-bc39-4888464f8091
at com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.java:4026) ~[mssql-jdbc-12.4.0.jre8.jar:?]
at com.microsoft.sqlserver.jdbc.TDSChannel.enableSSL(IOBuffer.java:1954) ~[mssql-jdbc-12.4.0.jre8.jar:?]
分析是连接安全性的问题
正好它的数据连接里有个选项,配置 encrypt 值为 false 就可以通过测试了。