-
Notifications
You must be signed in to change notification settings - Fork 41.1k
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
Show stacktraces for context startup failures #13556
Comments
Stack traces or failure analysis should already be shown. Can you please provide a sample where this does not happen? |
Ok, I see what you are referring to. After a lot of debugging I finally figured out what the issue is. I am including a dependency that includes Long story short, I put a dependencySubstitution in my build.gradle to use I'm thinking that there should be a better way of doing this so that no one else encounters this issue which was very difficult to debug. |
Using Spring Boot 2.0.3.RELEASE and executing application using Spring Boot fat jar with
java -jar
.If the application context fails to startup for some reason (for example, a
@Bean
method throws an exception), I get no stacktrace information. The only log of the error that I get is a warning that just includes the toString() of the exception (logged inAbstractApplicationContext.refresh()
). I just have a simplemain
setup like this:The only way the I can get more useful information is to wrap the call to
SpringApplication.run()
in a try/catch and log my own exception.The text was updated successfully, but these errors were encountered: