Comments (5)
@ResponseStatus(HttpStatus.NOT_FOUND)
@ResponseBody
public ErrorMessage processNoHandlerFoundException(NoHandlerFoundException ex) {
log.warn("NoHandlerFoundException not found: ", ex);
return ErrorMessage.builder()
.error(ex.getMessage())
.build();
}
@ControllerAdvice like this helps. Where ErrorMessage just POJO with String error field.
from spring-boot.
Thanks for the report. I can see from the stack trace that there are a number of filters involved in the processing of the request but I can't tell what they are based on the information provided thus far. Can you please provide a minimal sample that reproduces the problem so that we can see exactly what's involved?
from spring-boot.
Well I'm trying to. But it seems not so easy cant reproduce it yet in sandbox, But I've found out that this issue disappears if I remove controller advice completely also in this case I've got standard error output from Spring.
Filters
from spring-boot.
processUnhandledError:209, ExceptionsController (platform.api.controller.error)
invokeVirtual:-1, LambdaForm$DMH/0x0000706958080c00 (java.lang.invoke)
invoke:-1, LambdaForm$MH/0x00007069588c8800 (java.lang.invoke)
invokeExact_MT:-1, LambdaForm$MH/0x0000706958002800 (java.lang.invoke)
invokeImpl:155, DirectMethodHandleAccessor (jdk.internal.reflect)
invoke:103, DirectMethodHandleAccessor (jdk.internal.reflect)
invoke:580, Method (java.lang.reflect)
doInvoke:255, InvocableHandlerMethod (org.springframework.web.method.support)
invokeForRequest:188, InvocableHandlerMethod (org.springframework.web.method.support)
invokeAndHandle:118, ServletInvocableHandlerMethod (org.springframework.web.servlet.mvc.method.annotation)
doResolveHandlerMethodException:432, ExceptionHandlerExceptionResolver (org.springframework.web.servlet.mvc.method.annotation)
doResolveException:74, AbstractHandlerMethodExceptionResolver (org.springframework.web.servlet.handler)
resolveException:175, AbstractHandlerExceptionResolver (org.springframework.web.servlet.handler)
resolveException:80, HandlerExceptionResolverComposite (org.springframework.web.servlet.handler)
processHandlerException:1357, DispatcherServlet (org.springframework.web.servlet)
processDispatchResult:1160, DispatcherServlet (org.springframework.web.servlet)
doDispatch:1106, DispatcherServlet (org.springframework.web.servlet)
doService:979, DispatcherServlet (org.springframework.web.servlet)
processRequest:1014, FrameworkServlet (org.springframework.web.servlet)
doPost:914, FrameworkServlet (org.springframework.web.servlet)
service:590, HttpServlet (jakarta.servlet.http)
service:885, FrameworkServlet (org.springframework.web.servlet)
service:658, HttpServlet (jakarta.servlet.http)
internalDoFilter:206, ApplicationFilterChain (org.apache.catalina.core)
doFilter:150, ApplicationFilterChain (org.apache.catalina.core)
doFilter:51, WsFilter (org.apache.tomcat.websocket.server)
internalDoFilter:175, ApplicationFilterChain (org.apache.catalina.core)
doFilter:150, ApplicationFilterChain (org.apache.catalina.core)
doFilter:101, OncePerRequestFilter (org.springframework.web.filter)
internalDoFilter:175, ApplicationFilterChain (org.apache.catalina.core)
doFilter:150, ApplicationFilterChain (org.apache.catalina.core)
doFilter:110, OncePerRequestFilter (org.springframework.web.filter)
internalDoFilter:175, ApplicationFilterChain (org.apache.catalina.core)
doFilter:150, ApplicationFilterChain (org.apache.catalina.core)
doFilter:101, OncePerRequestFilter (org.springframework.web.filter)
internalDoFilter:175, ApplicationFilterChain (org.apache.catalina.core)
doFilter:150, ApplicationFilterChain (org.apache.catalina.core)
doFilter:101, OncePerRequestFilter (org.springframework.web.filter)
internalDoFilter:175, ApplicationFilterChain (org.apache.catalina.core)
doFilter:150, ApplicationFilterChain (org.apache.catalina.core)
invoke:653, ApplicationDispatcher (org.apache.catalina.core)
processRequest:419, ApplicationDispatcher (org.apache.catalina.core)
doForward:340, ApplicationDispatcher (org.apache.catalina.core)
forward:277, ApplicationDispatcher (org.apache.catalina.core)
renderMergedOutputModel:171, InternalResourceView (org.springframework.web.servlet.view)
render:314, AbstractView (org.springframework.web.servlet.view)
render:1431, DispatcherServlet (org.springframework.web.servlet)
processDispatchResult:1167, DispatcherServlet (org.springframework.web.servlet)
doDispatch:1106, DispatcherServlet (org.springframework.web.servlet)
doService:979, DispatcherServlet (org.springframework.web.servlet)
processRequest:1014, FrameworkServlet (org.springframework.web.servlet)
doPost:914, FrameworkServlet (org.springframework.web.servlet)
service:590, HttpServlet (jakarta.servlet.http)
service:885, FrameworkServlet (org.springframework.web.servlet)
service:658, HttpServlet (jakarta.servlet.http)
internalDoFilter:206, ApplicationFilterChain (org.apache.catalina.core)
doFilter:150, ApplicationFilterChain (org.apache.catalina.core)
doFilter:51, WsFilter (org.apache.tomcat.websocket.server)
internalDoFilter:175, ApplicationFilterChain (org.apache.catalina.core)
doFilter:150, ApplicationFilterChain (org.apache.catalina.core)
doFilterInternal:47, WebConfig$1 (io.onetouch.platform.api)
doFilter:116, OncePerRequestFilter (org.springframework.web.filter)
internalDoFilter:175, ApplicationFilterChain (org.apache.catalina.core)
doFilter:150, ApplicationFilterChain (org.apache.catalina.core)
doFilterInternal:100, RequestContextFilter (org.springframework.web.filter)
doFilter:116, OncePerRequestFilter (org.springframework.web.filter)
internalDoFilter:175, ApplicationFilterChain (org.apache.catalina.core)
doFilter:150, ApplicationFilterChain (org.apache.catalina.core)
doFilterInternal:93, FormContentFilter (org.springframework.web.filter)
doFilter:116, OncePerRequestFilter (org.springframework.web.filter)
internalDoFilter:175, ApplicationFilterChain (org.apache.catalina.core)
doFilter:150, ApplicationFilterChain (org.apache.catalina.core)
doFilter:69, OpenTelemetryHandlerMappingFilter (org.springframework.web.servlet.v6_0)
internalDoFilter:175, ApplicationFilterChain (org.apache.catalina.core)
doFilter:150, ApplicationFilterChain (org.apache.catalina.core)
doFilterInternal:109, ServerHttpObservationFilter (org.springframework.web.filter)
doFilter:116, OncePerRequestFilter (org.springframework.web.filter)
internalDoFilter:175, ApplicationFilterChain (org.apache.catalina.core)
doFilter:150, ApplicationFilterChain (org.apache.catalina.core)
doFilterInternal:201, CharacterEncodingFilter (org.springframework.web.filter)
doFilter:116, OncePerRequestFilter (org.springframework.web.filter)
internalDoFilter:175, ApplicationFilterChain (org.apache.catalina.core)
doFilter:150, ApplicationFilterChain (org.apache.catalina.core)
invoke:167, StandardWrapperValve (org.apache.catalina.core)
invoke:90, StandardContextValve (org.apache.catalina.core)
invoke:482, AuthenticatorBase (org.apache.catalina.authenticator)
invoke:115, StandardHostValve (org.apache.catalina.core)
invoke:93, ErrorReportValve (org.apache.catalina.valves)
invoke:74, StandardEngineValve (org.apache.catalina.core)
service:344, CoyoteAdapter (org.apache.catalina.connector)
service:391, Http11Processor (org.apache.coyote.http11)
process:63, AbstractProcessorLight (org.apache.coyote)
process:896, AbstractProtocol$ConnectionHandler (org.apache.coyote)
doRun:1736, NioEndpoint$SocketProcessor (org.apache.tomcat.util.net)
run:52, SocketProcessorBase (org.apache.tomcat.util.net)
runWorker:1191, ThreadPoolExecutor (org.apache.tomcat.util.threads)
run:659, ThreadPoolExecutor$Worker (org.apache.tomcat.util.threads)
run:63, TaskThread$WrappingRunnable (org.apache.tomcat.util.threads)
runWith:1596, Thread (java.lang)
run:1583, Thread (java.lang)
full stack with 2 iterations
from spring-boot.
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.
from spring-boot.
Related Issues (20)
- The logback xml <springProfile> element is no longer working from included xml. HOT 2
- Spring devtools not shutdown connection pool on restart HOT 1
- Renew trust material for SSL tests HOT 1
- In Spring Boot version 3.2.5 tables are not auto generating under defined DB name although DB mentioned in properties file is created. HOT 1
- Introduce an ApplicationProperties class so that we can stop binding directly to SpringApplication
- Whitespace is not correctly trimmed when generating configuration properties metadata from records
- Allow group description metadata to be generate by the configuration properties annotation processor
- Upgrade Ubuntu version in CI images
- Upgrade CI to Docker 26.1.1
- Renew trust material for SSL tests
- Upgrade to antora-zip-contents-collector-extension 1.0.0-alpha.8
- JarUrlConnection.getPermission() can throw NullPointerException if jarFileConnection is null
- Remove reassignments for builders in GraphQL auto-configurations
- Remove reassignments for builders in GraphQL auto-configurations
- Renew trust material for SSL tests
- Help information for spring init's build option has the wrong default
- Help information for spring init's build option has the wrong default
- Clarify devtools restart class loader
- Clarify devtools restart class loader
- AnsiOutput.detectIfAnsiCapable broken on JDK22
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spring-boot.