HikariPool-1 - Exception during pool initialization , Unknown database 'cafemanagementsystem;' - mysql

When I run the code, It gives the above-mentioned error. Even though it indicates an error, the code is running in the terminal without terminating.
It shows that "Unknown database 'cafemanagementsystem;'" . Therefore, I checked with my database also. It has been properly created.
Below you can see my application.properties file code
spring.datasource.url=jdbc:mysql://localhost:3306/cafemanagementsystem;
spring.datasource.username=root
spring.datasource.password=
spring.jpa.hibernate.ddl-auto=none
spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL8Dialect
spring.jpa.properties.hibernate.format_sql=true
Another thing is,
When I changed this line (which is in the application.properties file) like this spring.jpa.hibernate.ddl-auto=update execution is terminated.
Exception that I have recieved,
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.7.3)
2022-09-21 08:56:03.228 INFO 7364 --- [ main]
C.CafeManagementSystemBackendApplication : Starting
CafeManagementSystemBackendApplication using Java 1.8.0_281 on LAPTOP-9934KKKF with PID 7364 (E:\L3\L3S1\E\EAD\Practicals\Cafe-Management-System\Cafe_Management_System_Backend\target\classes started by Acer in E:\L3\L3S1\E\EAD\Practicals\Cafe-Management-System\Cafe_Management_System_Backend)
2022-09-21 08:56:03.234 INFO 7364 --- [ main] C.CafeManagementSystemBackendApplication : No active profile set, falling back to 1 default profile: "default"
2022-09-21 08:56:03.898 INFO 7364 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode.
2022-09-21 08:56:03.910 INFO 7364 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 4 ms. Found 0 JPA repository interfaces.
2022-09-21 08:56:04.291 INFO 7364 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http)
2022-09-21 08:56:04.304 INFO 7364 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2022-09-21 08:56:04.304 INFO 7364 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.65]
2022-09-21 08:56:04.433 INFO 7364 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2022-09-21 08:56:04.434 INFO 7364 --- [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 1140 ms
2022-09-21 08:56:04.550 INFO 7364 --- [ main] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [name: default]
2022-09-21 08:56:04.589 INFO 7364 --- [ main] org.hibernate.Version : HHH000412: Hibernate ORM core version 5.6.10.Final
2022-09-21 08:56:04.709 INFO 7364 --- [ main] o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations {5.1.2.Final}
2022-09-21 08:56:04.783 INFO 7364 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
2022-09-21 08:56:06.257 ERROR 7364 --- [ main] com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - Exception during pool initialization.
java.sql.SQLSyntaxErrorException: Unknown database 'cafemanagementsystem;'
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120) ~[mysql-connector-java-8.0.30.jar:8.0.30]
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122) ~[mysql-connector-java-8.0.30.jar:8.0.30]
at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:828) ~[mysql-connector-java-8.0.30.jar:8.0.30]
at com.mysql.cj.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:448) ~[mysql-connector-java-8.0.30.jar:8.0.30]
at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:241) ~[mysql-connector-java-8.0.30.jar:8.0.30]
at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:198) ~[mysql-connector-java-8.0.30.jar:8.0.30]
at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:138) ~[HikariCP-4.0.3.jar:na]
at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:364) ~[HikariCP-4.0.3.jar:na]
at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:206) ~[HikariCP-4.0.3.jar:na]
at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:476) [HikariCP-4.0.3.jar:na]
at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:561) [HikariCP-4.0.3.jar:na]
at com.zaxxer.hikari.pool.HikariPool.<init>(HikariPool.java:115) [HikariCP-4.0.3.jar:na]
at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:112) [HikariCP-4.0.3.jar:na]
at org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl.getConnection(DatasourceConnectionProviderImpl.java:122) [hibernate-core-5.6.10.Final.jar:5.6.10.Final]
at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator$ConnectionProviderJdbcConnectionAccess.obtainConnection(JdbcEnvironmentInitiator.java:181) [hibernate-core-5.6.10.Final.jar:5.6.10.Final]
at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:68) [hibernate-core-5.6.10.Final.jar:5.6.10.Final]
at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:35) [hibernate-core-5.6.10.Final.jar:5.6.10.Final]
at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:101) [hibernate-core-5.6.10.Final.jar:5.6.10.Final]
at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:263) [hibernate-core-5.6.10.Final.jar:5.6.10.Final]
at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:237) [hibernate-core-5.6.10.Final.jar:5.6.10.Final]
at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:214) [hibernate-core-5.6.10.Final.jar:5.6.10.Final]
at org.hibernate.id.factory.internal.DefaultIdentifierGeneratorFactory.injectServices(DefaultIdentifierGeneratorFactory.java:175) [hibernate-core-5.6.10.Final.jar:5.6.10.Final]
at org.hibernate.service.internal.AbstractServiceRegistryImpl.injectDependencies(AbstractServiceRegistryImpl.java:286) [hibernate-core-5.6.10.Final.jar:5.6.10.Final]
at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:243) [hibernate-core-5.6.10.Final.jar:5.6.10.Final]
at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:214) [hibernate-core-5.6.10.Final.jar:5.6.10.Final]
at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.<init>(InFlightMetadataCollectorImpl.java:173) [hibernate-core-5.6.10.Final.jar:5.6.10.Final]
at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:127) [hibernate-core-5.6.10.Final.jar:5.6.10.Final]
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.metadata(EntityManagerFactoryBuilderImpl.java:1460) [hibernate-core-5.6.10.Final.jar:5.6.10.Final]
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:1494) [hibernate-core-5.6.10.Final.jar:5.6.10.Final]
at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateJpaPersistenceProvider.java:58) [spring-orm-5.3.22.jar:5.3.22]
at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:365) [spring-orm-5.3.22.jar:5.3.22]
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:409) [spring-orm-5.3.22.jar:5.3.22]
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:396) [spring-orm-5.3.22.jar:5.3.22]
at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.afterPropertiesSet(LocalContainerEntityManagerFactoryBean.java:341) [spring-orm-5.3.22.jar:5.3.22]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1863) [spring-beans-5.3.22.jar:5.3.22]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1800) [spring-beans-5.3.22.jar:5.3.22]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:620) [spring-beans-5.3.22.jar:5.3.22]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) [spring-beans-5.3.22.jar:5.3.22]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) [spring-beans-5.3.22.jar:5.3.22]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.22.jar:5.3.22]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) [spring-beans-5.3.22.jar:5.3.22]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) [spring-beans-5.3.22.jar:5.3.22]
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1154) ~[spring-context-5.3.22.jar:5.3.22]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:908) ~[spring-context-5.3.22.jar:5.3.22]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583) ~[spring-context-5.3.22.jar:5.3.22]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:147) ~[spring-boot-2.7.3.jar:2.7.3]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:734) ~[spring-boot-2.7.3.jar:2.7.3]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:408) ~[spring-boot-2.7.3.jar:2.7.3]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:308) ~[spring-boot-2.7.3.jar:2.7.3]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1306) ~[spring-boot-2.7.3.jar:2.7.3]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1295) ~[spring-boot-2.7.3.jar:2.7.3]
at com.example.CafeManagementSystemBackend.CafeManagementSystemBackendApplication.main(CafeManagementSystemBackendApplication.java:10) ~[classes/:na]
2022-09-21 08:56:06.262 WARN 7364 --- [ main] o.h.e.j.e.i.JdbcEnvironmentInitiator : HHH000342: Could not obtain connection to query metadata
java.sql.SQLSyntaxErrorException: Unknown database 'cafemanagementsystem;'
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120) ~[mysql-connector-java-8.0.30.jar:8.0.30]
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122) ~[mysql-connector-java-8.0.30.jar:8.0.30]
at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:828) ~[mysql-connector-java-8.0.30.jar:8.0.30]
at com.mysql.cj.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:448) ~[mysql-connector-java-8.0.30.jar:8.0.30]
at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:241) ~[mysql-connector-java-8.0.30.jar:8.0.30]
at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:198) ~[mysql-connector-java-8.0.30.jar:8.0.30]
at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:138) ~[HikariCP-4.0.3.jar:na]
at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:364) ~[HikariCP-4.0.3.jar:na]
at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:206) ~[HikariCP-4.0.3.jar:na]
at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:476) ~[HikariCP-4.0.3.jar:na]
at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:561) ~[HikariCP-4.0.3.jar:na]
at com.zaxxer.hikari.pool.HikariPool.<init>(HikariPool.java:115) ~[HikariCP-4.0.3.jar:na]
at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:112) ~[HikariCP-4.0.3.jar:na]
at org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl.getConnection(DatasourceConnectionProviderImpl.java:122) ~[hibernate-core-5.6.10.Final.jar:5.6.10.Final]
at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator$ConnectionProviderJdbcConnectionAccess.obtainConnection(JdbcEnvironmentInitiator.java:181) ~[hibernate-core-5.6.10.Final.jar:5.6.10.Final]
at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:68) [hibernate-core-5.6.10.Final.jar:5.6.10.Final]
at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:35) [hibernate-core-5.6.10.Final.jar:5.6.10.Final]
at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:101) [hibernate-core-5.6.10.Final.jar:5.6.10.Final]
at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:263) [hibernate-core-5.6.10.Final.jar:5.6.10.Final]
at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:237) [hibernate-core-5.6.10.Final.jar:5.6.10.Final]
at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:214) [hibernate-core-5.6.10.Final.jar:5.6.10.Final]
at org.hibernate.id.factory.internal.DefaultIdentifierGeneratorFactory.injectServices(DefaultIdentifierGeneratorFactory.java:175) [hibernate-core-5.6.10.Final.jar:5.6.10.Final]
at org.hibernate.service.internal.AbstractServiceRegistryImpl.injectDependencies(AbstractServiceRegistryImpl.java:286) [hibernate-core-5.6.10.Final.jar:5.6.10.Final]
at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:243) [hibernate-core-5.6.10.Final.jar:5.6.10.Final]
at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:214) [hibernate-core-5.6.10.Final.jar:5.6.10.Final]
at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.<init>(InFlightMetadataCollectorImpl.java:173) [hibernate-core-5.6.10.Final.jar:5.6.10.Final]
at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:127) [hibernate-core-5.6.10.Final.jar:5.6.10.Final]
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.metadata(EntityManagerFactoryBuilderImpl.java:1460) [hibernate-core-5.6.10.Final.jar:5.6.10.Final]
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:1494) [hibernate-core-5.6.10.Final.jar:5.6.10.Final]
at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateJpaPersistenceProvider.java:58) [spring-orm-5.3.22.jar:5.3.22]
at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:365) [spring-orm-5.3.22.jar:5.3.22]
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:409) [spring-orm-5.3.22.jar:5.3.22]
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:396) [spring-orm-5.3.22.jar:5.3.22]
at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.afterPropertiesSet(LocalContainerEntityManagerFactoryBean.java:341) [spring-orm-5.3.22.jar:5.3.22]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1863) [spring-beans-5.3.22.jar:5.3.22]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1800) [spring-beans-5.3.22.jar:5.3.22]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:620) [spring-beans-5.3.22.jar:5.3.22]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) [spring-beans-5.3.22.jar:5.3.22]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) [spring-beans-5.3.22.jar:5.3.22]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.22.jar:5.3.22]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) [spring-beans-5.3.22.jar:5.3.22]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) [spring-beans-5.3.22.jar:5.3.22]
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1154) ~[spring-context-5.3.22.jar:5.3.22]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:908) ~[spring-context-5.3.22.jar:5.3.22]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583) ~[spring-context-5.3.22.jar:5.3.22]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:147) ~[spring-boot-2.7.3.jar:2.7.3]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:734) ~[spring-boot-2.7.3.jar:2.7.3]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:408) ~[spring-boot-2.7.3.jar:2.7.3]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:308) ~[spring-boot-2.7.3.jar:2.7.3]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1306) ~[spring-boot-2.7.3.jar:2.7.3]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1295) ~[spring-boot-2.7.3.jar:2.7.3]
at com.example.CafeManagementSystemBackend.CafeManagementSystemBackendApplication.main(CafeManagementSystemBackendApplication.java:10) ~[classes/:na]
2022-09-21 08:56:06.271 INFO 7364 --- [ main] org.hibernate.dialect.Dialect : HHH000400: Using dialect: org.hibernate.dialect.MySQL8Dialect
2022-09-21 08:56:06.656 INFO 7364 --- [ main] o.h.e.t.j.p.i.JtaPlatformInitiator : HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]
2022-09-21 08:56:06.665 INFO 7364 --- [ main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
2022-09-21 08:56:06.694 WARN 7364 --- [ main] JpaBaseConfiguration$JpaWebConfiguration : spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning
2022-09-21 08:56:06.956 INFO 7364 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8080 (http) with context path ''
2022-09-21 08:56:06.967 INFO 7364 --- [ main] C.CafeManagementSystemBackendApplication : Started CafeManagementSystemBackendApplication in 4.177 seconds (JVM running for 5.03)
If you need further information to come across my problem, please let me know.
Thank you.

Your database name is being seen as 'cafemanagementsystem;', remove the semi colon ';'

Related

Migrating database from H2 to MySql in Jhipster

so i am encountring an issue already declared in this Link: Jhipster 5.7.2 How to Migrate to mysql from H2 keeping my modifications
i did edit the following files as Gaël Marziou mentioned in his answer :
rc/main/resources/config/application-dev.yml
application-prod.yml
src/test/resources/config/application.yml
DatabaseConfiguration.java
WebConfigurer.java, SecurityConfiguration.java and navbar.component.html to remove references to H2 console
Edit pom.xml to remove dependency on h2.
Then after running the backend with the command: mvn -P-webpack. I get this Error "com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure".
stack trace :
[INFO] Attaching agents: []
██╗ ██╗ ██╗ ████████╗ ███████╗ ██████╗ ████████╗ ████████╗ ███████╗
██║ ██║ ██║ ╚══██╔══╝ ██╔═══██╗ ██╔════╝ ╚══██╔══╝ ██╔═════╝ ██╔═══██╗
██║ ████████║ ██║ ███████╔╝ ╚█████╗ ██║ ██████╗ ███████╔╝
██╗ ██║ ██╔═══██║ ██║ ██╔════╝ ╚═══██╗ ██║ ██╔═══╝ ██╔══██║
╚██████╔╝ ██║ ██║ ████████╗ ██║ ██████╔╝ ██║ ████████╗ ██║ ╚██╗
╚═════╝ ╚═╝ ╚═╝ ╚═══════╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══════╝ ╚═╝ ╚═╝
:: JHipster ? :: Running Spring Boot 2.2.4.RELEASE ::
:: https://www.jhipster.tech ::
2020-09-01 00:50:49.224 INFO 17272 --- [ restartedMain] smoothalgo.ZakatReminderApp : Starting ZakatReminderApp on Nizz with PID 17272 (C:\Users\ACER\Desktop\PFE\another-chance\target\classes started by ACER in C:\Users\ACER\Desktop\PFE\another-chance)
2020-09-01 00:50:49.235 DEBUG 17272 --- [ restartedMain] smoothalgo.ZakatReminderApp : Running with Spring Boot v2.2.4.RELEASE, Spring v5.2.3.RELEASE
2020-09-01 00:50:49.241 INFO 17272 --- [ restartedMain] smoothalgo.ZakatReminderApp : The following profiles are active: dev
2020-09-01 00:50:54.348 DEBUG 17272 --- [ restartedMain] i.m.c.u.i.logging.InternalLoggerFactory : Using SLF4J as the default logging framework
2020-09-01 00:50:55.075 DEBUG 17272 --- [ restartedMain] smoothalgo.config.WebConfigurer : Registering CORS filter
2020-09-01 00:50:55.153 INFO 17272 --- [ restartedMain] smoothalgo.config.WebConfigurer : Web application configuration, using profiles: dev
2020-09-01 00:50:55.155 INFO 17272 --- [ restartedMain] smoothalgo.config.WebConfigurer : Web application fully configured
2020-09-01 00:50:55.548 DEBUG 17272 --- [ restartedMain] c.ehcache.core.Ehcache-usersByLogin : Initialize successful.
2020-09-01 00:50:55.578 DEBUG 17272 --- [ restartedMain] c.ehcache.core.Ehcache-usersByEmail : Initialize successful.
2020-09-01 00:50:55.583 DEBUG 17272 --- [ restartedMain] c.e.core.Ehcache-smoothalgo.domain.User : Initialize successful.
2020-09-01 00:50:55.588 DEBUG 17272 --- [ restartedMain] c.e.c.E.domain.Authority : Initialize successful.
2020-09-01 00:50:55.593 DEBUG 17272 --- [ restartedMain] c.e.c.E.domain.User.authorities : Initialize successful.
2020-09-01 00:50:55.597 DEBUG 17272 --- [ restartedMain] c.e.c.E.domain.BankAccount : Initialize successful.
2020-09-01 00:50:55.617 DEBUG 17272 --- [ restartedMain] c.e.c.E.domain.BankAccount.balances : Initialize successful.
2020-09-01 00:50:55.622 DEBUG 17272 --- [ restartedMain] c.e.c.Ehcache-smoothalgo.domain.Balance : Initialize successful.
2020-09-01 00:50:55.628 DEBUG 17272 --- [ restartedMain] c.e.c.Ehcache-smoothalgo.domain.Period : Initialize successful.
2020-09-01 00:50:55.633 DEBUG 17272 --- [ restartedMain] c.e.c.E.domain.Period.balances : Initialize successful.
2020-09-01 00:50:55.638 DEBUG 17272 --- [ restartedMain] c.e.c.Ehcache-smoothalgo.domain.Zakat : Initialize successful.
2020-09-01 00:50:55.642 DEBUG 17272 --- [ restartedMain] c.e.c.E.domain.Zakat.payments : Initialize successful.
2020-09-01 00:50:55.647 DEBUG 17272 --- [ restartedMain] c.e.c.Ehcache-smoothalgo.domain.Payment : Initialize successful.
2020-09-01 00:50:55.651 DEBUG 17272 --- [ restartedMain] c.e.c.E.domain.Beneficiary : Initialize successful.
2020-09-01 00:50:55.657 DEBUG 17272 --- [ restartedMain] c.e.c.E.domain.Beneficiary.payments : Initialize successful.
2020-09-01 00:50:55.660 DEBUG 17272 --- [ restartedMain] c.e.c.E.domain.ExtraUser : Initialize successful.
2020-09-01 00:50:55.664 DEBUG 17272 --- [ restartedMain] c.e.c.E.domain.ExtraUser.beneficiarys : Initialize successful.
2020-09-01 00:50:55.668 DEBUG 17272 --- [ restartedMain] c.e.c.E.domain.ExtraUser.zakats : Initialize successful.
2020-09-01 00:50:55.674 DEBUG 17272 --- [ restartedMain] c.e.c.E.domain.ExtraUser.periods : Initialize successful.
2020-09-01 00:50:55.705 DEBUG 17272 --- [ restartedMain] smoothalgo.config.AsyncConfiguration : Creating Async Task Executor
2020-09-01 00:50:55.739 DEBUG 17272 --- [ restartedMain] s.config.LiquibaseConfiguration : Configuring Liquibase
2020-09-01 00:50:58.875 ERROR 17272 --- [ restartedMain] com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - Exception during pool initialization.
com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
at com.mysql.cj.jdbc.exceptions.SQLError.createCommunicationsException(SQLError.java:174)
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:64)
at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:836)
at com.mysql.cj.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:456)
at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:246)
at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:197)
at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:138)
at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:354)
at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:202)
at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:473)
at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:554)
at com.zaxxer.hikari.pool.HikariPool.<init>(HikariPool.java:115)
at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:112)
at io.github.jhipster.config.liquibase.AsyncSpringLiquibase.afterPropertiesSet(AsyncSpringLiquibase.java:89)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1855)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1792)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:595)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:310)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1108)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:868)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:315)
at smoothalgo.ZakatReminderApp.main(ZakatReminderApp.java:63)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49)
Caused by: com.mysql.cj.exceptions.CJCommunicationsException: Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:61)
at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:105)
at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:151)
at com.mysql.cj.exceptions.ExceptionFactory.createCommunicationsException(ExceptionFactory.java:167)
at com.mysql.cj.protocol.a.NativeSocketConnection.connect(NativeSocketConnection.java:91)
at com.mysql.cj.NativeSession.connect(NativeSession.java:144)
at com.mysql.cj.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:956)
at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:826)
... 34 common frames omitted
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:85)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at com.mysql.cj.protocol.StandardSocketFactory.connect(StandardSocketFactory.java:155)
at com.mysql.cj.protocol.a.NativeSocketConnection.connect(NativeSocketConnection.java:65)
... 37 common frames omitted
2020-09-01 00:50:58.881 ERROR 17272 --- [ restartedMain] i.g.j.c.liquibase.AsyncSpringLiquibase : Liquibase could not start correctly, your database is NOT ready: Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
at com.mysql.cj.jdbc.exceptions.SQLError.createCommunicationsException(SQLError.java:174)
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:64)
at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:836)
at com.mysql.cj.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:456)
at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:246)
at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:197)
at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:138)
at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:354)
at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:202)
at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:473)
at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:554)
at com.zaxxer.hikari.pool.HikariPool.<init>(HikariPool.java:115)
at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:112)
at io.github.jhipster.config.liquibase.AsyncSpringLiquibase.afterPropertiesSet(AsyncSpringLiquibase.java:89)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1855)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1792)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:595)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:310)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1108)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:868)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:315)
at smoothalgo.ZakatReminderApp.main(ZakatReminderApp.java:63)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49)
Caused by: com.mysql.cj.exceptions.CJCommunicationsException: Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:61)
at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:105)
at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:151)
at com.mysql.cj.exceptions.ExceptionFactory.createCommunicationsException(ExceptionFactory.java:167)
at com.mysql.cj.protocol.a.NativeSocketConnection.connect(NativeSocketConnection.java:91)
at com.mysql.cj.NativeSession.connect(NativeSession.java:144)
at com.mysql.cj.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:956)
at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:826)
... 34 common frames omitted
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:85)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at com.mysql.cj.protocol.StandardSocketFactory.connect(StandardSocketFactory.java:155)
at com.mysql.cj.protocol.a.NativeSocketConnection.connect(NativeSocketConnection.java:65)
... 37 common frames omitted
2020-09-01 00:51:02.583 ERROR 17272 --- [ restartedMain] com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - Exception during pool initialization.
com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
at com.mysql.cj.jdbc.exceptions.SQLError.createCommunicationsException(SQLError.java:174)
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:64)
at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:836)
at com.mysql.cj.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:456)
at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:246)
at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:197)
at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:138)
at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:354)
at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:202)
at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:473)
at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:554)
at com.zaxxer.hikari.pool.HikariPool.<init>(HikariPool.java:115)
at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:112)
at org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl.getConnection(DatasourceConnectionProviderImpl.java:122)
at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator$ConnectionProviderJdbcConnectionAccess.obtainConnection(JdbcEnvironmentInitiator.java:180)
at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:68)
at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:35)
at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:101)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:263)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:237)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:214)
at org.hibernate.id.factory.internal.DefaultIdentifierGeneratorFactory.injectServices(DefaultIdentifierGeneratorFactory.java:152)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.injectDependencies(AbstractServiceRegistryImpl.java:286)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:243)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:214)
at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.<init>(InFlightMetadataCollectorImpl.java:175)
at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:118)
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.metadata(EntityManagerFactoryBuilderImpl.java:1202)
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:1233)
at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateJpaPersistenceProvider.java:58)
at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:365)
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:391)
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:378)
at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.afterPropertiesSet(LocalContainerEntityManagerFactoryBean.java:341)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1855)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1792)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:595)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1108)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:868)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:315)
at smoothalgo.ZakatReminderApp.main(ZakatReminderApp.java:63)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49)
Caused by: com.mysql.cj.exceptions.CJCommunicationsException: Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:61)
at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:105)
at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:151)
at com.mysql.cj.exceptions.ExceptionFactory.createCommunicationsException(ExceptionFactory.java:167)
at com.mysql.cj.protocol.a.NativeSocketConnection.connect(NativeSocketConnection.java:91)
at com.mysql.cj.NativeSession.connect(NativeSession.java:144)
at com.mysql.cj.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:956)
at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:826)
... 52 common frames omitted
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:85)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at com.mysql.cj.protocol.StandardSocketFactory.connect(StandardSocketFactory.java:155)
at com.mysql.cj.protocol.a.NativeSocketConnection.connect(NativeSocketConnection.java:65)
... 55 common frames omitted
2020-09-01 00:51:02.591 WARN 17272 --- [ restartedMain] o.h.e.j.e.i.JdbcEnvironmentInitiator : HHH000342: Could not obtain connection to query metadata : Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
2020-09-01 00:51:04.826 DEBUG 17272 --- [ restartedMain] smoothalgo.security.jwt.TokenProvider : Using a Base64-encoded JWT secret key
2020-09-01 00:51:11.723 INFO 17272 --- [ restartedMain] smoothalgo.ZakatReminderApp : Started ZakatReminderApp in 23.851 seconds (JVM running for 25.408)
2020-09-01 00:51:11.736 INFO 17272 --- [ restartedMain] smoothalgo.ZakatReminderApp :
----------------------------------------------------------
Application 'zakat_reminder' is running! Access URLs:
Local: http://localhost:8080/
External: http://192.168.42.204:8080/
Profile(s): [dev]
----------------------------------------------------------
and that's my github project link : https://github.com/nizarbg96/ZakatProject.git

