triples13
triples13

Reputation: 216

Spring boot application startup stuck loading hibernate files

I am using spring boot application with hibernate to connect to postgressql, but when I am running my application with run as spring boot app the starting of server is stuck with loading hibernate files application startup stuck loading hibernate files without any error, I am stuck on this and it's not also showing any error. Does anyone have any idea?

Upvotes: 1

Views: 2916

Answers (3)

Ivy Gorven
Ivy Gorven

Reputation: 145

If you are using JPA, check your repository configuration. Spring can spend a very long time scanning for JPA repositories if you don't have basePackages or basePackageClasses set in your @EnableJpaRepositories annotation (this can be added by JpaRepositoriesAutoConfiguration if your setup meets that class's @ConditionalOn requirements).

Upvotes: 0

triples13
triples13

Reputation: 216

There was another instance of Postgresql server was running and i was also not able to kiss the process that's why the application was stuck, i restarted my system and its working fine

Upvotes: 0

Jeeppp
Jeeppp

Reputation: 1573

Add the following to your app properties

spring.jpa.properties.hibernate.temp.use_jdbc_metadata_defaults=false

or in your code the below

properties.setProperty("hibernate.temp.use_jdbc_metadata_defaults", "false");

Hope it helps!

Upvotes: 2

Related Questions