Exception in thread "task-2" java.lang.IllegalStateException: EntityManagerFactory is closed at org.hibernate.internal.SessionFactoryImpl.validateNotClosed(SessionFactoryImpl.java:509) at org.hibernate.internal.SessionFactoryImpl.getProperties(SessionFactoryImpl.java:503) at org.springframework.boot.autoconfigure.orm.jpa.DataSourceInitializedPublisher.findDataSource(DataSourceInitializedPublisher.java:105) at org.springframework.boot.autoconfigure.orm.jpa.DataSourceInitializedPublisher.publishEventIfRequired(DataSourceInitializedPublisher.java:97) at org.springframework.boot.autoconfigure.orm.jpa.DataSourceInitializedPublisher.access$100(DataSourceInitializedPublisher.java:50) at org.springframework.boot.autoconfigure.orm.jpa.DataSourceInitializedPublisher$DataSourceSchemaCreatedPublisher.lambda$postProcessEntityManagerFactory$0(DataSourceInitializedPublisher.java:200) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.lang.Thread.run(Thread.java:833) 2022-06-24 10:36:31.221 INFO 13376 --- [ restartedMain] o.s.s.concurrent.ThreadPoolTaskExecutor : Shutting down ExecutorService 'applicationTaskExecutor' 2022-06-24 10:36:31.450 WARN 13376 --- [ restartedMain] o.s.b.f.support.DisposableBeanAdapter : Invocation of destroy method failed on bean with name 'inMemoryDatabaseShutdownExecutor': org.h2.jdbc.JdbcSQLNonTransientConnectionException: Database is already closed (to disable automatic closing at VM shutdown, add ";DB_CLOSE_ON_EXIT=FALSE" to the db URL) [90121-200] 2022-06-24 10:36:31.450 INFO 13376 --- [ restartedMain] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated... 2022-06-24 10:36:31.454 INFO 13376 --- [ restartedMain] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed. 2022-06-24 10:36:31.459 INFO 13376 --- [ restartedMain] o.apache.catalina.core.StandardService : Stopping service [Tomcat] 2022-06-24 10:36:31.482 INFO 13376 --- [ restartedMain] ConditionEvaluationReportLoggingListener :
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. 2022-06-24 10:36:31.741 ERROR 13376 --- [ restartedMain] o.s.b.d.LoggingFailureAnalysisReporter :
APPLICATION FAILED TO START
Description:
Parameter 1 of constructor in br.com.alura.leilao.service.GeradorDePagamento required a bean of type 'java.time.Clock' that could not be found.
Action:
Consider defining a bean of type 'java.time.Clock' in your configuration.