Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deferred Init of Repositories Hangs under SB 2.3.0 Release & Surefire [DATAJPA-1731] #2026

Closed
spring-projects-issues opened this issue May 21, 2020 · 4 comments
Assignees
Labels
status: duplicate A duplicate of another issue type: bug A general bug

Comments

@spring-projects-issues
Copy link

springframeworkguru opened DATAJPA-1731 and commented

After updating project to Spring Boot 2.3.0, Spring Data JPA is hanging on deferred initialization of repositories when executing tests under Maven Surefire. 

If property spring.data.jpa.repositories.bootstrap-mode is set to lazy, tests under surefire will pass, but application will hang on startup. 

If spring.data.jpa.repositories.bootstrap-mode is set to default tests will pass, and application will startup normally. 

Running tests via IntelliJ seems to work normally for any setting. 

Example project here: https://github.com/springframeworkguru/mssc-beer-service

Was working fine under Spring Boot 2.2.x. Only started happening under Spring Boot 2.3.0. 


No further details from DATAJPA-1731

@spring-projects-issues
Copy link
Author

Jens Schauder commented

Thanks for raising the issue.

There is a lot going on in that application.

Could track the hanging call down to https://github.com/spring-projects/spring-boot/blob/ed4a7d4ba023a6e191c9d417a26842188a5a3241/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/orm/jpa/DataSourceInitializedPublisher.java#L199 but then lost track.

I'll try to get a second pair of eyes on this.

But it would definitely help if you could simplify the example so we get a better idea what is causing the problem.

 

@spring-projects-issues
Copy link
Author

springframeworkguru commented

Thanks - yeah, its a project from one of my courses. I have some other projects I'm updating to 2.3.0, I'll see if I can find a simpler example. 

@spring-projects-issues
Copy link
Author

springframeworkguru commented

I have two similar projects showing the same behavior - I can share if helpful (roughly same level of complexity though)

Saw this issue in the 2.3.0 release notes, looks like 'default' is no longer 'default', but 'deferred' is the new default autoconfig value. 
spring-projects/spring-boot#16230

Explains why I started to see this behavior with the upgrade

@spring-projects-issues
Copy link
Author

Jens Schauder commented

Thanks, but I don't think more examples with the same complexity are of much help.

The problem seems to be caused in Spring Framework proper. So I'm going to close this issue here.

Please monitor spring-projects/spring-framework#25111 for updates

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: duplicate A duplicate of another issue type: bug A general bug
Projects
None yet
Development

No branches or pull requests

2 participants