0

Can you please help with this:

I start my application but it is closing down after few seconds error below:

2018-09-21 17:34:59,500  INFO | main | com.zaxxer.hikari.HikariDataSource                        93 | springHikariCP - is starting. | 
        2018-09-21 17:35:29,535  INFO | main | com.zaxxer.hikari.pool.HikariPool                        213 | springHikariCP - is closing down. | 
        2018-09-21 17:35:29,855  WARN | main | o.s.context.support.ClassPathXmlApplicationContext       551 | Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'appEntityManagerFactory' defined in class path resource [META-INF/spring/app.repositories.xml]: Invocation of init method failed; nested exception is com.zaxxer.hikari.pool.HikariPool$PoolInitializationException: Exception during pool initialization: springHikariCP - Connection is not available, request timed out after 30002ms. | 
        2018-09-21 17:35:29,870 ERROR | main | com.my.jos.jmx.Driver                            72 | CRITICAL ERROR: Error encountered starting application. | 
        org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'appEntityManagerFactory' defined in class path resource [META-INF/spring/app.repositories.xml]: Invocation of init method failed; nested exception is com.zaxxer.hikari.pool.HikariPool$PoolInitializationException: Exception during pool initialization: springHikariCP - Connection is not available, request timed out after 30002ms.
RMati
  • 858
  • 7
  • 9

1 Answers1

0

If you don't need to use HikariCP you may check your POM and consider removing it if it's defined already.

Also you can make sure of using the following dependency:

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>

Assuming you are using xml configuration, you can make sure of the setting datasource properly:

How to Define a MySql datasource bean via XML in Spring

vakses
  • 21
  • 9