Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
0.5-incubating
-
None
Description
Unfortunately, BatchEE does not log exceptions occurred in JobListener properly. In
JobThreadRootController
the responsible code looks like this:
protected void endOfJob() { // 1. Execute the very last artifacts (jobListener) try { jobListenersAfterJob(); } catch (Throwable t) { final StringWriter sw = new StringWriter(); final PrintWriter pw = new PrintWriter(sw); t.printStackTrace(pw); batchStatusFailedFromException(); } .... }
However, as you can see the throwable caught won't be logged. Not even to stdout, since this unused print writer is used . Please log the exception with the help of the given logger ..