Uploaded image for project: 'ServiceMix'
  1. ServiceMix
  2. SM-1847

Executor service silently swallows any Errors being thrown from Runnable task

    XMLWordPrintableJSON

Details

    Description

      When an Error is thrown from within a Runnable submitted to the Executor service, the Error is silently ignored and there's even no log message for it.

      An example (i.e. the way I found out about this):
      If you write a custom FTP marshaler that used JAXB 2.1 and then run it on an early JDK 1.6 machine will give you a LinkageError. However, the Error is thrown from the marshaler operation in the processFile() method, but is never caught anywhere in the poller code (catches Exceptions but no Errors). In the end, the threadpool executor kills the thread but there's no trace of the Error

      I would suggest implementing a generic catch-log-and-rethrow-Throwable in the servicemix-utils ExecutorImpl to make sure we at least have some log entry to show the exceptions/errors

      Attachments

        Activity

          People

            gertvanthienen Gert Vanthienen
            gertvanthienen Gert Vanthienen
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: