Jesse Sightler created CAMEL-13139:
--------------------------------------
Summary: ModelCamelContext.setTracing(true) makes Camel Salesforce
APEX calls fragile
Key: CAMEL-13139
URL: https://issues.apache.org/jira/browse/CAMEL-13139
Project: Camel
Issue Type: Bug
Components: camel-salesforce
Affects Versions: 2.23.1
Reporter: Jesse Sightler
We were having an issue with a process hanging on Salesforce APEX REST calls.
It turns out that the key factor was whether or not tracing was enabled.
It isn't clear to me as to what the correct fix is, but this code change works
around the problem:
{quote}---
a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/processor/JsonRestProcessor.java
+++
b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/processor/JsonRestProcessor.java
@@ -188,6 +188,7 @@ public class JsonRestProcessor extends
AbstractRestProcessor {
// if an exception is reported we should not loose it
if (shouldReport(ex)) {
exchange.setException(ex);
+ out.setBody("");
}
} else if (responseEntity != null) {
// do we need to un-marshal a response
{quote}
All of the cases of it hanging were when there were exceptions thrown by the
service.
Basically if the body of the out message is set, then it doesn't hang. I can
provide more details if need be as well.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)