-
Notifications
You must be signed in to change notification settings - Fork 41.1k
Suppress "Circular view path [error]" error message #2001
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
Comments
You also get a nasty error in the logs due to a circular view path:
|
If your goal is to disable Boot's custom error page entirely then you need to turn off @Configuration
@EnableAutoConfiguration(exclude=ErrorMvcAutoConfiguration.class)
public class Application {
} I'm going to leave this issue open as we may want to:
|
I'm facing this issue too. |
Looks great, thanks, but I won't be able to test it until next release |
You can always test a snapshot easily via https://start.spring.io. M3 is going to be released soon. |
I can't reproduce the issue as it was described with @wilkinsona can we do something about the warning in the logs? |
I'm not sure, but that's why I left this issue open |
+1 |
@wilkinsona Much like the original issue report we have On the frontend, you will indeed get a normal Tomcat error page. In the backend a nasty error will be logged. This is a majorly confusing error, although the documentation (https://docs.spring.io/spring-boot/docs/1.5.19.RELEASE/reference/html/howto-actuator.html) seems correct in mentioning that:
It is In my opinion, registering the
At the moment I use a hacky
Of course using
achieves the same. The behaviour is also still present in Spring Boot 2.1.3.RELEASE so a fix for the confusing error message might still be needed. All configuration changes seem like a bit of a hack for fixing a confusing error message. If you'd like a test project, I have one available to upload right away. Thoughts? |
@slyoldfox Thank you for the analysis. We're still not really sure exactly what to do about this one. If you have a test project to share that could help us to figure things out, that would be much appreciated. |
@wilkinsona Of course, here you go $ ./mvnw spring-boot:run Open up http://localhost:8080/hello Frontend will respond with an Internal Server Error with no whitelabel page as we disabled it with It makes sense if you take into account the remarks above (that spring will still try to lookup /error - even though the user might not have configured one), but in the end the ServletExceptions are just confusing and I'm sure something smarter can be done to work around them. Hope this helps! |
This comment has been minimized.
This comment has been minimized.
So, any out-of-box solution for this? Still reproducing on SB 2.6.3 |
@valkuc The solutions, such as they currently are, are described above. You already identified them in your description of #29919. |
@philwebb @wilkinsona This is most likely to be related to |
I am able to circumvent this issue in an ad-hoc manner by setting Edit: It seems this was identified and shared already in #29919 . |
2024, and still facing the problem with a controller throwing an exception in an application where whitelabel error pages are disabled. Adding |
project contains controller with function
and project calls
before main.
Browser displays white page. Expecting something more sensible. Tomcat default error handler would be perfect.
Using spring-boot 1.2.0.RC2.
The text was updated successfully, but these errors were encountered: