title: com.zaxxer.hikari.pool.HikariPool$PoolInitializationException: Failed to initialize pool when trying to setup HikraCP with Redshift
body: <p>I'm trying to setup a JDBC Connection Pool using HikariCP with AWS Redshift like this:</p>
  
  <pre><code>public class RedshiftConnector {
  
  private static HikariDataSource dataSource;
  private static int poolSize = 5;
  
  public static void init() throws SQLException {
  
      dataSource = new HikariDataSource();
      dataSource.setDataSource(new com.amazon.redshift.jdbc42.DataSource());
      dataSource.setJdbcUrl(Parameters.REDSHIFT_DB_URL);
      dataSource.setUsername(Parameters.REDSHIFT_DB_USERNAME);
      dataSource.setPassword(Parameters.REDSHIFT_DB_PASSWORD);
      dataSource.setLogWriter(new PrintWriter(System.out));
      dataSource.setMaximumPoolSize(poolSize);
  }
  
  public static synchronized Connection getConnection() {
      return dataSource.getConnection();
  }
  
  public static void close() {
      dataSource.close();
  }
  }
  </code></pre>
  
  <p>I have added the JAR for Redshift Driver on the classpath!</p>
  
  <p>Now the problem is when I call <code>RedshiftConnector.getConnection()</code> I get the following error:</p>
  
  <pre><code>[com.zaxxer.hikari.pool.HikariPool$PoolInitializationException: Failed to initialize pool: Error creating Driver, Driver class name incorrect.] with root cause
   java.lang.ClassCastException: com.amazon.redshift.jdbc42.Driver cannot be cast to com.amazon.dsi.core.interfaces.IDriver
      at com.amazon.dsi.core.impl.DSIDriverFactory.createDriver(Unknown Source)
      at com.amazon.jdbc.common.AbstractDataSource.doInitialize(Unknown Source)
      at com.amazon.jdbc.common.AbstractDataSource.getSimbaConnection(Unknown Source)
      at com.amazon.jdbc.common.AbstractDataSource.getConnection(Unknown Source)
      at com.amazon.jdbc.common.AbstractDataSource.getConnection(Unknown Source)
      at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:316)
      at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:506)
      at com.zaxxer.hikari.pool.HikariPool.&lt;init&gt;(HikariPool.java:118)
      at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:94)
  </code></pre>
  
  <p>Thanks</p>