Debezium Engine not catching changes on my MySQL Database

I have a Spring Boot Application with Debezium Api embbeded to catch changes no my MySQL Database.
I'm trying to make Debezium Engine Api (v1.1.2) catch any changes on my MySQL local database.
But, for some reason, Embedded Debezium its not able to catch when any change happen.
Does anyone have any tip to help me?
Here's my configuration code
import io.debezium.engine.ChangeEvent;
import io.debezium.engine.DebeziumEngine;
import io.debezium.engine.format.Json;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import java.io.IOException;
import java.util.Properties;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
#Configuration
public class InstalaCoreDatabaseConnectorConfiguration {
#Value("${instala.datasource.serverid}")
private String databaseServerId;
#Value("${instala.datasource.host}")
private String databaseHost;
#Value("${instala.datasource.databasename.core}")
private String coreDatabaseName;
#Value("${instala.datasource.port}")
private String databasePort;
#Value("${instala.datasource.username}")
private String databaseUserName;
#Value("${instala.datasource.password}")
private String databasePassword;
private final String[] coreDatabaseWhitelistTables = {
//"SERVC_ORD_EVNT",
//"SERVC_ORD_ITEM",
"test_dev_core.servc_prvdr"
//"SERVC_PRVDR_AGNT"
};
#Bean
public void coreDatabaseConnector() throws IOException {
final Properties props = new Properties();
props.setProperty("name", "instala-core");
props.setProperty("connector.class", "io.debezium.connector.mysql.MySqlConnector");
props.setProperty("offset.storage", "org.apache.kafka.connect.storage.FileOffsetBackingStore");
props.setProperty("offset.storage.file.filename", "/tmp/offsets.dat");
props.setProperty("offset.flush.interval.ms", "60000");
/* begin connector properties */
props.setProperty("database.hostname", databaseHost);
props.setProperty("database.port", databasePort);
props.setProperty("database.user", databaseUserName);
props.setProperty("database.password", databasePassword);
props.setProperty("database.server.id", databaseServerId);
props.setProperty("database.server.name", "instalacore");
props.setProperty("database.history", "io.debezium.relational.history.FileDatabaseHistory");
props.setProperty("database.history.file.filename", "/tmp/dbhistory.dat");
props.setProperty("table.whitelist", String.join(",", coreDatabaseWhitelistTables));
// Create the engine with this configuration ...
try (DebeziumEngine<ChangeEvent<String, String>> engine = DebeziumEngine.create(Json.class)
.using(props)
.notifying(record -> {
System.out.println(record);
}).build()
) {
Executors.newSingleThreadExecutor().execute(engine);
// Run the engine asynchronously ...
ExecutorService executor = Executors.newSingleThreadExecutor();
executor.execute(engine);
// Do something else or wait for a signal or an event
}
}
}
And here is my pom.xml dependencies
<dependency>
<groupId>io.debezium</groupId>
<artifactId>debezium-api</artifactId>
<version>1.1.2.Final</version>
</dependency>
<dependency>
<groupId>io.debezium</groupId>
<artifactId>debezium-embedded</artifactId>
<version>1.1.2.Final</version>
</dependency>
<dependency>
<groupId>io.debezium</groupId>
<artifactId>debezium-connector-mysql</artifactId>
<version>1.1.2.Final</version>
</dependency>
And the grants for my user is
'GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, CREATE ROLE, DROP ROLE ON *.* TO `admin`#`localhost` WITH GRANT OPTION'
'GRANT APPLICATION_PASSWORD_ADMIN,AUDIT_ADMIN,BACKUP_ADMIN,BINLOG_ADMIN,BINLOG_ENCRYPTION_ADMIN,CLONE_ADMIN,CONNECTION_ADMIN,ENCRYPTION_KEY_ADMIN,GROUP_REPLICATION_ADMIN,INNODB_REDO_LOG_ARCHIVE,PERSIST_RO_VARIABLES_ADMIN,REPLICATION_APPLIER,REPLICATION_SLAVE_ADMIN,RESOURCE_GROUP_ADMIN,RESOURCE_GROUP_USER,ROLE_ADMIN,SERVICE_CONNECTION_ADMIN,SESSION_VARIABLES_ADMIN,SET_USER_ID,SHOW_ROUTINE,SYSTEM_USER,SYSTEM_VARIABLES_ADMIN,TABLE_ENCRYPTION_ADMIN,XA_RECOVER_ADMIN ON *.* TO `admin`#`localhost` WITH GRANT OPTION'
'GRANT ALL PRIVILEGES ON `dev_core`.* TO `admin`#`localhost`'
'GRANT SELECT ON `dev_core`.`servc_prvdr` TO `admin`#`localhost`'
Here is my Spring Boot start-up application logs
2020-06-25 17:08:34.613 INFO 2625 --- [ main] com.test.cdc.CDCRelayApplication : Starting CDCRelayApplication on bruno-Inspiron-7580 with PID 2625 (/var/www/html/cdc-relay/target/classes started by bruno in /var/www/html/cdc-relay)
2020-06-25 17:08:34.615 INFO 2625 --- [ main] com.test.cdc.CDCRelayApplication : No active profile set, falling back to default profiles: default
2020-06-25 17:08:35.560 INFO 2625 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http)
2020-06-25 17:08:35.571 INFO 2625 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2020-06-25 17:08:35.571 INFO 2625 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.27]
2020-06-25 17:08:35.671 INFO 2625 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2020-06-25 17:08:35.671 INFO 2625 --- [ main] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 1016 ms
2020-06-25 17:08:35.869 INFO 2625 --- [ main] o.a.k.connect.json.JsonConverterConfig : JsonConverterConfig values:
converter.type = key
schemas.cache.size = 1000
schemas.enable = true
2020-06-25 17:08:35.871 INFO 2625 --- [ main] o.a.k.connect.json.JsonConverterConfig : JsonConverterConfig values:
converter.type = value
schemas.cache.size = 1000
schemas.enable = false
2020-06-25 17:08:35.875 INFO 2625 --- [ main] i.d.e.EmbeddedEngine$EmbeddedConfig : EmbeddedConfig values:
access.control.allow.methods =
access.control.allow.origin =
bootstrap.servers = [localhost:9092]
client.dns.lookup = default
config.providers = []
connector.client.config.override.policy = None
header.converter = class org.apache.kafka.connect.storage.SimpleHeaderConverter
internal.key.converter = class org.apache.kafka.connect.json.JsonConverter
internal.value.converter = class org.apache.kafka.connect.json.JsonConverter
key.converter = class org.apache.kafka.connect.json.JsonConverter
listeners = null
metric.reporters = []
metrics.num.samples = 2
metrics.recording.level = INFO
metrics.sample.window.ms = 30000
offset.flush.interval.ms = 60000
offset.flush.timeout.ms = 5000
offset.storage.file.filename = /tmp/offsets.dat
offset.storage.partitions = null
offset.storage.replication.factor = null
offset.storage.topic =
plugin.path = null
rest.advertised.host.name = null
rest.advertised.listener = null
rest.advertised.port = null
rest.extension.classes = []
rest.host.name = null
rest.port = 8083
ssl.client.auth = none
task.shutdown.graceful.timeout.ms = 5000
value.converter = class org.apache.kafka.connect.json.JsonConverter
2020-06-25 17:08:35.875 INFO 2625 --- [ main] o.a.kafka.connect.runtime.WorkerConfig : Worker configuration property 'internal.key.converter' is deprecated and may be removed in an upcoming release. The specified value 'org.apache.kafka.connect.json.JsonConverter' matches the default, so this property can be safely removed from the worker configuration.
2020-06-25 17:08:35.876 INFO 2625 --- [ main] o.a.kafka.connect.runtime.WorkerConfig : Worker configuration property 'internal.value.converter' is deprecated and may be removed in an upcoming release. The specified value 'org.apache.kafka.connect.json.JsonConverter' matches the default, so this property can be safely removed from the worker configuration.
2020-06-25 17:08:35.878 INFO 2625 --- [ main] o.a.k.connect.json.JsonConverterConfig : JsonConverterConfig values:
converter.type = key
schemas.cache.size = 1000
schemas.enable = true
2020-06-25 17:08:35.878 INFO 2625 --- [ main] o.a.k.connect.json.JsonConverterConfig : JsonConverterConfig values:
converter.type = value
schemas.cache.size = 1000
schemas.enable = true
2020-06-25 17:08:35.880 INFO 2625 --- [ main] io.debezium.embedded.EmbeddedEngine : Stopping the embedded engine
2020-06-25 17:08:35.881 INFO 2625 --- [ main] io.debezium.embedded.EmbeddedEngine : Waiting for PT5M for connector to stop
2020-06-25 17:08:35.884 INFO 2625 --- [pool-2-thread-1] o.a.k.c.storage.FileOffsetBackingStore : Starting FileOffsetBackingStore with file /tmp/offsets.dat
2020-06-25 17:08:35.920 INFO 2625 --- [pool-2-thread-1] i.d.connector.common.BaseSourceTask : Starting MySqlConnectorTask with configuration:
2020-06-25 17:08:35.922 INFO 2625 --- [pool-2-thread-1] i.d.connector.common.BaseSourceTask : connector.class = io.debezium.connector.mysql.MySqlConnector
2020-06-25 17:08:35.922 INFO 2625 --- [pool-2-thread-1] i.d.connector.common.BaseSourceTask : database.history.file.filename = /tmp/dbhistory.dat
2020-06-25 17:08:35.922 INFO 2625 --- [pool-2-thread-1] i.d.connector.common.BaseSourceTask : database.user = admin
2020-06-25 17:08:35.922 INFO 2625 --- [pool-2-thread-1] i.d.connector.common.BaseSourceTask : offset.storage = org.apache.kafka.connect.storage.FileOffsetBackingStore
2020-06-25 17:08:35.923 INFO 2625 --- [pool-2-thread-1] i.d.connector.common.BaseSourceTask : database.server.id = 1
2020-06-25 17:08:35.923 INFO 2625 --- [pool-2-thread-1] i.d.connector.common.BaseSourceTask : database.server.name = instalacore
2020-06-25 17:08:35.923 INFO 2625 --- [pool-2-thread-1] i.d.connector.common.BaseSourceTask : database.port = 3306
2020-06-25 17:08:35.923 INFO 2625 --- [pool-2-thread-1] i.d.connector.common.BaseSourceTask : table.whitelist = test_dev_core.servc_prvdr
2020-06-25 17:08:35.923 INFO 2625 --- [pool-2-thread-1] i.d.connector.common.BaseSourceTask : offset.flush.interval.ms = 60000
2020-06-25 17:08:35.923 INFO 2625 --- [pool-2-thread-1] i.d.connector.common.BaseSourceTask : offset.storage.file.filename = /tmp/offsets.dat
2020-06-25 17:08:35.923 INFO 2625 --- [pool-2-thread-1] i.d.connector.common.BaseSourceTask : database.hostname = localhost
2020-06-25 17:08:35.924 INFO 2625 --- [pool-2-thread-1] i.d.connector.common.BaseSourceTask : database.password = ********
2020-06-25 17:08:35.924 INFO 2625 --- [pool-2-thread-1] i.d.connector.common.BaseSourceTask : name = instala-core
2020-06-25 17:08:35.924 INFO 2625 --- [pool-2-thread-1] i.d.connector.common.BaseSourceTask : database.history = io.debezium.relational.history.FileDatabaseHistory
2020-06-25 17:08:36.194 INFO 2625 --- [pool-2-thread-1] i.d.connector.mysql.MySqlConnectorTask : Found no existing offset, so preparing to perform a snapshot
2020-06-25 17:08:36.222 INFO 2625 --- [pool-2-thread-1] io.debezium.util.Threads : Requested thread factory for connector MySqlConnector, id = instalacore named = binlog-client
2020-06-25 17:08:36.231 INFO 2625 --- [pool-2-thread-1] io.debezium.util.Threads : Requested thread factory for connector MySqlConnector, id = instalacore named = snapshot
2020-06-25 17:08:36.231 INFO 2625 --- [pool-2-thread-1] io.debezium.util.Threads : Creating thread debezium-mysqlconnector-instalacore-snapshot
2020-06-25 17:08:36.232 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : Starting snapshot for jdbc:mysql://localhost:3306/?useInformationSchema=true&nullCatalogMeansCurrent=false&useSSL=false&useUnicode=true&characterEncoding=UTF-8&characterSetResults=UTF-8&zeroDateTimeBehavior=CONVERT_TO_NULL&connectTimeout=30000 with user 'admin' with locking mode 'minimal'
2020-06-25 17:08:36.232 INFO 2625 --- [pool-2-thread-1] i.d.connector.common.BaseSourceTask : Stopping down connector
2020-06-25 17:08:36.232 INFO 2625 --- [pool-2-thread-1] i.d.connector.mysql.MySqlConnectorTask : Stopping MySQL connector task
2020-06-25 17:08:36.232 INFO 2625 --- [pool-2-thread-1] i.d.connector.mysql.ChainedReader : ChainedReader: Stopping the snapshot reader
2020-06-25 17:08:36.232 INFO 2625 --- [pool-2-thread-1] i.d.connector.mysql.SnapshotReader : Discarding 0 unsent record(s) due to the connector shutting down
2020-06-25 17:08:36.233 INFO 2625 --- [pool-2-thread-1] i.d.connector.mysql.SnapshotReader : Discarding 0 unsent record(s) due to the connector shutting down
2020-06-25 17:08:36.234 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : Snapshot is using user 'admin' with these MySQL grants:
2020-06-25 17:08:36.234 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, CREATE ROLE, DROP ROLE ON *.* TO `admin`#`localhost` WITH GRANT OPTION
2020-06-25 17:08:36.234 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : GRANT APPLICATION_PASSWORD_ADMIN,AUDIT_ADMIN,BACKUP_ADMIN,BINLOG_ADMIN,BINLOG_ENCRYPTION_ADMIN,CLONE_ADMIN,CONNECTION_ADMIN,ENCRYPTION_KEY_ADMIN,GROUP_REPLICATION_ADMIN,INNODB_REDO_LOG_ARCHIVE,PERSIST_RO_VARIABLES_ADMIN,REPLICATION_APPLIER,REPLICATION_SLAVE_ADMIN,RESOURCE_GROUP_ADMIN,RESOURCE_GROUP_USER,ROLE_ADMIN,SERVICE_CONNECTION_ADMIN,SESSION_VARIABLES_ADMIN,SET_USER_ID,SHOW_ROUTINE,SYSTEM_USER,SYSTEM_VARIABLES_ADMIN,TABLE_ENCRYPTION_ADMIN,XA_RECOVER_ADMIN ON *.* TO `admin`#`localhost` WITH GRANT OPTION
2020-06-25 17:08:36.234 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : GRANT ALL PRIVILEGES ON `test_dev_core`.* TO `admin`#`localhost`
2020-06-25 17:08:36.234 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : GRANT SELECT ON `test_dev_core`.`servc_prvdr` TO `admin`#`localhost`
2020-06-25 17:08:36.234 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : MySQL server variables related to change data capture:
2020-06-25 17:08:36.238 INFO 2625 --- [pool-2-thread-1] i.d.connector.mysql.MySqlConnectorTask : Connector task finished all work and is now shutdown
2020-06-25 17:08:36.239 INFO 2625 --- [pool-2-thread-1] o.a.k.c.storage.FileOffsetBackingStore : Stopped FileOffsetBackingStore
2020-06-25 17:08:36.243 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : binlog_cache_size = 32768
2020-06-25 17:08:36.243 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : binlog_checksum = CRC32
2020-06-25 17:08:36.243 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : binlog_direct_non_transactional_updates = OFF
2020-06-25 17:08:36.243 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : binlog_encryption = OFF
2020-06-25 17:08:36.243 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : binlog_error_action = ABORT_SERVER
2020-06-25 17:08:36.243 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : binlog_expire_logs_seconds = 2592000
2020-06-25 17:08:36.244 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : binlog_format = ROW
2020-06-25 17:08:36.244 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : binlog_group_commit_sync_delay = 0
2020-06-25 17:08:36.244 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : binlog_group_commit_sync_no_delay_count = 0
2020-06-25 17:08:36.244 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : binlog_gtid_simple_recovery = ON
2020-06-25 17:08:36.244 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : binlog_max_flush_queue_time = 0
2020-06-25 17:08:36.244 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : binlog_order_commits = ON
2020-06-25 17:08:36.244 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : binlog_rotate_encryption_master_key_at_startup = OFF
2020-06-25 17:08:36.244 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : binlog_row_event_max_size = 8192
2020-06-25 17:08:36.245 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : binlog_row_image = FULL
2020-06-25 17:08:36.245 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : binlog_row_metadata = MINIMAL
2020-06-25 17:08:36.245 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : binlog_row_value_options =
2020-06-25 17:08:36.245 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : binlog_rows_query_log_events = OFF
2020-06-25 17:08:36.245 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : binlog_stmt_cache_size = 32768
2020-06-25 17:08:36.245 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : binlog_transaction_compression = OFF
2020-06-25 17:08:36.245 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : binlog_transaction_compression_level_zstd = 3
2020-06-25 17:08:36.246 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : binlog_transaction_dependency_history_size = 25000
2020-06-25 17:08:36.246 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : binlog_transaction_dependency_tracking = COMMIT_ORDER
2020-06-25 17:08:36.246 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : character_set_client = utf8mb4
2020-06-25 17:08:36.246 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : character_set_connection = utf8mb4
2020-06-25 17:08:36.246 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : character_set_database = utf8mb4
2020-06-25 17:08:36.246 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : character_set_filesystem = binary
2020-06-25 17:08:36.246 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : character_set_results = utf8mb4
2020-06-25 17:08:36.246 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : character_set_server = utf8mb4
2020-06-25 17:08:36.246 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : character_set_system = utf8
2020-06-25 17:08:36.247 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : character_sets_dir = /usr/share/mysql-8.0/charsets/
2020-06-25 17:08:36.247 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : collation_connection = utf8mb4_0900_ai_ci
2020-06-25 17:08:36.247 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : collation_database = utf8mb4_0900_ai_ci
2020-06-25 17:08:36.247 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : collation_server = utf8mb4_0900_ai_ci
2020-06-25 17:08:36.247 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : default_collation_for_utf8mb4 = utf8mb4_0900_ai_ci
2020-06-25 17:08:36.247 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : enforce_gtid_consistency = OFF
2020-06-25 17:08:36.247 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : gtid_executed =
2020-06-25 17:08:36.247 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : gtid_executed_compression_period = 1000
2020-06-25 17:08:36.247 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : gtid_mode = OFF
2020-06-25 17:08:36.248 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : gtid_next = AUTOMATIC
2020-06-25 17:08:36.248 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : gtid_owned =
2020-06-25 17:08:36.248 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : gtid_purged =
2020-06-25 17:08:36.248 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : immediate_server_version = 999999
2020-06-25 17:08:36.248 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : innodb_api_enable_binlog = OFF
2020-06-25 17:08:36.248 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : innodb_version = 8.0.20
2020-06-25 17:08:36.248 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : log_statements_unsafe_for_binlog = ON
2020-06-25 17:08:36.248 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : max_binlog_cache_size = 18446744073709547520
2020-06-25 17:08:36.248 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : max_binlog_size = 1073741824
2020-06-25 17:08:36.249 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : max_binlog_stmt_cache_size = 18446744073709547520
2020-06-25 17:08:36.249 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : original_server_version = 999999
2020-06-25 17:08:36.249 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : protocol_version = 10
2020-06-25 17:08:36.249 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : session_track_gtids = OFF
2020-06-25 17:08:36.249 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : slave_type_conversions =
2020-06-25 17:08:36.249 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : sync_binlog = 1
2020-06-25 17:08:36.249 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : system_time_zone = -03
2020-06-25 17:08:36.249 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : time_zone = SYSTEM
2020-06-25 17:08:36.249 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : tls_version = TLSv1,TLSv1.1,TLSv1.2,TLSv1.3
2020-06-25 17:08:36.249 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : version = 8.0.20
2020-06-25 17:08:36.250 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : version_comment = MySQL Community Server - GPL
2020-06-25 17:08:36.250 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : version_compile_machine = x86_64
2020-06-25 17:08:36.250 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : version_compile_os = Linux
2020-06-25 17:08:36.250 INFO 2625 --- [lacore-snapshot] i.d.connector.mysql.SnapshotReader : version_compile_zlib = 1.2.11
2020-06-25 17:08:36.332 INFO 2625 --- [ main] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'applicationTaskExecutor'
2020-06-25 17:08:36.486 INFO 2625 --- [ main] o.s.b.a.e.web.EndpointLinksResolver : Exposing 2 endpoint(s) beneath base path '/actuator'
2020-06-25 17:08:36.527 INFO 2625 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8080 (http) with context path ''
2020-06-25 17:08:36.529 INFO 2625 --- [ main] com.test.cdc.CDCRelayApplication : Started CDCRelayApplication in 2.236 seconds (JVM running for 2.484)
Anyone have any idea on why this is happening?
Thanks everyone!
the whitelist table is in format <databasename>.<tablename>. You have only table name part.
Looking at your config the offsets.dat will create after 60 seconnds when the offsets are committed. You can reduce the offset.flush.interval.ms for test purposes.
What conecnerns me more is
2020-06-25 17:08:36.232 INFO 2625 --- [pool-2-thread-1] i.d.connector.common.BaseSourceTask : Stopping down connector
2020-06-25 17:08:36.232 INFO 2625 --- [pool-2-thread-1] i.d.connector.mysql.MySqlConnectorTask : Stopping MySQL connector task
2020-06-25 17:08:36.232 INFO 2625 --- [pool-2-thread-1] i.d.connector.mysql.ChainedReader : ChainedReader: Stopping the snapshot reader
You create the engine in try block so it is stopped (closed) as soon as the block left. You code should stay in that block.

