title: Spring boot JPA application NOT working with HikariCP configuration
body: <p>We have configured our spring boot(v1.5.1)-jpa application to point to HikariCP but still due to some weird reason the application is still pointing to tomcat-jdbc pool, the default used by spring-boot instead of Hikari-CP.
  I have mentioned the configuration used below. </p>
  
  <p><strong>Updates</strong><br/>
  After making changes now when the HikariCP is trying to load we are getting the SQLNotSupportedFeature Exception. 
  Do note that we are using Springboot-JPA-Hibernate combination along with hikari.</p>
  
  <p>Any help is appreciated. </p>
  
  <p><strong>Gradle</strong></p>
  
  <pre><code>    // https://mvnrepository.com/artifact/com.zaxxer/HikariCP
      compile group: 'com.zaxxer', name: 'HikariCP', version: '2.3.2'
  
      // Exclusions
      compile('org.springframework.boot:spring-boot-starter-web'){
      exclude module: "spring-boot-starter-tomcat"
      }
      compile('org.springframework.boot:spring-boot-starter-data-jpa') {
      exclude module: "spring-boot-starter-tomcat"
      }
      compile("org.springframework.boot:spring-boot-starter-jdbc") {
      exclude module: "spring-boot-starter-tomcat"
      }
      //spring integration
      compile("org.springframework.boot:spring-boot-starter-integration"){
      exclude module: "spring-boot-starter-tomcat"
      }  
  </code></pre>
  
  <p><strong>application.properties</strong></p>
  
  <pre><code>hibernate.show.sql=true
  spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.Oracle10gDialect
  spring.datasource.hikari.maximum-pool-size=50
  spring.datasource.hikari.idle-timeout=1000
  spring.datasource.hikari.pool-name=pooool
  spring.datasource.type=com.zaxxer.hikari.HikariDataSource
  
  spring.datasource.url=jdbc:oracle:thin:@&lt;hostname&gt;:1521/&lt;instance&gt;
  spring.datasource.username=&lt;user&gt;
  spring.datasource.password=&lt;password&gt;
  spring.datasource.driver-class-name=oracle.jdbc.driver.OracleDriver
  </code></pre>
  
  <p><strong>Dataconfiguration</strong></p>
  
  <p>We are using Spring JPA hibernate combination for configuration along with PCF (Pivotal Cloud Foundry).</p>
  
  <pre><code>        public class DataSourceConfiguration {
  
              @Value("${spring.datasource.hikari.maximum-pool-size}")
              private int maxSize;
  
              @Value("${spring.datasource.hikari.idle-timeout}")
              private String idleTimeout;
  
              @Value("${spring.datasource.username}")
              private String username;
  
              @Value("${spring.datasource.password}")
              private String password;
  
              @Value("${spring.datasource.url}")
              private String url;
  
              @Value("${spring.datasource.driver-class-name}")
              private String driverClassName;
  
              @Bean("destroyMethod=close")
              @Primary
              public DataSource dataSource() {
                  HikariDataSource dataSource = new HikariDataSource();
                  dataSource.setUrl(url);
                  dataSource.setPassword(password);
                  dataSource.setUsername(username);
                  dataSource.setDriverClassName(driverClassName);
                  dataSource.setValidationQuery(idleTimeout);
                  dataSource.setMaxIdle(maxSize);
                  return dataSource;
              }
  
              @Bean
              public LocalContainerEntityManagerFactoryBean entityManagerFactory(DataSource dataSource) {
                  System.err.println("POOLSIZE----&gt; " +dataSource.getPoolSize());
                  System.err.println("POOLNAME----&gt; " +dataSource.getName());
                      LocalContainerEntityManagerFactoryBean entityManagerFactoryBean = new LocalContainerEntityManagerFactoryBean();
                      entityManagerFactoryBean.setDataSource(dataSource);
                      entityManagerFactoryBean.setJpaVendorAdapter(new HibernateJpaVendorAdapter());
                      entityManagerFactoryBean.setPackagesToScan(applicationPropertiesConfig.getPackagestoScan());
  
                      Properties jpaProperties = new Properties();
                      jpaProperties.put("hibernate.dialect", applicationPropertiesConfig.getHibernateDialect());
                      jpaProperties.put("hibernate.show_sql", applicationPropertiesConfig.getHibernateShowSQL());
                      entityManagerFactoryBean.setJpaProperties(jpaProperties);
                      return entityManagerFactoryBean;
              }
  
              /**
               * Declaration of the transaction manager.
               *
               * @param entityManagerFactory the entity manager factory
               * @return an instance of JpaTransactionManager
               */
              @Bean
              JpaTransactionManager transactionManager(EntityManagerFactory entityManagerFactory) {
                      JpaTransactionManager transactionManager = new JpaTransactionManager();
                      transactionManager.setEntityManagerFactory(entityManagerFactory);
                      return transactionManager;
              }
  </code></pre>
  
  <p>Please help as this is blocking our application and is frustrating. 
  Thanks in advance.</p>