Unable to Deploy Spring Boot 2 Application Due to Hikaripool Exception During Pool Initialization

HikariPool-1 - Exception during pool initialization

Welcome to Java World. Try to understand the error as most of the time Error says it self what is wrong. In your Case as in below pic you can see it clearly mentions
database test2 doesn't exist. Error

Springboot -Include JPA dependency and run mvn clean install fails with HikariPool-1 - Exception during pool initialization

I can show you my configuration which works for me it checked few minutes before, only difference is oracle driver.

spring-boot v.2.0.1.RELEASE

pom.xml

<dependency>
<groupId>oracle</groupId>
<artifactId>ojdbc6</artifactId>
<version>11.2.0.1</version>
</dependency>

OracleConfiguration

@Configuration
@ConfigurationProperties
public class OracleConfiguration {

private static Logger log = LoggerFactory.getLogger(OracleConfiguration.class);

@Value("${oracle.username}")
private String username;
@Value("${oracle.password}")
private String password;
@Value("${oracle.url}")
private String url;

@Bean
DataSource dataSource() throws SQLException{
log.info("Init production profile for OracleConfiguration");
OracleDataSource dataSource = new OracleDataSource();
dataSource.setUser(username);
dataSource.setPassword(password);
dataSource.setURL(url);
dataSource.setImplicitCachingEnabled(true);
dataSource.setFastConnectionFailoverEnabled(true);
return dataSource;
}
}

application.properties

oracle.username=username
oracle.password=password
oracle.url=jdbc:oracle:thin:@//db.yourdomain.com:1524/DB
spring.datasource.driver-class-name=oracle.jdbc.OracleDriver
spring.jpa.database-platform=org.hibernate.dialect.Oracle10gDialect

You can check this answer https://stackoverflow.com/a/12574926/1063509

  • The database isn't running
  • You got the URL wrong
  • There is a firewall in the way.


Related Topics



Leave a reply



Submit