Why repositories in jpa with mysql is returning nothing?

I have implemented an application in spring with jpa and mysql, but #repositories is not working, the method findAll returns Arraylist of size 0.
application.properties:
spring.jpa.hibernate.ddl-auto=create
spring.datasource.url=jdbc:mysql://localhost:3306/usuarios?useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC
spring.datasource.username=root
spring.datasource.password=
Entity:
https://pastebin.com/XqwdPhYj
Controller:
https://pastebin.com/TPgiwrx2
Repositories:
https://pastebin.com/J5u08wRU
Service:
https://pastebin.com/XAJRuBi6
Fascade:
https://pastebin.com/pTNeCZun
Demo Application:
https://pastebin.com/vTmBHTaH
console log:
:: Spring Boot :: (v2.1.5.BUILD-SNAPSHOT)
2019-04-24 23:51:55.209 INFO 400 --- [ restartedMain] DemoApplication : Starting DemoApplication on DESKTOP-B85SDDT with PID 400 (C:\Users\adminUser\Desktop\demo\target\classes started by adminUser in C:\Users\adminUser\Desktop\demo)
2019-04-24 23:51:55.213 INFO 400 --- [ restartedMain] DemoApplication : No active profile set, falling back to default profiles: default
2019-04-24 23:51:55.269 INFO 400 --- [ restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : Devtools property defaults active! Set 'spring.devtools.add-properties' to 'false' to disable
2019-04-24 23:51:55.269 INFO 400 --- [ restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : For additional web related logging consider setting the 'logging.level.web' property to 'DEBUG'
2019-04-24 23:51:56.137 INFO 400 --- [ restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data repositories in DEFAULT mode.
2019-04-24 23:52:13.106 INFO 400 --- [ restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 16963ms. Found 1 repository interfaces.
2019-04-24 23:52:13.664 INFO 400 --- [ restartedMain] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$dd8cb8a5] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-04-24 23:52:13.686 INFO 400 --- [ restartedMain] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.hateoas.config.HateoasConfiguration' of type [org.springframework.hateoas.config.HateoasConfiguration$$EnhancerBySpringCGLIB$$5d0d05d7] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-04-24 23:52:14.127 INFO 400 --- [ restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http)
2019-04-24 23:52:14.155 INFO 400 --- [ restartedMain] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2019-04-24 23:52:14.156 INFO 400 --- [ restartedMain] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.19]
2019-04-24 23:52:14.263 INFO 400 --- [ restartedMain] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2019-04-24 23:52:14.263 INFO 400 --- [ restartedMain] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 18994 ms
2019-04-24 23:52:14.562 INFO 400 --- [ restartedMain] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
2019-04-24 23:52:14.679 INFO 400 --- [ restartedMain] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.
2019-04-24 23:52:14.742 INFO 400 --- [ restartedMain] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [
name: default
...]
2019-04-24 23:52:14.816 INFO 400 --- [ restartedMain] org.hibernate.Version : HHH000412: Hibernate Core {5.3.9.Final}
2019-04-24 23:52:14.817 INFO 400 --- [ restartedMain] org.hibernate.cfg.Environment : HHH000206: hibernate.properties not found
2019-04-24 23:52:14.930 INFO 400 --- [ restartedMain] o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations {5.0.4.Final}
2019-04-24 23:52:15.048 INFO 400 --- [ restartedMain] org.hibernate.dialect.Dialect : HHH000400: Using dialect: org.hibernate.dialect.MySQL5Dialect
2019-04-24 23:52:15.356 INFO 400 --- [ restartedMain] org.hibernate.tuple.PojoInstantiator : HHH000182: No default (no-argument) constructor for class: entidades.Clientes (class must be instantiated by Interceptor)
2019-04-24 23:52:15.607 INFO 400 --- [ restartedMain] o.h.t.schema.internal.SchemaCreatorImpl : HHH000476: Executing import script 'org.hibernate.tool.schema.internal.exec.ScriptSourceInputNonExistentImpl#77c69f90'
2019-04-24 23:52:15.609 INFO 400 --- [ restartedMain] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
2019-04-24 23:52:15.703 INFO 400 --- [ restartedMain] o.s.b.d.a.OptionalLiveReloadServer : LiveReload server is running on port 35729
2019-04-24 23:52:16.549 INFO 400 --- [ restartedMain] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'applicationTaskExecutor'
2019-04-24 23:52:16.784 WARN 400 --- [ restartedMain] ion$DefaultTemplateResolverConfiguration : Cannot find template location: classpath:/templates/ (please add some templates or check your Thymeleaf configuration)
2019-04-24 23:52:17.166 INFO 400 --- [ restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8080 (http) with context path ''
2019-04-24 23:52:17.171 INFO 400 --- [ restartedMain] DemoApplication : Started DemoApplication in 22.376 seconds (JVM running for 22.691)

Why spring boot application doesn't generate tables from entity in Postgresql?

I have tryed everything what I have found here and in every relevant google match on my searches. I'm stuck with this problem for 2 days now, first I thought the problem might be with MySQL so tried Postgres but still nothing.
The database is connected with the application, when i create a new table i can see in Postgres and if I delete it there it disappears from Intellij also.
But from Entities it generates nothing and doesn't even throw any error.
application.properties:
spring.datasource.url=jdbc:postgresql://localhost:5432/postgres_demo
spring.datasource.username= postgres
spring.datasource.password=1234
spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.PostgreSQLDialect
spring.jpa.hibernate.ddl-auto = create
spring.jpa.generate-ddl = true
spring.jpa.properties.hibernate.temp.use_jdbc_metadata_defaults = false
spring.jpa.database-platform=org.hibernate.dialect.PostgreSQLDialect
PostgresDemoApplication clsaa:
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
#EnableJpaAuditing
#SpringBootApplication
#EntityScan(basePackages = "models")
public class PostgresDemoApplication {
public static void main(String[] args) {
SpringApplication.run(PostgresDemoApplication.class, args);
}
}
model class:
import javax.persistence.*;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
#Entity
#Table(name = "question")
public class Question extends AuditModel {
#Id
#GeneratedValue(generator = "question_generator")
#SequenceGenerator(
name = "question_generator",
sequenceName = "question_generator",
initialValue = 1000
)
private Long id;
#NotBlank
#Size(min = 3, max = 100)
private String title;
#Column(columnDefinition = "text")
private String description;
Spring boot
2018-09-09 14:11:35.261 INFO 2140 --- [ restartedMain] c.i.p.PostgresDemoApplication : Starting PostgresDemoApplication on DESKTOP-5Q2LCCO with PID 2140 (D:\Isshae\Java\postgres-demo\out\production\classes started by asus in D:\Isshae\Java\postgres-demo)
2018-09-09 14:11:35.262 INFO 2140 --- [ restartedMain] c.i.p.PostgresDemoApplication : No active profile set, falling back to default profiles: default
2018-09-09 14:11:35.338 INFO 2140 --- [ restartedMain] ConfigServletWebServerApplicationContext : Refreshing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext#44c035dd: startup date [Sun Sep 09 14:11:35 CEST 2018]; root of context hierarchy
2018-09-09 14:11:36.467 INFO 2140 --- [ restartedMain] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$41d31d19] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2018-09-09 14:11:36.908 INFO 2140 --- [ restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http)
2018-09-09 14:11:36.925 INFO 2140 --- [ restartedMain] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2018-09-09 14:11:36.925 INFO 2140 --- [ restartedMain] org.apache.catalina.core.StandardEngine : Starting Servlet Engine: Apache Tomcat/8.5.32
2018-09-09 14:11:36.929 INFO 2140 --- [ost-startStop-1] o.a.catalina.core.AprLifecycleListener : The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [C:\Program Files\Java\jdk1.8.0_181\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\Microsoft VS Code\bin;C:\Program Files\Git\cmd;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Users\asus\AppData\Local\Programs\Python\Python37-32\Scripts\;C:\Users\asus\AppData\Local\Programs\Python\Python37-32\;C:\Users\asus\AppData\Local\Microsoft\WindowsApps;;.]
2018-09-09 14:11:37.052 INFO 2140 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2018-09-09 14:11:37.052 INFO 2140 --- [ost-startStop-1] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 1717 ms
2018-09-09 14:11:37.111 INFO 2140 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean : Servlet dispatcherServlet mapped to [/]
2018-09-09 14:11:37.111 INFO 2140 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'characterEncodingFilter' to: [/*]
2018-09-09 14:11:37.111 INFO 2140 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
2018-09-09 14:11:37.111 INFO 2140 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'httpPutFormContentFilter' to: [/*]
2018-09-09 14:11:37.111 INFO 2140 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'requestContextFilter' to: [/*]
2018-09-09 14:11:37.242 INFO 2140 --- [ restartedMain] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
2018-09-09 14:11:37.498 INFO 2140 --- [ restartedMain] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.
2018-09-09 14:11:37.534 INFO 2140 --- [ restartedMain] j.LocalContainerEntityManagerFactoryBean : Building JPA container EntityManagerFactory for persistence unit 'default'
2018-09-09 14:11:37.534 INFO 2140 --- [ restartedMain] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [
name: default
...]
2018-09-09 14:11:37.675 INFO 2140 --- [ restartedMain] org.hibernate.Version : HHH000412: Hibernate Core {5.2.17.Final}
2018-09-09 14:11:37.677 INFO 2140 --- [ restartedMain] org.hibernate.cfg.Environment : HHH000206: hibernate.properties not found
2018-09-09 14:11:37.707 INFO 2140 --- [ restartedMain] o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations {5.0.1.Final}
2018-09-09 14:11:37.809 INFO 2140 --- [ restartedMain] org.hibernate.dialect.Dialect : HHH000400: Using dialect: org.hibernate.dialect.PostgreSQLDialect
2018-09-09 14:11:37.829 INFO 2140 --- [ restartedMain] o.h.e.j.e.i.LobCreatorBuilderImpl : HHH000422: Disabling contextual LOB creation as connection was null
2018-09-09 14:11:37.829 INFO 2140 --- [ restartedMain] org.hibernate.type.BasicTypeRegistry : HHH000270: Type registration [java.util.UUID] overrides previous : org.hibernate.type.UUIDBinaryType#4ab9bbe7
2018-09-09 14:11:38.554 INFO 2140 --- [ restartedMain] o.h.t.schema.internal.SchemaCreatorImpl : HHH000476: Executing import script 'org.hibernate.tool.schema.internal.exec.ScriptSourceInputNonExistentImpl#7d8c0ef6'
2018-09-09 14:11:38.554 INFO 2140 --- [ restartedMain] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
2018-09-09 14:11:38.724 INFO 2140 --- [ restartedMain] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2018-09-09 14:11:38.974 INFO 2140 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerAdapter : Looking for #ControllerAdvice: org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext#44c035dd: startup date [Sun Sep 09 14:11:35 CEST 2018]; root of context hierarchy
2018-09-09 14:11:38.999 WARN 2140 --- [ restartedMain] aWebConfiguration$JpaWebMvcConfiguration : spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning
2018-09-09 14:11:39.052 INFO 2140 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
2018-09-09 14:11:39.053 INFO 2140 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
2018-09-09 14:11:39.076 INFO 2140 --- [ restartedMain] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2018-09-09 14:11:39.076 INFO 2140 --- [ restartedMain] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2018-09-09 14:11:39.123 WARN 2140 --- [ restartedMain] ion$DefaultTemplateResolverConfiguration : Cannot find template location: classpath:/templates/ (please add some templates or check your Thymeleaf configuration)
2018-09-09 14:11:39.371 INFO 2140 --- [ restartedMain] o.s.b.d.a.OptionalLiveReloadServer : LiveReload server is running on port 35729
2018-09-09 14:11:39.394 INFO 2140 --- [ restartedMain] o.s.j.e.a.AnnotationMBeanExporter : Registering beans for JMX exposure on startup
2018-09-09 14:11:39.399 INFO 2140 --- [ restartedMain] o.s.j.e.a.AnnotationMBeanExporter : Bean with name 'dataSource' has been autodetected for JMX exposure
2018-09-09 14:11:39.403 INFO 2140 --- [ restartedMain] o.s.j.e.a.AnnotationMBeanExporter : Located MBean 'dataSource': registering with JMX server as MBean [com.zaxxer.hikari:name=dataSource,type=HikariDataSource]
2018-09-09 14:11:39.435 INFO 2140 --- [ restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8080 (http) with context path ''
2018-09-09 14:11:39.436 INFO 2140 --- [ restartedMain] c.i.p.PostgresDemoApplication : Started PostgresDemoApplication in 4.503 seconds (JVM running for 5.399)

Spring Boot with MySQL is shutting down immedietly

My first Spring Boot application with MySQL and JPA is shutting down immediately and I do not have any clue on the reasons.
2018-08-15 16:24:42.050 INFO 10960 --- [ restartedMain] com.classpath.SampleAppApplication : Starting SampleAppApplication on LAPTOP-MAI0FJBD with PID 10960 (C:\Users\classpath\projects\sample-app\target\classes started by classpath in C:\Users\classpath\projects\sample-app)
2018-08-15 16:24:42.065 INFO 10960 --- [ restartedMain] com.classpath.SampleAppApplication : No active profile set, falling back to default profiles: default
2018-08-15 16:24:42.160 INFO 10960 --- [ restartedMain] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext#699320b1: startup date [Wed Aug 15 16:24:42 IST 2018]; root of context hierarchy
2018-08-15 16:24:43.978 INFO 10960 --- [ restartedMain] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
2018-08-15 16:24:44.245 INFO 10960 --- [ restartedMain] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.
2018-08-15 16:24:44.291 INFO 10960 --- [ restartedMain] j.LocalContainerEntityManagerFactoryBean : Building JPA container EntityManagerFactory for persistence unit 'default'
2018-08-15 16:24:44.307 INFO 10960 --- [ restartedMain] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [
name: default
...]
2018-08-15 16:24:44.369 INFO 10960 --- [ restartedMain] org.hibernate.Version : HHH000412: Hibernate Core {5.2.17.Final}
2018-08-15 16:24:44.369 INFO 10960 --- [ restartedMain] org.hibernate.cfg.Environment : HHH000206: hibernate.properties not found
2018-08-15 16:24:44.416 INFO 10960 --- [ restartedMain] o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations {5.0.1.Final}
2018-08-15 16:24:44.526 INFO 10960 --- [ restartedMain] org.hibernate.dialect.Dialect : HHH000400: Using dialect: org.hibernate.dialect.MySQL5Dialect
2018-08-15 16:24:45.246 INFO 10960 --- [ restartedMain] o.h.t.schema.internal.SchemaCreatorImpl : HHH000476: Executing import script 'org.hibernate.tool.schema.internal.exec.ScriptSourceInputNonExistentImpl#49cf4e94'
2018-08-15 16:24:45.262 INFO 10960 --- [ restartedMain] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
2018-08-15 16:24:46.058 INFO 10960 --- [ restartedMain] o.s.b.d.a.OptionalLiveReloadServer : LiveReload server is running on port 35729
2018-08-15 16:24:46.089 INFO 10960 --- [ restartedMain] o.s.j.e.a.AnnotationMBeanExporter : Registering beans for JMX exposure on startup
2018-08-15 16:24:46.089 INFO 10960 --- [ restartedMain] o.s.j.e.a.AnnotationMBeanExporter : Bean with name 'dataSource' has been autodetected for JMX exposure
2018-08-15 16:24:46.089 INFO 10960 --- [ restartedMain] o.s.j.e.a.AnnotationMBeanExporter : Located MBean 'dataSource': registering with JMX server as MBean [com.zaxxer.hikari:name=dataSource,type=HikariDataSource]
2018-08-15 16:24:46.105 INFO 10960 --- [ restartedMain] com.classpath.SampleAppApplication : Started SampleAppApplication in 4.437 seconds (JVM running for 4.942)
2018-08-15 16:24:46.121 INFO 10960 --- [ Thread-8] s.c.a.AnnotationConfigApplicationContext : Closing org.springframework.context.annotation.AnnotationConfigApplicationContext#699320b1: startup date [Wed Aug 15 16:24:42 IST 2018]; root of context hierarchy
2018-08-15 16:24:46.121 INFO 10960 --- [ Thread-8] o.s.j.e.a.AnnotationMBeanExporter : Unregistering JMX-exposed beans on shutdown
2018-08-15 16:24:46.121 INFO 10960 --- [ Thread-8] o.s.j.e.a.AnnotationMBeanExporter : Unregistering JMX-exposed beans
2018-08-15 16:24:46.121 INFO 10960 --- [ Thread-8] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default'
2018-08-15 16:24:46.121 INFO 10960 --- [ Thread-8] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated...
2018-08-15 16:24:46.121 INFO 10960 --- [ Thread-8] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed.
Process finished with exit code 0
Below is the dependencies added in the pom.xml file.
http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
com.classpath
sample-app
0.0.1-SNAPSHOT
jar
<name>sample-app</name>
<description>Demo project for Spring Boot</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.4.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
I am also adding the SpringBoot annotated class below
package com.classpath;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
#SpringBootApplication
public class SampleAppApplication {
public static void main(String[] args) {
SpringApplication.run(SampleAppApplication.class, args);
}
}
Please let me know where I am going wrong and how to debug this issue. Seems like Spring is doing too much magic here.
What about your database dependency? Configure an embedded database (H2, HSQL or Derby) or another relational database like oracle or mysql dependency inside pom.xml.
Example:
<dependency>
<groupId>org.hsqldb</groupId>
<artifactId>hsqldb</artifactId>
<scope>runtime</scope>
</dependency>