Код: Выделить всё
public class iSeriesDatabaseDao {
@Autowired
private JdbcTemplate jdbcTemplate;
public String getPhoneNumber(String number)
throws SSOServiceException {
try {
String sqlString = String.join(" ",
"SELECT phone AS SPECIALITY, (wrkph1 CONCAT wrkph2 CONCAT wrkph3) AS PHONE FROM PRVMAS where PROVNO = '%s'");
String getPhone = String.format(sqlString,number);
return String.valueOf(jdbcTemplate.queryForList(getPhone));
} catch (Exception e) {
throw new SSOServiceException("Error in the query the
configuration table: " + e.getMessage());
}
}
Код: Выделить всё
Код: Выделить всё
Код: Выделить всё
spring.datasource.jndi-name=jdbc/PostgresSQLDataSource
spring.datasource.jndi-name-iSeries=jdbc/iSeriesDataSource
Код: Выделить всё
[ERROR ] Connection error:
SSL error: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
[ERROR ] Failed to create a ConnectionPoolDataSource from PostgreSQL JDBC Driver 42.1.4 for user_xxx at jdbc:postgresql://Dev.xxx.com:3306/xxx?prepareThreshold=5&preparedStatementCacheQueries=256&preparedStatementCacheSizeMiB=5&databaseMetadataCacheFields=65536&databaseMetadataCacheFieldsMiB=5&defaultRowFetchSize=0&binaryTransfer=true&readOnly=false&binaryTransferEnable=&binaryTransferDisable=&unknownLength=2147483647&logUnclosedConnections=false&disableColumnSanitiser=false&ssl=true&tcpKeepAlive=false&loginTimeout=0&connectTimeout=10&socketTimeout=0&cancelSignalTimeout=10&receiveBufferSize=-1&sendBufferSize=-1&ApplicationName=PostgreSQL JDBC Driver&useSpnego=false&gsslib=auto&sspiServiceClass=POSTGRES&allowEncodingChanges=false&targetServerType=any&loadBalanceHosts=false&hostRecheckSeconds=10&preferQueryMode=extended&autosave=never&reWriteBatchedInserts=false: org.postgresql.util.PSQLException: SSL error: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at org.postgresql.ssl.MakeSSL.convert(MakeSSL.java:67)
at org.postgresql.core.v3.ConnectionFactoryImpl.enableSSL(ConnectionFactoryImpl.java:359)
at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:148)
at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:49)
at org.postgresql.jdbc.PgConnection.(PgConnection.java:194)
at org.postgresql.Driver.makeConnection(Driver.java:450)
Подробнее здесь: https://stackoverflow.com/questions/785 ... bctemplate
Мобильная версия