I am trying to connect to db2 using spring jdbc template. Everything is working fine when deployed on tomcat server. But the same application when I am trying to deploy on WAS server is not working and giving me the below exception.
com.ibm.db2.jcc.am.DisconnectNonTransientConnectionException: [jcc][t4][2030][11211][3.69.66] 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: Received fatal alert: handshake_failure. ERRORCODE=-4499, SQLSTATE=08001
My datasource bean configuration is given below
@Bean
public DataSource dataSource() {
DriverManagerDataSource dataSource=new DriverManagerDataSource();
dataSource.setDriverClassName("com.ibm.db2.jcc.DB2Driver");
dataSource.setUrl("url");
dataSource.setUsername("username");
dataSource.setPassword("password");
Properties connectionProperties=new Properties();
connectionProperties.setProperty("sslConnection", "true");
connectionProperties.setProperty("sslTrustStoreLocation", "pathToFile");
connectionProperties.setProperty("sslTrustStorePassword", "pass");
dataSource.setConnectionProperties(connectionProperties);
return dataSource;
}