You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@batchee.apache.org by "Romain Manni-Bucau (Jira)" <ji...@apache.org> on 2020/03/06 11:08:00 UTC
[jira] [Assigned] (BATCHEE-136) Errors thrown in JobListeners
aren't printed at all
[ https://issues.apache.org/jira/browse/BATCHEE-136?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Romain Manni-Bucau reassigned BATCHEE-136:
------------------------------------------
Assignee: Romain Manni-Bucau
> Errors thrown in JobListeners aren't printed at all
> ---------------------------------------------------
>
> Key: BATCHEE-136
> URL: https://issues.apache.org/jira/browse/BATCHEE-136
> Project: BatchEE
> Issue Type: Bug
> Components: jbatch-core
> Affects Versions: 0.5-incubating
> Reporter: Christian Berger
> Assignee: Romain Manni-Bucau
> Priority: Major
>
> Unfortunately, BatchEE does not log exceptions occurred in JobListener properly. In
> {code:java}
> JobThreadRootController{code}
> the responsible code looks like this:
>
> {code:java}
> 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();
> }
> ....
> }
> {code}
> 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 ..
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)