Affects Version/s: 3.4.0
- Spring Boot 2.3.4.RELEASE
- Apache CXF 3.4.0 (using the new BOM + reactor extension)
- Undertow (latest from spring boot bom)
- Jackson (latest from spring boot bom)
- JDK 11
We use CXF instead of Spring for all Mono/Flux REST endpoints. Outside of the error handling, everything works great.
It looks like we have similar/continuing issues as originally outlined in
Two issues I have are:
- Flux "error" returns a mixed response
- Mono that returns empty seems to hang on thread and never return.
These are super important for us because it makes handling exceptions somewhat difficult (if there is a workaround that would be acceptable too as this is only with errors) and empty mono results, which can happen, unhandleable. We have a lot invested in using CXF as we start to move to Kamel and eventually Quarkus later and would not want to use Spring controllers.
Using this test, when an exception is thrown from within a step in the stream the expectation is to get the error response only (handled by an ExceptionMapper). Most cases this is true.
This appears to happen only with a Flux and if the error is thrown before the last step in the chain (i.e. call a --> call b --> call c). If there are multiple steps it appears the last one will return an error correctly, in the example call a and call b would return the mixed response where as call c returns the error correctly.
Using this code (replica code in the original issue
Returns this result (error):
Also, as a side node, I seem to have a similar problem with an empty Mono (whereas the ticket above the problem was in the Flux)
This will hang and not return a result. Pausing it while debugging shows it holding up on a Thread parking...