Uploaded image for project: 'BatchEE'
  1. BatchEE
  2. BATCHEE-136

Errors thrown in JobListeners aren't printed at all

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.5-incubating
    • 0.6
    • jbatch-core
    • 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 ..

       

      Attachments

        Activity

          People

            romain.manni-bucau Romain Manni-Bucau
            chberger Christian Berger
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: