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

Exceptions thrown during AbstractApplicationContext.refresh() not being logged right when they are caught [SPR-12010] #16626

Closed
spring-projects-issues opened this issue Jul 18, 2014 · 1 comment
Assignees
Labels
in: core status: backported type: enhancement
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

@spring-projects-issues spring-projects-issues commented Jul 18, 2014

Juan Velez opened SPR-12010 and commented

During a refresh() is possible that some beans may throw exceptions which causes the catch(BeanException) block to be executed. In this block the exception is not logged right away which may lead to the exception itself never being reported. Consider the case we encountered where we had (unfortunately) a deadlock situation which only happened once the code in the catch(BeanException) was being executed. The end result was that the system came to a stop and there was no report of any failure because the logging of the exception by spring only happens after the exception is re-thrown


Affects: 3.1.3, 4.0.6

Issue Links:

  • #14634 Exception during context refresh swallowed by subsequent LifecycleProcessor exception handling
  • #18238 Revisit BeansException warn logging after startup failure

Backported to: 3.2.11

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Jul 22, 2014

Juergen Hoeller commented

Good point. We're logging such an exception before subsequently trying to cancel the refresh attempt now.

Juergen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core status: backported type: enhancement
Projects
None yet
Development

No branches or pull requests

2 participants