You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicemix.apache.org by "Manuel EVENO (JIRA)" <ji...@apache.org> on 2008/07/22 11:16:00 UTC
[jira] Created: (SM-1473) Camel Service Engine Component not
handling error from Camel processing
Camel Service Engine Component not handling error from Camel processing
-----------------------------------------------------------------------
Key: SM-1473
URL: https://issues.apache.org/activemq/browse/SM-1473
Project: ServiceMix
Issue Type: Bug
Components: servicemix-camel
Affects Versions: 3.2.1, 3.2.2
Environment: ServiceMix 3.2.1
ServiceMix-Camel 3.2.2-SNAPSHOT
Camel 1.4-SNAPSHOT
Reporter: Manuel EVENO
When an exception occured in camel processor, the message exchange is sent back to the NMR without taking care of its failed status.
ServiceMix MessageExchange ends in Done status instead of Error.
The probably incorrect code is in CamelJbiEndpoint.handleActiveProviderExchange() :
After calling "camelProcessor.process(camelExchange);", the method sould have a look at camelExchange.isFailed()
and filling exchange with correct status and exception before calling "send(exchange);".
http://svn.apache.org/repos/asf/servicemix/components/engines/servicemix-camel/trunk/src/main/java/org/apache/servicemix/camel/CamelJbiEndpoint.java
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (SM-1473) Camel Service Engine Component not
handling error from Camel processing
Posted by "Guillaume Nodet (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/SM-1473?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Guillaume Nodet resolved SM-1473.
---------------------------------
Assignee: Guillaume Nodet
Fix Version/s: 3.3
Resolution: Fixed
Sending src/main/java/org/apache/servicemix/camel/CamelJbiEndpoint.java
Sending src/test/java/org/apache/servicemix/camel/JbiInOnlyTest.java
Transmitting file data ..
Committed revision 691630.
> Camel Service Engine Component not handling error from Camel processing
> -----------------------------------------------------------------------
>
> Key: SM-1473
> URL: https://issues.apache.org/activemq/browse/SM-1473
> Project: ServiceMix
> Issue Type: Bug
> Components: servicemix-camel
> Affects Versions: 3.2.1, 3.2.2
> Environment: ServiceMix 3.2.1
> ServiceMix-Camel 3.2.2-SNAPSHOT
> Camel 1.4-SNAPSHOT
> Reporter: Manuel EVENO
> Assignee: Guillaume Nodet
> Fix For: 3.3
>
>
> When an exception occured in camel processor, the message exchange is sent back to the NMR without taking care of its failed status.
> ServiceMix MessageExchange ends in Done status instead of Error.
> The probably incorrect code is in CamelJbiEndpoint.handleActiveProviderExchange() :
> After calling "camelProcessor.process(camelExchange);", the method sould have a look at camelExchange.isFailed()
> and filling exchange with correct status and exception before calling "send(exchange);".
> http://svn.apache.org/repos/asf/servicemix/components/engines/servicemix-camel/trunk/src/main/java/org/apache/servicemix/camel/CamelJbiEndpoint.java
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (SM-1473) Camel Service Engine Component not
handling error from Camel processing
Posted by "Guillaume Nodet (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/SM-1473?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Guillaume Nodet resolved SM-1473.
---------------------------------
Fix Version/s: 3.2.3
Resolution: Fixed
Fix for 3.2 branch
Sending servicemix-camel/src/main/java/org/apache/servicemix/camel/CamelJbiEndpoint.java
Transmitting file data .
Committed revision 691885.
> Camel Service Engine Component not handling error from Camel processing
> -----------------------------------------------------------------------
>
> Key: SM-1473
> URL: https://issues.apache.org/activemq/browse/SM-1473
> Project: ServiceMix
> Issue Type: Bug
> Components: servicemix-camel
> Affects Versions: 3.2.1, 3.2.2
> Environment: ServiceMix 3.2.1
> ServiceMix-Camel 3.2.2-SNAPSHOT
> Camel 1.4-SNAPSHOT
> Reporter: Manuel EVENO
> Assignee: Guillaume Nodet
> Fix For: 3.2.3, 3.3
>
>
> When an exception occured in camel processor, the message exchange is sent back to the NMR without taking care of its failed status.
> ServiceMix MessageExchange ends in Done status instead of Error.
> The probably incorrect code is in CamelJbiEndpoint.handleActiveProviderExchange() :
> After calling "camelProcessor.process(camelExchange);", the method sould have a look at camelExchange.isFailed()
> and filling exchange with correct status and exception before calling "send(exchange);".
> http://svn.apache.org/repos/asf/servicemix/components/engines/servicemix-camel/trunk/src/main/java/org/apache/servicemix/camel/CamelJbiEndpoint.java
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (SM-1473) Camel Service Engine Component not
handling error from Camel processing
Posted by "Ron Gavlin (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/SM-1473?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45370#action_45370 ]
Ron Gavlin commented on SM-1473:
--------------------------------
Would it be possible to also commit this fix to the smx 3.2.x branch?
> Camel Service Engine Component not handling error from Camel processing
> -----------------------------------------------------------------------
>
> Key: SM-1473
> URL: https://issues.apache.org/activemq/browse/SM-1473
> Project: ServiceMix
> Issue Type: Bug
> Components: servicemix-camel
> Affects Versions: 3.2.1, 3.2.2
> Environment: ServiceMix 3.2.1
> ServiceMix-Camel 3.2.2-SNAPSHOT
> Camel 1.4-SNAPSHOT
> Reporter: Manuel EVENO
> Assignee: Guillaume Nodet
> Fix For: 3.3
>
>
> When an exception occured in camel processor, the message exchange is sent back to the NMR without taking care of its failed status.
> ServiceMix MessageExchange ends in Done status instead of Error.
> The probably incorrect code is in CamelJbiEndpoint.handleActiveProviderExchange() :
> After calling "camelProcessor.process(camelExchange);", the method sould have a look at camelExchange.isFailed()
> and filling exchange with correct status and exception before calling "send(exchange);".
> http://svn.apache.org/repos/asf/servicemix/components/engines/servicemix-camel/trunk/src/main/java/org/apache/servicemix/camel/CamelJbiEndpoint.java
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (SM-1473) Camel Service Engine Component not
handling error from Camel processing
Posted by "Manuel EVENO (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/SM-1473?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=44432#action_44432 ]
Manuel EVENO commented on SM-1473:
----------------------------------
A possible workaround consists in creating an ErrorProcessor that handles status :
{code:java}
public final class ErrorProcessor implements Processor {
private static final Logger logger = Logger.getLogger(ErrorProcessor.class);
public void process(Exchange exchange) throws Exception {
if (logger.isDebugEnabled()) {
logger.debug("Trying to find an exception in property: " + DeadLetterChannel.EXCEPTION_CAUSE_PROPERTY);
}
Throwable exception = (Throwable) exchange.getProperty(DeadLetterChannel.EXCEPTION_CAUSE_PROPERTY);
if (exception != null) {
exchange.setException(exception);
} else {
logger.debug("Trying to find an exception using: DeadLetterChannel.restoreExceptionOnExchange()");
DeadLetterChannel.restoreExceptionOnExchange(exchange);
}
exception = exchange.getException();
if (logger.isDebugEnabled()) {
logger.debug("Exchange exception is " + exception);
logger.debug("Exchange.isFailed()=" + exchange.isFailed());
}
if (exception != null && exchange instanceof JbiExchange) {
logger.info("An exception has occured, setting ServiceMix messageExchange status to Error");
MessageExchangeImpl messageExchange = (MessageExchangeImpl) ((JbiExchange) exchange).getMessageExchange();
messageExchange.setStatus(ExchangeStatus.ERROR);
if (exception instanceof Exception) {
messageExchange.setError((Exception)exception);
} else {
messageExchange.setError(new Exception(exception));
}
}
}
}
{code}
And setting it to the deadLetterChannel as the final endpoint :
{code:java}
deadLetterChannel.setDefaultDeadLetterEndpoint(new ErrorProcessor());
{code}
> Camel Service Engine Component not handling error from Camel processing
> -----------------------------------------------------------------------
>
> Key: SM-1473
> URL: https://issues.apache.org/activemq/browse/SM-1473
> Project: ServiceMix
> Issue Type: Bug
> Components: servicemix-camel
> Affects Versions: 3.2.1, 3.2.2
> Environment: ServiceMix 3.2.1
> ServiceMix-Camel 3.2.2-SNAPSHOT
> Camel 1.4-SNAPSHOT
> Reporter: Manuel EVENO
>
> When an exception occured in camel processor, the message exchange is sent back to the NMR without taking care of its failed status.
> ServiceMix MessageExchange ends in Done status instead of Error.
> The probably incorrect code is in CamelJbiEndpoint.handleActiveProviderExchange() :
> After calling "camelProcessor.process(camelExchange);", the method sould have a look at camelExchange.isFailed()
> and filling exchange with correct status and exception before calling "send(exchange);".
> http://svn.apache.org/repos/asf/servicemix/components/engines/servicemix-camel/trunk/src/main/java/org/apache/servicemix/camel/CamelJbiEndpoint.java
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Reopened: (SM-1473) Camel Service Engine Component not
handling error from Camel processing
Posted by "Guillaume Nodet (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/SM-1473?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Guillaume Nodet reopened SM-1473:
---------------------------------
> Camel Service Engine Component not handling error from Camel processing
> -----------------------------------------------------------------------
>
> Key: SM-1473
> URL: https://issues.apache.org/activemq/browse/SM-1473
> Project: ServiceMix
> Issue Type: Bug
> Components: servicemix-camel
> Affects Versions: 3.2.1, 3.2.2
> Environment: ServiceMix 3.2.1
> ServiceMix-Camel 3.2.2-SNAPSHOT
> Camel 1.4-SNAPSHOT
> Reporter: Manuel EVENO
> Assignee: Guillaume Nodet
> Fix For: 3.2.3, 3.3
>
>
> When an exception occured in camel processor, the message exchange is sent back to the NMR without taking care of its failed status.
> ServiceMix MessageExchange ends in Done status instead of Error.
> The probably incorrect code is in CamelJbiEndpoint.handleActiveProviderExchange() :
> After calling "camelProcessor.process(camelExchange);", the method sould have a look at camelExchange.isFailed()
> and filling exchange with correct status and exception before calling "send(exchange);".
> http://svn.apache.org/repos/asf/servicemix/components/engines/servicemix-camel/trunk/src/main/java/org/apache/servicemix/camel/CamelJbiEndpoint.java
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (SM-1473) Camel Service Engine Component not
handling error from Camel processing
Posted by "Guillaume Nodet (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/SM-1473?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Guillaume Nodet updated SM-1473:
--------------------------------
Fix Version/s: servicemix-camel-2008.01
> Camel Service Engine Component not handling error from Camel processing
> -----------------------------------------------------------------------
>
> Key: SM-1473
> URL: https://issues.apache.org/activemq/browse/SM-1473
> Project: ServiceMix
> Issue Type: Bug
> Components: servicemix-camel
> Affects Versions: 3.2.1, 3.2.2
> Environment: ServiceMix 3.2.1
> ServiceMix-Camel 3.2.2-SNAPSHOT
> Camel 1.4-SNAPSHOT
> Reporter: Manuel EVENO
> Assignee: Guillaume Nodet
> Fix For: 3.2.3, 3.3, servicemix-camel-2008.01
>
>
> When an exception occured in camel processor, the message exchange is sent back to the NMR without taking care of its failed status.
> ServiceMix MessageExchange ends in Done status instead of Error.
> The probably incorrect code is in CamelJbiEndpoint.handleActiveProviderExchange() :
> After calling "camelProcessor.process(camelExchange);", the method sould have a look at camelExchange.isFailed()
> and filling exchange with correct status and exception before calling "send(exchange);".
> http://svn.apache.org/repos/asf/servicemix/components/engines/servicemix-camel/trunk/src/main/java/org/apache/servicemix/camel/CamelJbiEndpoint.java
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.