eclipse-ee4j / jersey

Eclipse Jersey Project - Read our Wiki:
https://github.com/eclipse-ee4j/jersey/wiki
Other
691 stars 352 forks source link

AsyncResponse.resume(Throwable) loses stack traces #3476

Open jerseyrobot opened 7 years ago

jerseyrobot commented 7 years ago

If an unmappable exception is passed to AsyncResponse.resume(Throwable), the stack trace is lost.

I believe this incorrect behavior was introduced by #1902, which adjusted ServerRuntime.Responder.process to log exceptions at a FINE level rather than SEVERE. I think that change was good for the synchronous case where the exception will ultimately be rethrown to the caller for logging by the application or servlet container. However, for the asynchronous case, ServerRuntime.AsyncResponder.resume swallows the exception rethrown from process (correctly), which means the stack trace is lost. I believe this flow should be adjusted so that unmappable exceptions passed to AsyncResponse.resume(Throwable) are again logged with a SEVERE level.

Affected Versions

[2.23.2]

jerseyrobot commented 6 years ago
jerseyrobot commented 7 years ago

@glassfishrobot Commented Reported by bjkail

jerseyrobot commented 7 years ago

@glassfishrobot Commented This issue was imported from java.net JIRA JERSEY-3204