You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicemix.apache.org by "Gert Vanthienen (JIRA)" <ji...@apache.org> on 2009/04/15 22:12:32 UTC

[jira] Created: (SM-1847) Executor service silently swallows any Errors being thrown from Runnable task

Executor service silently swallows any Errors being thrown from Runnable task
-----------------------------------------------------------------------------

                 Key: SM-1847
                 URL: https://issues.apache.org/activemq/browse/SM-1847
             Project: ServiceMix
          Issue Type: Bug
          Components: servicemix-utils
    Affects Versions: 3.3, 3.2.3
            Reporter: Gert Vanthienen


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

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (SM-1847) Executor service silently swallows any Errors being thrown from Runnable task

Posted by "Jean-Baptiste Onofré (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/SM-1847?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jean-Baptiste Onofré reassigned SM-1847:
----------------------------------------

    Assignee: Jean-Baptiste Onofré

> Executor service silently swallows any Errors being thrown from Runnable task
> -----------------------------------------------------------------------------
>
>                 Key: SM-1847
>                 URL: https://issues.apache.org/activemq/browse/SM-1847
>             Project: ServiceMix
>          Issue Type: Bug
>          Components: servicemix-utils
>    Affects Versions: 3.2.3, 3.3
>            Reporter: Gert Vanthienen
>            Assignee: Jean-Baptiste Onofré
>
> 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

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SM-1847) Executor service silently swallows any Errors being thrown from Runnable task

Posted by "Jean-Baptiste Onofré (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/SM-1847?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=52056#action_52056 ] 

Jean-Baptiste Onofré commented on SM-1847:
------------------------------------------

I will create an inner class into ExcecutorImpl that implements Runnable. This class will be responsible of exceptions catch and log.

> Executor service silently swallows any Errors being thrown from Runnable task
> -----------------------------------------------------------------------------
>
>                 Key: SM-1847
>                 URL: https://issues.apache.org/activemq/browse/SM-1847
>             Project: ServiceMix
>          Issue Type: Bug
>          Components: servicemix-utils
>    Affects Versions: 3.2.3, 3.3
>            Reporter: Gert Vanthienen
>            Assignee: Jean-Baptiste Onofré
>
> 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

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.