[jira] [Commented] (CAMEL-16624) camel-salesforce - Replace Map Options with Multivalue

2022-09-08 Thread Hemang Ajmera (Jira)


[ 
https://issues.apache.org/jira/browse/CAMEL-16624?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17601762#comment-17601762
 ] 

Hemang Ajmera commented on CAMEL-16624:
---

I do not remember for sure since lately I am not working on camel. It could be 
either, I just happened to notice initialReplayIdMap also, so added to jira.

But if I remember correctly, initialReplayIdMap  can be used to set different 
values of replay Id for different topics.

> camel-salesforce - Replace Map Options with Multivalue
> --
>
> Key: CAMEL-16624
> URL: https://issues.apache.org/jira/browse/CAMEL-16624
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-salesforce
>Affects Versions: 3.9.0
>Reporter: Hemang Ajmera
>Priority: Minor
> Fix For: 3.x
>
>
> We should replace Map with Multi Value, so that they can be initialized in 
> URI sting.
>  
> Please refer to 
> [https://camel.zulipchat.com/#narrow/stream/257298-camel/topic/set.20Map.20option/near/239077029]
>  for details
>  
> The Map options in Salesforce Component are
>  # apexQueryParams
>  # initialReplayIdMap
>  
> If there is quick way to find all the options in other component which is 
> Map, then this Jira can be extended to convert them all.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (CAMEL-16370) Camel Salesforce component unable to reconnect after disconnect from Salesforce

2021-10-20 Thread Hemang Ajmera (Jira)


[ 
https://issues.apache.org/jira/browse/CAMEL-16370?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17431198#comment-17431198
 ] 

Hemang Ajmera commented on CAMEL-16370:
---

Other related issues are CAMEL-12871 and CAMEL-12484

> Camel Salesforce component unable to reconnect after disconnect from 
> Salesforce
> ---
>
> Key: CAMEL-16370
> URL: https://issues.apache.org/jira/browse/CAMEL-16370
> Project: Camel
>  Issue Type: Bug
>  Components: camel-salesforce
>Affects Versions: 3.8.0
> Environment: Running in a spring-boot (v2.1.18.RELEASE) app in a 
> linux container deployed to openshift 3.11
>Reporter: Jason
>Priority: Major
> Fix For: 3.x
>
>
> We are consuming Salesforce platform-events following the documented 
> recommendations and our connection will not reconnect after being 
> disconnected, apparently, from Salesforce.  I am not quite certain as to the 
> circumstances that Salesforce sends some sort of disconnect signal, but that 
> is what's logged from the SubscriptionHelper class. Our initial connection to 
> Salesforce is successful and we are able to receive platform-events up until 
> the point of the spontaneous disconnection.  Re-connection fails consistently 
> and always in the same way.  Logging is slightly different across version, 
> but the behavior seems to always be the same.
> Our only work around for this is to run our service consuming this message 
> like a cron job and restart it every 15 minutes (period we settled on through 
> experimentation).  This is not how we'd prefer to sun this service, it's 
> quite hacky and we'd like to not have to force a restart to work around what 
> appears to an issue with how the reconnect is handled.
>  
> Here is the stacktrace:
> [DEBUG] 2021-03-17 13:30:48,513 
> org.apache.camel.component.salesforce.internal.streaming.SubscriptionHelper$5 
> [SalesforceHttpClient@60c73e58-25 ] - Received messages 
> [{clientId=[redacted], channel=/meta/connect, id=21, 
> successful=true}][DEBUG] 2021-03-17 13:30:48,513 
> org.apache.camel.component.salesforce.internal.streaming.SubscriptionHelper 
> [SalesforceHttpClient@60c73e58-25 ] - [CHANNEL:META_CONNECT]: 
> {clientId=[redacted], channel=/meta/connect, id=21, 
> successful=true}
> [DEBUG] 2021-03-17 13:32:38,588 
> org.apache.camel.component.salesforce.internal.streaming.SubscriptionHelper$5 
> [SalesforceHttpClient@60c73e58-25 ] - Received messages 
> [{clientId=[redacted], channel=/meta/connect, id=22, 
> successful=true}]
> [DEBUG] 2021-03-17 13:32:38,589 
> org.apache.camel.component.salesforce.internal.streaming.SubscriptionHelper 
> [SalesforceHttpClient@60c73e58-25 ] - [CHANNEL:META_CONNECT]: 
> {clientId=[redacted], channel=/meta/connect, id=22, 
> successful=true}
> [DEBUG] 2021-03-17 13:34:28,665 
> org.apache.camel.component.salesforce.internal.streaming.SubscriptionHelper$5 
> [SalesforceHttpClient@60c73e58-25 ] - Received messages 
> [{clientId=[redacted], channel=/meta/connect, id=23, 
> successful=true}]
> [DEBUG] 2021-03-17 13:34:28,666 
> org.apache.camel.component.salesforce.internal.streaming.SubscriptionHelper 
> [SalesforceHttpClient@60c73e58-25 ] - [CHANNEL:META_CONNECT]: 
> {clientId=[redacted], channel=/meta/connect, id=23, 
> successful=true}[DEBUG] 2021-03-17 13:34:28,766 
> org.apache.camel.component.salesforce.internal.streaming.SubscriptionHelper$5 
> [SalesforceHttpClient@60c73e58-32 ] - Received messages 
> [{channel=/meta/disconnect}, {clientId=[redacted], 
> advice={reconnect=none, interval=0}, channel=/meta/connect, id=24, 
> error=401::Authentication invalid, successful=false}]
> [INFO ] 2021-03-17 13:34:28,769 
> org.apache.camel.component.salesforce.internal.streaming.SubscriptionHelper 
> [SalesforceHttpClient@60c73e58-26 ] - Restarting on unexpected disconnect 
> from Salesforce...
> [DEBUG] 2021-03-17 13:34:28,769 
> org.apache.camel.component.salesforce.internal.streaming.SubscriptionHelper 
> [SalesforceHttpClient@60c73e58-26 ] - Waiting to disconnect...
> [DEBUG] 2021-03-17 13:34:28,770 
> org.apache.camel.component.salesforce.internal.streaming.SubscriptionHelper 
> [SalesforceHttpClient@60c73e58-32 ] - [CHANNEL:META_CONNECT]: 
> {clientId=[redacted], advice={reconnect=none, interval=0}, 
> channel=/meta/connect, id=24, error=401::Authentication invalid, 
> successful=false}[WARN ] 2021-03-17 13:34:28,771 
> org.apache.camel.component.salesforce.internal.streaming.SubscriptionHelper 
> [SalesforceHttpClient@60c73e58-32 ] - Connect failure: 
> {clientId=[redacted], advice={reconnect=none, interval=0}, 
> channel=/meta/connect, id=24, error=401::Authentication 

[jira] [Commented] (CAMEL-16370) Camel Salesforce component unable to reconnect after disconnect from Salesforce

2021-10-20 Thread Hemang Ajmera (Jira)


[ 
https://issues.apache.org/jira/browse/CAMEL-16370?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17431194#comment-17431194
 ] 

Hemang Ajmera commented on CAMEL-16370:
---

[~davsclaus], can you please change the affected version to 3.11.0.

 

I don't have way to reproduce it, but restart makes it works fine with the same 
connection parameters.

> Camel Salesforce component unable to reconnect after disconnect from 
> Salesforce
> ---
>
> Key: CAMEL-16370
> URL: https://issues.apache.org/jira/browse/CAMEL-16370
> Project: Camel
>  Issue Type: Bug
>  Components: camel-salesforce
>Affects Versions: 3.8.0
> Environment: Running in a spring-boot (v2.1.18.RELEASE) app in a 
> linux container deployed to openshift 3.11
>Reporter: Jason
>Priority: Major
> Fix For: 3.x
>
>
> We are consuming Salesforce platform-events following the documented 
> recommendations and our connection will not reconnect after being 
> disconnected, apparently, from Salesforce.  I am not quite certain as to the 
> circumstances that Salesforce sends some sort of disconnect signal, but that 
> is what's logged from the SubscriptionHelper class. Our initial connection to 
> Salesforce is successful and we are able to receive platform-events up until 
> the point of the spontaneous disconnection.  Re-connection fails consistently 
> and always in the same way.  Logging is slightly different across version, 
> but the behavior seems to always be the same.
> Our only work around for this is to run our service consuming this message 
> like a cron job and restart it every 15 minutes (period we settled on through 
> experimentation).  This is not how we'd prefer to sun this service, it's 
> quite hacky and we'd like to not have to force a restart to work around what 
> appears to an issue with how the reconnect is handled.
>  
> Here is the stacktrace:
> [DEBUG] 2021-03-17 13:30:48,513 
> org.apache.camel.component.salesforce.internal.streaming.SubscriptionHelper$5 
> [SalesforceHttpClient@60c73e58-25 ] - Received messages 
> [{clientId=[redacted], channel=/meta/connect, id=21, 
> successful=true}][DEBUG] 2021-03-17 13:30:48,513 
> org.apache.camel.component.salesforce.internal.streaming.SubscriptionHelper 
> [SalesforceHttpClient@60c73e58-25 ] - [CHANNEL:META_CONNECT]: 
> {clientId=[redacted], channel=/meta/connect, id=21, 
> successful=true}
> [DEBUG] 2021-03-17 13:32:38,588 
> org.apache.camel.component.salesforce.internal.streaming.SubscriptionHelper$5 
> [SalesforceHttpClient@60c73e58-25 ] - Received messages 
> [{clientId=[redacted], channel=/meta/connect, id=22, 
> successful=true}]
> [DEBUG] 2021-03-17 13:32:38,589 
> org.apache.camel.component.salesforce.internal.streaming.SubscriptionHelper 
> [SalesforceHttpClient@60c73e58-25 ] - [CHANNEL:META_CONNECT]: 
> {clientId=[redacted], channel=/meta/connect, id=22, 
> successful=true}
> [DEBUG] 2021-03-17 13:34:28,665 
> org.apache.camel.component.salesforce.internal.streaming.SubscriptionHelper$5 
> [SalesforceHttpClient@60c73e58-25 ] - Received messages 
> [{clientId=[redacted], channel=/meta/connect, id=23, 
> successful=true}]
> [DEBUG] 2021-03-17 13:34:28,666 
> org.apache.camel.component.salesforce.internal.streaming.SubscriptionHelper 
> [SalesforceHttpClient@60c73e58-25 ] - [CHANNEL:META_CONNECT]: 
> {clientId=[redacted], channel=/meta/connect, id=23, 
> successful=true}[DEBUG] 2021-03-17 13:34:28,766 
> org.apache.camel.component.salesforce.internal.streaming.SubscriptionHelper$5 
> [SalesforceHttpClient@60c73e58-32 ] - Received messages 
> [{channel=/meta/disconnect}, {clientId=[redacted], 
> advice={reconnect=none, interval=0}, channel=/meta/connect, id=24, 
> error=401::Authentication invalid, successful=false}]
> [INFO ] 2021-03-17 13:34:28,769 
> org.apache.camel.component.salesforce.internal.streaming.SubscriptionHelper 
> [SalesforceHttpClient@60c73e58-26 ] - Restarting on unexpected disconnect 
> from Salesforce...
> [DEBUG] 2021-03-17 13:34:28,769 
> org.apache.camel.component.salesforce.internal.streaming.SubscriptionHelper 
> [SalesforceHttpClient@60c73e58-26 ] - Waiting to disconnect...
> [DEBUG] 2021-03-17 13:34:28,770 
> org.apache.camel.component.salesforce.internal.streaming.SubscriptionHelper 
> [SalesforceHttpClient@60c73e58-32 ] - [CHANNEL:META_CONNECT]: 
> {clientId=[redacted], advice={reconnect=none, interval=0}, 
> channel=/meta/connect, id=24, error=401::Authentication invalid, 
> successful=false}[WARN ] 2021-03-17 13:34:28,771 
> org.apache.camel.component.salesforce.internal.streaming.SubscriptionHelper 
> [SalesforceHttpClient@60c73e58-32 ] - Connect failure: 
> 

[jira] [Commented] (CAMEL-16370) Camel Salesforce component unable to reconnect after disconnect from Salesforce

2021-10-20 Thread Hemang Ajmera (Jira)


[ 
https://issues.apache.org/jira/browse/CAMEL-16370?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17431191#comment-17431191
 ] 

Hemang Ajmera commented on CAMEL-16370:
---

Hi

   I am user camel version 3.11.0 and facing same error. Here is the relevant 
section of the log...

```

2021-10-20 11:46:51,697 
org.apache.camel.component.salesforce.internal.streaming.SubscriptionHelper.performClientRestart
 - Restarting on unexpected disconnect from Salesforce... 
2021-10-20 11:46:51,699 
org.apache.camel.component.salesforce.internal.streaming.SubscriptionHelper.onMessage
 - Connect failure: \{clientId=1ah1n3glbijn0qkia6xuwk25k15d, 
advice={reconnect=none, interval=0}, channel=/meta/connect, id=99, 
error=401::Authentication invalid, successful=false} 
2021-10-20 11:46:51,798 
org.apache.camel.component.salesforce.internal.streaming.SubscriptionHelper.onMessage
 - Handshake failure: \{ext={sfdc={failureReason=401::Authentication invalid}, 
replay=true, payload.format=true}, advice=\{reconnect=none}, 
channel=/meta/handshake, id=100, error=403::Handshake denied, successful=false} 
2021-10-20 11:46:51,799 
org.apache.camel.component.salesforce.internal.streaming.SubscriptionHelper.onMessage
 - Cleaning session (logout) from SalesforceSession before restarting client 
2021-10-20 11:46:51,902 org.cometd.bayeux.client.ClientSession.notifyOnMessage 
- Exception while invoking listener 
org.apache.camel.component.salesforce.internal.streaming.SubscriptionHelper$1@1e2d0dfa
 
java.lang.NullPointerException: null 
 at 
org.apache.camel.component.salesforce.internal.streaming.SubscriptionHelper$1.onMessage(SubscriptionHelper.java:148)
 
 at 
org.cometd.common.AbstractClientSession$AbstractSessionChannel.notifyOnMessage(AbstractClientSession.java:583)
 
 at 
org.cometd.common.AbstractClientSession$AbstractSessionChannel.notifyMessageListeners(AbstractClientSession.java:568)
 
 at 
org.cometd.common.AbstractClientSession.notifyListeners(AbstractClientSession.java:308)
 
 at 
org.cometd.common.AbstractClientSession.lambda$receive$4(AbstractClientSession.java:269)
 
 at org.cometd.bayeux.Promise$2.succeed(Promise.java:103) 
 at org.cometd.common.AsyncFoldLeft$AbstractLoop.run(AsyncFoldLeft.java:199) 
 at org.cometd.common.AsyncFoldLeft.run(AsyncFoldLeft.java:93) 
 at 
org.cometd.common.AbstractClientSession.extendIncoming(AbstractClientSession.java:103)
 
 at 
org.cometd.common.AbstractClientSession.receive(AbstractClientSession.java:263) 
 at org.cometd.client.BayeuxClient.failHandshake(BayeuxClient.java:721) 
 at org.cometd.client.BayeuxClient.processHandshake(BayeuxClient.java:707) 
 at org.cometd.client.BayeuxClient.processMessages(BayeuxClient.java:615) 
 at org.cometd.client.BayeuxClient.access$2000(BayeuxClient.java:101) 
 at 
org.cometd.client.BayeuxClient$MessageTransportListener.onMessages(BayeuxClient.java:1260)
 
 at 
org.cometd.client.transport.LongPollingTransport$2.onComplete(LongPollingTransport.java:240)
 
 at 
org.eclipse.jetty.client.ResponseNotifier.notifyComplete(ResponseNotifier.java:218)
 
 at 
org.eclipse.jetty.client.ResponseNotifier.notifyComplete(ResponseNotifier.java:210)
 
 at 
org.eclipse.jetty.client.HttpReceiver.terminateResponse(HttpReceiver.java:481) 
 at 
org.eclipse.jetty.client.HttpReceiver.terminateResponse(HttpReceiver.java:461) 
 at 
org.eclipse.jetty.client.HttpReceiver.responseSuccess(HttpReceiver.java:424) 
 at 
org.eclipse.jetty.client.http.HttpReceiverOverHTTP.messageComplete(HttpReceiverOverHTTP.java:365)
 
 at org.eclipse.jetty.http.HttpParser.handleContentMessage(HttpParser.java:591) 
 at org.eclipse.jetty.http.HttpParser.parseContent(HttpParser.java:1716) 
 at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:1545) 
 at 
org.eclipse.jetty.client.http.HttpReceiverOverHTTP.parse(HttpReceiverOverHTTP.java:204)
 
 at 
org.eclipse.jetty.client.http.HttpReceiverOverHTTP.process(HttpReceiverOverHTTP.java:144)
 
 at 
org.eclipse.jetty.client.http.HttpReceiverOverHTTP.receive(HttpReceiverOverHTTP.java:79)
 
 at 
org.eclipse.jetty.client.http.HttpChannelOverHTTP.receive(HttpChannelOverHTTP.java:131)
 
 at 
org.eclipse.jetty.client.http.HttpConnectionOverHTTP.onFillable(HttpConnectionOverHTTP.java:172)
 
 at 
org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
 
 at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105) 
 at 
org.eclipse.jetty.io.ssl.SslConnection$DecryptedEndPoint.onFillable(SslConnection.java:555)
 
 at org.eclipse.jetty.io.ssl.SslConnection.onFillable(SslConnection.java:410) 
 at org.eclipse.jetty.io.ssl.SslConnection$2.succeeded(SslConnection.java:164) 
 at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105) 
 at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104) 
 at 
org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:338)
 
 at 

[jira] [Created] (CAMEL-16624) Replace Map Options with Multivalue

2021-05-17 Thread Hemang Ajmera (Jira)
Hemang Ajmera created CAMEL-16624:
-

 Summary: Replace Map Options with Multivalue
 Key: CAMEL-16624
 URL: https://issues.apache.org/jira/browse/CAMEL-16624
 Project: Camel
  Issue Type: Improvement
  Components: camel-salesforce
Affects Versions: 3.9.0
Reporter: Hemang Ajmera


We should replace Map with Multi Value, so that they can be initialized in URI 
sting.

 

Please refer to 
[https://camel.zulipchat.com/#narrow/stream/257298-camel/topic/set.20Map.20option/near/239077029]
 for details

 

The Map options in Salesforce Component are
 # apexQueryParams
 # initialReplayIdMap

 

If there is quick way to find all the options in other component which is Map, 
then this Jira can be extended to convert them all.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (CAMEL-16426) Kafka with SASL does not work in quarkus native mode

2021-03-29 Thread Hemang Ajmera (Jira)
Hemang Ajmera created CAMEL-16426:
-

 Summary: Kafka with SASL does not work in quarkus native mode
 Key: CAMEL-16426
 URL: https://issues.apache.org/jira/browse/CAMEL-16426
 Project: Camel
  Issue Type: Bug
  Components: camel-kafka
Affects Versions: 3.9.0
Reporter: Hemang Ajmera


When we run the quarkus native code, we get the error

{{Caused by: java.lang.SecurityException: Configuration error: 
java.lang.ClassNotFoundException: sun.security.provider.ConfigFile}}

The solution is to include sun.security.provider.ConfigFile class for 
Reflection.

Detailed conversation at

[https://camel.zulipchat.com/#narrow/stream/257302-camel-quarkus/topic/ClassNotFoundException.20for.20Exception.20class]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (CAMEL-14733) Properties of class Map does not work with Spring Boot

2020-03-20 Thread Hemang Ajmera (Jira)


[ 
https://issues.apache.org/jira/browse/CAMEL-14733?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17063369#comment-17063369
 ] 

Hemang Ajmera commented on CAMEL-14733:
---

I dont have any OS to work with :(

I am still curious on why jenkins is not generated all snapshot jar.

> Properties of class Map does not work with Spring Boot
> --
>
> Key: CAMEL-14733
> URL: https://issues.apache.org/jira/browse/CAMEL-14733
> Project: Camel
>  Issue Type: Bug
>  Components: camel-spring-boot-starters
>Affects Versions: 3.1.0
> Environment: Camel 3.1.0
>Reporter: Hemang Ajmera
>Priority: Major
> Fix For: 3.2.0
>
> Attachments: Screenshot 2020-03-18 at 11.13.08.png
>
>
> We were migrating the salesforce component code from version 2.24.2 to 
> version 3.1.0. However we are getting error 
> {code}
> Caused by: org.apache.camel.PropertyBindingException: Error binding property 
> (camel.component.salesforce.httpclientproperties.requestbuffersize=65536) 
> with name: httpclientproperties.requestbuffersize on bean: 
> org.apache.camel.component.salesforce.SalesforceComponent@497cd25 with value: 
> 65536
> {code}
> Earlier also there was issue with Map properties, which was raised in 
> CAMEL-13770 and it was fixed by commit 
> https://github.com/apache/camel/commit/2566504f56212b87ff5532a181cb85dfc00f2286
> This seems to be new issue.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (CAMEL-14733) Properties of class Map does not work with Spring Boot

2020-03-20 Thread Hemang Ajmera (Jira)


[ 
https://issues.apache.org/jira/browse/CAMEL-14733?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17063361#comment-17063361
 ] 

Hemang Ajmera commented on CAMEL-14733:
---

After 1 day of execution, I finally got build error. 


{code}
[ERROR] Failed to execute goal on project camel-kudu: Could not resolve 
dependencies for project org.apache.camel:camel-kudu:jar:3.2.0-SNAPSHOT: 
Failure to find org.apache.kudu:kudu-binary:jar:windows-x86_64:1.10.0 in 
https://repo1.maven.org/maven2/ was cached in the local repository, resolution 
will not be reattempted until the update interval of central has elapsed or 
updates are forced -> [Help 1]
{code}


> Properties of class Map does not work with Spring Boot
> --
>
> Key: CAMEL-14733
> URL: https://issues.apache.org/jira/browse/CAMEL-14733
> Project: Camel
>  Issue Type: Bug
>  Components: camel-spring-boot-starters
>Affects Versions: 3.1.0
> Environment: Camel 3.1.0
>Reporter: Hemang Ajmera
>Priority: Major
> Fix For: 3.2.0
>
> Attachments: Screenshot 2020-03-18 at 11.13.08.png
>
>
> We were migrating the salesforce component code from version 2.24.2 to 
> version 3.1.0. However we are getting error 
> {code}
> Caused by: org.apache.camel.PropertyBindingException: Error binding property 
> (camel.component.salesforce.httpclientproperties.requestbuffersize=65536) 
> with name: httpclientproperties.requestbuffersize on bean: 
> org.apache.camel.component.salesforce.SalesforceComponent@497cd25 with value: 
> 65536
> {code}
> Earlier also there was issue with Map properties, which was raised in 
> CAMEL-13770 and it was fixed by commit 
> https://github.com/apache/camel/commit/2566504f56212b87ff5532a181cb85dfc00f2286
> This seems to be new issue.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (CAMEL-14733) Properties of class Map does not work with Spring Boot

2020-03-19 Thread Hemang Ajmera (Jira)


[ 
https://issues.apache.org/jira/browse/CAMEL-14733?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17062431#comment-17062431
 ] 

Hemang Ajmera commented on CAMEL-14733:
---

I am not sure how the entire build works on master branch, but there is no 
version 3.2.0-SNAPSHOT for salesforce component at 
https://repository.apache.org/content/groups/snapshots/org/apache/camel/springboot/camel-salesforce-starter/


> Properties of class Map does not work with Spring Boot
> --
>
> Key: CAMEL-14733
> URL: https://issues.apache.org/jira/browse/CAMEL-14733
> Project: Camel
>  Issue Type: Bug
>  Components: camel-spring-boot-starters
>Affects Versions: 3.1.0
> Environment: Camel 3.1.0
>Reporter: Hemang Ajmera
>Priority: Major
> Fix For: 3.2.0
>
> Attachments: Screenshot 2020-03-18 at 11.13.08.png
>
>
> We were migrating the salesforce component code from version 2.24.2 to 
> version 3.1.0. However we are getting error 
> {code}
> Caused by: org.apache.camel.PropertyBindingException: Error binding property 
> (camel.component.salesforce.httpclientproperties.requestbuffersize=65536) 
> with name: httpclientproperties.requestbuffersize on bean: 
> org.apache.camel.component.salesforce.SalesforceComponent@497cd25 with value: 
> 65536
> {code}
> Earlier also there was issue with Map properties, which was raised in 
> CAMEL-13770 and it was fixed by commit 
> https://github.com/apache/camel/commit/2566504f56212b87ff5532a181cb85dfc00f2286
> This seems to be new issue.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Comment Edited] (CAMEL-14733) Properties of class Map does not work with Spring Boot

2020-03-19 Thread Hemang Ajmera (Jira)


[ 
https://issues.apache.org/jira/browse/CAMEL-14733?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17062431#comment-17062431
 ] 

Hemang Ajmera edited comment on CAMEL-14733 at 3/19/20, 10:18 AM:
--

I am not sure how the entire build works on master branch, but there is no 
version 3.2.0-SNAPSHOT for salesforce starter component at 
https://repository.apache.org/content/groups/snapshots/org/apache/camel/springboot/camel-salesforce-starter/



was (Author: hemangajmera):
I am not sure how the entire build works on master branch, but there is no 
version 3.2.0-SNAPSHOT for salesforce component at 
https://repository.apache.org/content/groups/snapshots/org/apache/camel/springboot/camel-salesforce-starter/


> Properties of class Map does not work with Spring Boot
> --
>
> Key: CAMEL-14733
> URL: https://issues.apache.org/jira/browse/CAMEL-14733
> Project: Camel
>  Issue Type: Bug
>  Components: camel-spring-boot-starters
>Affects Versions: 3.1.0
> Environment: Camel 3.1.0
>Reporter: Hemang Ajmera
>Priority: Major
> Fix For: 3.2.0
>
> Attachments: Screenshot 2020-03-18 at 11.13.08.png
>
>
> We were migrating the salesforce component code from version 2.24.2 to 
> version 3.1.0. However we are getting error 
> {code}
> Caused by: org.apache.camel.PropertyBindingException: Error binding property 
> (camel.component.salesforce.httpclientproperties.requestbuffersize=65536) 
> with name: httpclientproperties.requestbuffersize on bean: 
> org.apache.camel.component.salesforce.SalesforceComponent@497cd25 with value: 
> 65536
> {code}
> Earlier also there was issue with Map properties, which was raised in 
> CAMEL-13770 and it was fixed by commit 
> https://github.com/apache/camel/commit/2566504f56212b87ff5532a181cb85dfc00f2286
> This seems to be new issue.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Closed] (CAMEL-13766) Salesforce component Mocking does not work correctly

2020-03-18 Thread Hemang Ajmera (Jira)


 [ 
https://issues.apache.org/jira/browse/CAMEL-13766?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Hemang Ajmera closed CAMEL-13766.
-

> Salesforce component Mocking does not work correctly
> 
>
> Key: CAMEL-13766
> URL: https://issues.apache.org/jira/browse/CAMEL-13766
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-salesforce, camel-test
>Affects Versions: 2.24.0
>Reporter: Hemang Ajmera
>Priority: Minor
> Attachments: CAMEL-13766-Code.zip, camel-13766.log.zip
>
>
> In my unit test, I am replacing salesfoce component with a mock. However, 
> still the component is getting activated with being replace with mock. 
> Because of this test case fails in our Jenkins environment as from Jenkins 
> server, there is no connectivity to salesforce.
>  
> Here is the part of unit test code
> {code:java}
>     @EndpointInject(uri = "mock:salesforce:query")
>     private MockEndpoint sfMock;
>     String sfResponse = "{}"; // Expected  response value from SF
>     RouteDefinition mainRoute = context.getRouteDefinition("main-route");
>     mainRoute.adviceWith(context, new AdviceWithRouteBuilder(){
>     
>     @Override
>     public void configure() throws Exception {
>     mockEndpointsAndSkip("salesforce.*");
>     }
>     });
>     sfMock.whenAnyExchangeReceived(new Processor(){
>     @Override
>     public void process(Exchange exchange) throws Exception {
>     exchange.getIn().setBody(sfResponse);
>     }
>     });{code}
> Here is the logs in my local machine
>  
> {quote}
> 2019-07-18 13:43:42.719  INFO 4288 --- [   main] 
> org.eclipse.jetty.util.log   : Logging initialized @22433ms to 
> org.eclipse.jetty.util.log.Slf4jLog}}
> {{2019-07-18 13:43:42.890  INFO 4288 --- [   main] 
> o.a.c.util.jsse.SSLContextParameters : Available providers: SUN version 
> 1.8.}}
> {{2019-07-18 13:43:43.608  INFO 4288 --- [   main] 
> o.a.c.c.s.internal.SalesforceSession : Login at Salesforce loginUrl: 
> https://test.salesforce.com/services/oauth2/token}}
> {{2019-07-18 13:43:46.514  INFO 4288 --- [   main] 
> o.a.c.c.s.internal.SalesforceSession : Login successful}}
> {{2019-07-18 13:43:46.519  INFO 4288 --- [   main] 
> o.a.c.c.salesforce.SalesforceComponent   : Found 0 generated classes in 
> packages: [org.apache.camel.salesforce.dto]}}
> {{2019-07-18 13:43:46.523  INFO 4288 --- [   main] 
> .c.i.InterceptSendToMockEndpointStrategy : Adviced endpoint 
> [salesforce://query?format=JSON=true=SELECT+Id%2C+OwnerId%2CLastModifiedById%2CLastModifiedDate+FROM+Account+WHERE+Id+IN%28%27abcd%27%29]
>  with mock endpoint [mock:salesforce:query]
> {quote}
> We can clearly see the component is initiated first and then replaced with 
> mock. The idea of replacing with mock is that we should be able to test even 
> if component cannot be initiated.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (CAMEL-13766) Salesforce component Mocking does not work correctly

2020-03-18 Thread Hemang Ajmera (Jira)


[ 
https://issues.apache.org/jira/browse/CAMEL-13766?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17061924#comment-17061924
 ] 

Hemang Ajmera commented on CAMEL-13766:
---

Thanks. The method you suggested works fine. You can close the issue!

> Salesforce component Mocking does not work correctly
> 
>
> Key: CAMEL-13766
> URL: https://issues.apache.org/jira/browse/CAMEL-13766
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-salesforce, camel-test
>Affects Versions: 2.24.0
>Reporter: Hemang Ajmera
>Priority: Minor
> Attachments: CAMEL-13766-Code.zip, camel-13766.log.zip
>
>
> In my unit test, I am replacing salesfoce component with a mock. However, 
> still the component is getting activated with being replace with mock. 
> Because of this test case fails in our Jenkins environment as from Jenkins 
> server, there is no connectivity to salesforce.
>  
> Here is the part of unit test code
> {code:java}
>     @EndpointInject(uri = "mock:salesforce:query")
>     private MockEndpoint sfMock;
>     String sfResponse = "{}"; // Expected  response value from SF
>     RouteDefinition mainRoute = context.getRouteDefinition("main-route");
>     mainRoute.adviceWith(context, new AdviceWithRouteBuilder(){
>     
>     @Override
>     public void configure() throws Exception {
>     mockEndpointsAndSkip("salesforce.*");
>     }
>     });
>     sfMock.whenAnyExchangeReceived(new Processor(){
>     @Override
>     public void process(Exchange exchange) throws Exception {
>     exchange.getIn().setBody(sfResponse);
>     }
>     });{code}
> Here is the logs in my local machine
>  
> {quote}
> 2019-07-18 13:43:42.719  INFO 4288 --- [   main] 
> org.eclipse.jetty.util.log   : Logging initialized @22433ms to 
> org.eclipse.jetty.util.log.Slf4jLog}}
> {{2019-07-18 13:43:42.890  INFO 4288 --- [   main] 
> o.a.c.util.jsse.SSLContextParameters : Available providers: SUN version 
> 1.8.}}
> {{2019-07-18 13:43:43.608  INFO 4288 --- [   main] 
> o.a.c.c.s.internal.SalesforceSession : Login at Salesforce loginUrl: 
> https://test.salesforce.com/services/oauth2/token}}
> {{2019-07-18 13:43:46.514  INFO 4288 --- [   main] 
> o.a.c.c.s.internal.SalesforceSession : Login successful}}
> {{2019-07-18 13:43:46.519  INFO 4288 --- [   main] 
> o.a.c.c.salesforce.SalesforceComponent   : Found 0 generated classes in 
> packages: [org.apache.camel.salesforce.dto]}}
> {{2019-07-18 13:43:46.523  INFO 4288 --- [   main] 
> .c.i.InterceptSendToMockEndpointStrategy : Adviced endpoint 
> [salesforce://query?format=JSON=true=SELECT+Id%2C+OwnerId%2CLastModifiedById%2CLastModifiedDate+FROM+Account+WHERE+Id+IN%28%27abcd%27%29]
>  with mock endpoint [mock:salesforce:query]
> {quote}
> We can clearly see the component is initiated first and then replaced with 
> mock. The idea of replacing with mock is that we should be able to test even 
> if component cannot be initiated.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (CAMEL-14733) Properties of class Map does not work with Spring Boot

2020-03-18 Thread Hemang Ajmera (Jira)


[ 
https://issues.apache.org/jira/browse/CAMEL-14733?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17061611#comment-17061611
 ] 

Hemang Ajmera commented on CAMEL-14733:
---

can you please share the apache repo url from where I can use the snapshot jar. 
That way I dont have to download and built the entire source code.

> Properties of class Map does not work with Spring Boot
> --
>
> Key: CAMEL-14733
> URL: https://issues.apache.org/jira/browse/CAMEL-14733
> Project: Camel
>  Issue Type: Bug
>  Components: camel-spring-boot-starters
>Affects Versions: 3.1.0
> Environment: Camel 3.1.0
>Reporter: Hemang Ajmera
>Priority: Major
> Fix For: 3.2.0
>
> Attachments: Screenshot 2020-03-18 at 11.13.08.png
>
>
> We were migrating the salesforce component code from version 2.24.2 to 
> version 3.1.0. However we are getting error 
> {code}
> Caused by: org.apache.camel.PropertyBindingException: Error binding property 
> (camel.component.salesforce.httpclientproperties.requestbuffersize=65536) 
> with name: httpclientproperties.requestbuffersize on bean: 
> org.apache.camel.component.salesforce.SalesforceComponent@497cd25 with value: 
> 65536
> {code}
> Earlier also there was issue with Map properties, which was raised in 
> CAMEL-13770 and it was fixed by commit 
> https://github.com/apache/camel/commit/2566504f56212b87ff5532a181cb85dfc00f2286
> This seems to be new issue.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (CAMEL-14733) Properties of class Map does not work with Spring Boot

2020-03-18 Thread Hemang Ajmera (Jira)


[ 
https://issues.apache.org/jira/browse/CAMEL-14733?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17061479#comment-17061479
 ] 

Hemang Ajmera commented on CAMEL-14733:
---

[~cib...@e-ma.net], Can you please look into this issue, since you have fixed 
CAMEL-13770.

> Properties of class Map does not work with Spring Boot
> --
>
> Key: CAMEL-14733
> URL: https://issues.apache.org/jira/browse/CAMEL-14733
> Project: Camel
>  Issue Type: Bug
>  Components: camel-salesforce, camel-spring-boot-starters
>Affects Versions: 3.1.0
> Environment: Camel 3.1.0
>Reporter: Hemang Ajmera
>Priority: Major
>
> We were migrating the salesforce component code from version 2.24.2 to 
> version 3.1.0. However we are getting error 
> {code}
> Caused by: org.apache.camel.PropertyBindingException: Error binding property 
> (camel.component.salesforce.httpclientproperties.requestbuffersize=65536) 
> with name: httpclientproperties.requestbuffersize on bean: 
> org.apache.camel.component.salesforce.SalesforceComponent@497cd25 with value: 
> 65536
> {code}
> Earlier also there was issue with Map properties, which was raised in 
> CAMEL-13770 and it was fixed by commit 
> https://github.com/apache/camel/commit/2566504f56212b87ff5532a181cb85dfc00f2286
> This seems to be new issue.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (CAMEL-14733) Properties of class Map does not work with Spring Boot

2020-03-18 Thread Hemang Ajmera (Jira)


[ 
https://issues.apache.org/jira/browse/CAMEL-14733?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17061477#comment-17061477
 ] 

Hemang Ajmera commented on CAMEL-14733:
---

The code base uploaded in CAMEL-13766 can be used to reproduce this error

> Properties of class Map does not work with Spring Boot
> --
>
> Key: CAMEL-14733
> URL: https://issues.apache.org/jira/browse/CAMEL-14733
> Project: Camel
>  Issue Type: Bug
>  Components: camel-salesforce, camel-spring-boot-starters
>Affects Versions: 3.1.0
> Environment: Camel 3.1.0
>Reporter: Hemang Ajmera
>Priority: Major
>
> We were migrating the salesforce component code from version 2.24.2 to 
> version 3.1.0. However we are getting error 
> {code}
> Caused by: org.apache.camel.PropertyBindingException: Error binding property 
> (camel.component.salesforce.httpclientproperties.requestbuffersize=65536) 
> with name: httpclientproperties.requestbuffersize on bean: 
> org.apache.camel.component.salesforce.SalesforceComponent@497cd25 with value: 
> 65536
> {code}
> Earlier also there was issue with Map properties, which was raised in 
> CAMEL-13770 and it was fixed by commit 
> https://github.com/apache/camel/commit/2566504f56212b87ff5532a181cb85dfc00f2286
> This seems to be new issue.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (CAMEL-13766) Salesforce component Mocking does not work correctly

2020-03-18 Thread Hemang Ajmera (Jira)


 [ 
https://issues.apache.org/jira/browse/CAMEL-13766?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Hemang Ajmera updated CAMEL-13766:
--
Attachment: (was: CAMEL-13766-Code.zip)

> Salesforce component Mocking does not work correctly
> 
>
> Key: CAMEL-13766
> URL: https://issues.apache.org/jira/browse/CAMEL-13766
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-salesforce, camel-test
>Affects Versions: 2.24.0
>Reporter: Hemang Ajmera
>Priority: Minor
> Attachments: CAMEL-13766-Code.zip, camel-13766.log.zip
>
>
> In my unit test, I am replacing salesfoce component with a mock. However, 
> still the component is getting activated with being replace with mock. 
> Because of this test case fails in our Jenkins environment as from Jenkins 
> server, there is no connectivity to salesforce.
>  
> Here is the part of unit test code
> {code:java}
>     @EndpointInject(uri = "mock:salesforce:query")
>     private MockEndpoint sfMock;
>     String sfResponse = "{}"; // Expected  response value from SF
>     RouteDefinition mainRoute = context.getRouteDefinition("main-route");
>     mainRoute.adviceWith(context, new AdviceWithRouteBuilder(){
>     
>     @Override
>     public void configure() throws Exception {
>     mockEndpointsAndSkip("salesforce.*");
>     }
>     });
>     sfMock.whenAnyExchangeReceived(new Processor(){
>     @Override
>     public void process(Exchange exchange) throws Exception {
>     exchange.getIn().setBody(sfResponse);
>     }
>     });{code}
> Here is the logs in my local machine
>  
> {quote}
> 2019-07-18 13:43:42.719  INFO 4288 --- [   main] 
> org.eclipse.jetty.util.log   : Logging initialized @22433ms to 
> org.eclipse.jetty.util.log.Slf4jLog}}
> {{2019-07-18 13:43:42.890  INFO 4288 --- [   main] 
> o.a.c.util.jsse.SSLContextParameters : Available providers: SUN version 
> 1.8.}}
> {{2019-07-18 13:43:43.608  INFO 4288 --- [   main] 
> o.a.c.c.s.internal.SalesforceSession : Login at Salesforce loginUrl: 
> https://test.salesforce.com/services/oauth2/token}}
> {{2019-07-18 13:43:46.514  INFO 4288 --- [   main] 
> o.a.c.c.s.internal.SalesforceSession : Login successful}}
> {{2019-07-18 13:43:46.519  INFO 4288 --- [   main] 
> o.a.c.c.salesforce.SalesforceComponent   : Found 0 generated classes in 
> packages: [org.apache.camel.salesforce.dto]}}
> {{2019-07-18 13:43:46.523  INFO 4288 --- [   main] 
> .c.i.InterceptSendToMockEndpointStrategy : Adviced endpoint 
> [salesforce://query?format=JSON=true=SELECT+Id%2C+OwnerId%2CLastModifiedById%2CLastModifiedDate+FROM+Account+WHERE+Id+IN%28%27abcd%27%29]
>  with mock endpoint [mock:salesforce:query]
> {quote}
> We can clearly see the component is initiated first and then replaced with 
> mock. The idea of replacing with mock is that we should be able to test even 
> if component cannot be initiated.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (CAMEL-13766) Salesforce component Mocking does not work correctly

2020-03-18 Thread Hemang Ajmera (Jira)


[ 
https://issues.apache.org/jira/browse/CAMEL-13766?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17061476#comment-17061476
 ] 

Hemang Ajmera commented on CAMEL-13766:
---

I have tested this with version 3.1.0 and getting the same issue. Please look 
at the updated code base.

> Salesforce component Mocking does not work correctly
> 
>
> Key: CAMEL-13766
> URL: https://issues.apache.org/jira/browse/CAMEL-13766
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-salesforce, camel-test
>Affects Versions: 2.24.0
>Reporter: Hemang Ajmera
>Priority: Minor
> Attachments: CAMEL-13766-Code.zip, camel-13766.log.zip
>
>
> In my unit test, I am replacing salesfoce component with a mock. However, 
> still the component is getting activated with being replace with mock. 
> Because of this test case fails in our Jenkins environment as from Jenkins 
> server, there is no connectivity to salesforce.
>  
> Here is the part of unit test code
> {code:java}
>     @EndpointInject(uri = "mock:salesforce:query")
>     private MockEndpoint sfMock;
>     String sfResponse = "{}"; // Expected  response value from SF
>     RouteDefinition mainRoute = context.getRouteDefinition("main-route");
>     mainRoute.adviceWith(context, new AdviceWithRouteBuilder(){
>     
>     @Override
>     public void configure() throws Exception {
>     mockEndpointsAndSkip("salesforce.*");
>     }
>     });
>     sfMock.whenAnyExchangeReceived(new Processor(){
>     @Override
>     public void process(Exchange exchange) throws Exception {
>     exchange.getIn().setBody(sfResponse);
>     }
>     });{code}
> Here is the logs in my local machine
>  
> {quote}
> 2019-07-18 13:43:42.719  INFO 4288 --- [   main] 
> org.eclipse.jetty.util.log   : Logging initialized @22433ms to 
> org.eclipse.jetty.util.log.Slf4jLog}}
> {{2019-07-18 13:43:42.890  INFO 4288 --- [   main] 
> o.a.c.util.jsse.SSLContextParameters : Available providers: SUN version 
> 1.8.}}
> {{2019-07-18 13:43:43.608  INFO 4288 --- [   main] 
> o.a.c.c.s.internal.SalesforceSession : Login at Salesforce loginUrl: 
> https://test.salesforce.com/services/oauth2/token}}
> {{2019-07-18 13:43:46.514  INFO 4288 --- [   main] 
> o.a.c.c.s.internal.SalesforceSession : Login successful}}
> {{2019-07-18 13:43:46.519  INFO 4288 --- [   main] 
> o.a.c.c.salesforce.SalesforceComponent   : Found 0 generated classes in 
> packages: [org.apache.camel.salesforce.dto]}}
> {{2019-07-18 13:43:46.523  INFO 4288 --- [   main] 
> .c.i.InterceptSendToMockEndpointStrategy : Adviced endpoint 
> [salesforce://query?format=JSON=true=SELECT+Id%2C+OwnerId%2CLastModifiedById%2CLastModifiedDate+FROM+Account+WHERE+Id+IN%28%27abcd%27%29]
>  with mock endpoint [mock:salesforce:query]
> {quote}
> We can clearly see the component is initiated first and then replaced with 
> mock. The idea of replacing with mock is that we should be able to test even 
> if component cannot be initiated.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (CAMEL-13766) Salesforce component Mocking does not work correctly

2020-03-18 Thread Hemang Ajmera (Jira)


 [ 
https://issues.apache.org/jira/browse/CAMEL-13766?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Hemang Ajmera updated CAMEL-13766:
--
Attachment: CAMEL-13766-Code.zip

> Salesforce component Mocking does not work correctly
> 
>
> Key: CAMEL-13766
> URL: https://issues.apache.org/jira/browse/CAMEL-13766
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-salesforce, camel-test
>Affects Versions: 2.24.0
>Reporter: Hemang Ajmera
>Priority: Minor
> Attachments: CAMEL-13766-Code.zip, camel-13766.log.zip
>
>
> In my unit test, I am replacing salesfoce component with a mock. However, 
> still the component is getting activated with being replace with mock. 
> Because of this test case fails in our Jenkins environment as from Jenkins 
> server, there is no connectivity to salesforce.
>  
> Here is the part of unit test code
> {code:java}
>     @EndpointInject(uri = "mock:salesforce:query")
>     private MockEndpoint sfMock;
>     String sfResponse = "{}"; // Expected  response value from SF
>     RouteDefinition mainRoute = context.getRouteDefinition("main-route");
>     mainRoute.adviceWith(context, new AdviceWithRouteBuilder(){
>     
>     @Override
>     public void configure() throws Exception {
>     mockEndpointsAndSkip("salesforce.*");
>     }
>     });
>     sfMock.whenAnyExchangeReceived(new Processor(){
>     @Override
>     public void process(Exchange exchange) throws Exception {
>     exchange.getIn().setBody(sfResponse);
>     }
>     });{code}
> Here is the logs in my local machine
>  
> {quote}
> 2019-07-18 13:43:42.719  INFO 4288 --- [   main] 
> org.eclipse.jetty.util.log   : Logging initialized @22433ms to 
> org.eclipse.jetty.util.log.Slf4jLog}}
> {{2019-07-18 13:43:42.890  INFO 4288 --- [   main] 
> o.a.c.util.jsse.SSLContextParameters : Available providers: SUN version 
> 1.8.}}
> {{2019-07-18 13:43:43.608  INFO 4288 --- [   main] 
> o.a.c.c.s.internal.SalesforceSession : Login at Salesforce loginUrl: 
> https://test.salesforce.com/services/oauth2/token}}
> {{2019-07-18 13:43:46.514  INFO 4288 --- [   main] 
> o.a.c.c.s.internal.SalesforceSession : Login successful}}
> {{2019-07-18 13:43:46.519  INFO 4288 --- [   main] 
> o.a.c.c.salesforce.SalesforceComponent   : Found 0 generated classes in 
> packages: [org.apache.camel.salesforce.dto]}}
> {{2019-07-18 13:43:46.523  INFO 4288 --- [   main] 
> .c.i.InterceptSendToMockEndpointStrategy : Adviced endpoint 
> [salesforce://query?format=JSON=true=SELECT+Id%2C+OwnerId%2CLastModifiedById%2CLastModifiedDate+FROM+Account+WHERE+Id+IN%28%27abcd%27%29]
>  with mock endpoint [mock:salesforce:query]
> {quote}
> We can clearly see the component is initiated first and then replaced with 
> mock. The idea of replacing with mock is that we should be able to test even 
> if component cannot be initiated.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (CAMEL-14733) Properties of class Map does not work with Spring Boot

2020-03-17 Thread Hemang Ajmera (Jira)
Hemang Ajmera created CAMEL-14733:
-

 Summary: Properties of class Map does not work with Spring Boot
 Key: CAMEL-14733
 URL: https://issues.apache.org/jira/browse/CAMEL-14733
 Project: Camel
  Issue Type: Bug
  Components: camel-salesforce, camel-spring-boot-starters
Affects Versions: 3.1.0
 Environment: Camel 3.1.0
Reporter: Hemang Ajmera


We were migrating the salesforce component code from version 2.24.2 to version 
3.1.0. However we are getting error 


{code}
Caused by: org.apache.camel.PropertyBindingException: Error binding property 
(camel.component.salesforce.httpclientproperties.requestbuffersize=65536) with 
name: httpclientproperties.requestbuffersize on bean: 
org.apache.camel.component.salesforce.SalesforceComponent@497cd25 with value: 
65536
{code}


Earlier also there was issue with Map properties, which was raised in 
CAMEL-13770 and it was fixed by commit 
https://github.com/apache/camel/commit/2566504f56212b87ff5532a181cb85dfc00f2286

This seems to be new issue.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (CAMEL-13999) Salesforce Component IDLE_TIMEOUT Blocks Async Request Responses for 2.x

2019-10-06 Thread Hemang Ajmera (Jira)


[ 
https://issues.apache.org/jira/browse/CAMEL-13999?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16945600#comment-16945600
 ] 

Hemang Ajmera commented on CAMEL-13999:
---

Thanks! 

> Salesforce Component IDLE_TIMEOUT Blocks Async Request Responses for 2.x
> 
>
> Key: CAMEL-13999
> URL: https://issues.apache.org/jira/browse/CAMEL-13999
> Project: Camel
>  Issue Type: Bug
>  Components: camel-salesforce
>Affects Versions: 2.23.0
>Reporter: Hemang Ajmera
>Assignee: Claus Ibsen
>Priority: Minor
>  Labels: camel-salesforce, httpclient, salesforce
> Fix For: 2.25.0, 2.24.3
>
>
> Bulk, Composite Batch, etc. all throw an exception when trying to return on 
> more than a few records due to [static final 
> IDLE_TIMEOUT|https://github.com/apache/camel/blob/master/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/SalesforceComponent.java#L80]
>  on the instantiated salesforce component httpClient:
>  
> Caused by: org.apache.camel.component.salesforce.api.SalesforceException: 
> Unexpected error \{0:null} executing 
> \{POST:https://genericSFDCInstance.salesforce.com/services/data/v38.0/composite/batch}
>     at 
> org.apache.camel.component.salesforce.internal.client.AbstractClientBase$1.onComplete(AbstractClientBase.java:199)
>  ~[camel-salesforce-2.23.0.jar:2.23.0]
>     at 
> org.eclipse.jetty.client.ResponseNotifier.notifyComplete(ResponseNotifier.java:202)
>  ~[jetty-client-9.4.12.v20180830.jar:9.4.12.v20180830]
>     at 
> org.eclipse.jetty.client.ResponseNotifier.notifyComplete(ResponseNotifier.java:194)
>  ~[jetty-client-9.4.12.v20180830.jar:9.4.12.v20180830]
>     at 
> org.eclipse.jetty.client.HttpReceiver.terminateResponse(HttpReceiver.java:470)
>  ~[jetty-client-9.4.12.v20180830.jar:9.4.12.v20180830]
>     at org.eclipse.jetty.client.HttpReceiver.abort(HttpReceiver.java:552) 
> ~[jetty-client-9.4.12.v20180830.jar:9.4.12.v20180830]
>     at 
> org.eclipse.jetty.client.HttpChannel.abortResponse(HttpChannel.java:156) 
> ~[jetty-client-9.4.12.v20180830.jar:9.4.12.v20180830]
>     at org.eclipse.jetty.client.HttpChannel.abort(HttpChannel.java:149) 
> ~[jetty-client-9.4.12.v20180830.jar:9.4.12.v20180830]
>     at org.eclipse.jetty.client.HttpExchange.abort(HttpExchange.java:257) 
> ~[jetty-client-9.4.12.v20180830.jar:9.4.12.v20180830]
>     at 
> org.eclipse.jetty.client.HttpConversation.abort(HttpConversation.java:141) 
> ~[jetty-client-9.4.12.v20180830.jar:9.4.12.v20180830]
>     at org.eclipse.jetty.client.HttpRequest.abort(HttpRequest.java:767) 
> ~[jetty-client-9.4.12.v20180830.jar:9.4.12.v20180830]
>     at 
> org.eclipse.jetty.client.http.HttpConnectionOverHTTP.abort(HttpConnectionOverHTTP.java:204)
>  ~[jetty-client-9.4.12.v20180830.jar:9.4.12.v20180830]
>     at 
> org.eclipse.jetty.client.http.HttpConnectionOverHTTP.close(HttpConnectionOverHTTP.java:190)
>  ~[jetty-client-9.4.12.v20180830.jar:9.4.12.v20180830]
>     at 
> org.eclipse.jetty.client.http.HttpConnectionOverHTTP.onIdleExpired(HttpConnectionOverHTTP.java:145)
>  ~[jetty-client-9.4.12.v20180830.jar:9.4.12.v20180830]
>     at 
> org.eclipse.jetty.io.ssl.SslConnection.onIdleExpired(SslConnection.java:286) 
> ~[jetty-io-9.4.12.v20180830.jar:9.4.12.v20180830]
>     at 
> org.eclipse.jetty.io.AbstractEndPoint.onIdleExpired(AbstractEndPoint.java:401)
>  ~[jetty-io-9.4.12.v20180830.jar:9.4.12.v20180830]
>     at 
> org.eclipse.jetty.io.IdleTimeout.checkIdleTimeout(IdleTimeout.java:166) 
> ~[jetty-io-9.4.12.v20180830.jar:9.4.12.v20180830]
>     at org.eclipse.jetty.io.IdleTimeout$1.run(IdleTimeout.java:50) 
> ~[jetty-io-9.4.12.v20180830.jar:9.4.12.v20180830]
>     at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) 
> ~[?:1.8.0_201]
>     at java.util.concurrent.FutureTask.run(FutureTask.java:266) 
> ~[?:1.8.0_201]
>     at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
>  ~[?:1.8.0_201]
>     at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
>  ~[?:1.8.0_201]
>     at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>  ~[?:1.8.0_201]
>     at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>  ~[?:1.8.0_201]
>     ... 1 more
> *Caused by: java.util.concurrent.TimeoutException: Idle timeout 5000 ms*
>     at 
> org.eclipse.jetty.client.http.HttpConnectionOverHTTP.onIdleExpired(HttpConnectionOverHTTP.java:145)
>  ~[jetty-client-9.4.12.v20180830.jar:9.4.12.v20180830]
>     at 
> 

[jira] [Commented] (CAMEL-13999) Salesforce Component IDLE_TIMEOUT Blocks Async Request Responses for 2.x

2019-09-20 Thread Hemang Ajmera (Jira)


[ 
https://issues.apache.org/jira/browse/CAMEL-13999?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16934122#comment-16934122
 ] 

Hemang Ajmera commented on CAMEL-13999:
---

Can this fix be backported to version 2.x. We are still not ready to move 
production to version 3.x

> Salesforce Component IDLE_TIMEOUT Blocks Async Request Responses for 2.x
> 
>
> Key: CAMEL-13999
> URL: https://issues.apache.org/jira/browse/CAMEL-13999
> Project: Camel
>  Issue Type: Bug
>  Components: camel-salesforce
>Affects Versions: 2.23.0
>Reporter: Hemang Ajmera
>Assignee: Claus Ibsen
>Priority: Minor
>  Labels: camel-salesforce, httpclient, salesforce
> Fix For: 3.0.0, 3.0.0.RC1
>
>
> Bulk, Composite Batch, etc. all throw an exception when trying to return on 
> more than a few records due to [static final 
> IDLE_TIMEOUT|https://github.com/apache/camel/blob/master/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/SalesforceComponent.java#L80]
>  on the instantiated salesforce component httpClient:
>  
> Caused by: org.apache.camel.component.salesforce.api.SalesforceException: 
> Unexpected error \{0:null} executing 
> \{POST:https://genericSFDCInstance.salesforce.com/services/data/v38.0/composite/batch}
>     at 
> org.apache.camel.component.salesforce.internal.client.AbstractClientBase$1.onComplete(AbstractClientBase.java:199)
>  ~[camel-salesforce-2.23.0.jar:2.23.0]
>     at 
> org.eclipse.jetty.client.ResponseNotifier.notifyComplete(ResponseNotifier.java:202)
>  ~[jetty-client-9.4.12.v20180830.jar:9.4.12.v20180830]
>     at 
> org.eclipse.jetty.client.ResponseNotifier.notifyComplete(ResponseNotifier.java:194)
>  ~[jetty-client-9.4.12.v20180830.jar:9.4.12.v20180830]
>     at 
> org.eclipse.jetty.client.HttpReceiver.terminateResponse(HttpReceiver.java:470)
>  ~[jetty-client-9.4.12.v20180830.jar:9.4.12.v20180830]
>     at org.eclipse.jetty.client.HttpReceiver.abort(HttpReceiver.java:552) 
> ~[jetty-client-9.4.12.v20180830.jar:9.4.12.v20180830]
>     at 
> org.eclipse.jetty.client.HttpChannel.abortResponse(HttpChannel.java:156) 
> ~[jetty-client-9.4.12.v20180830.jar:9.4.12.v20180830]
>     at org.eclipse.jetty.client.HttpChannel.abort(HttpChannel.java:149) 
> ~[jetty-client-9.4.12.v20180830.jar:9.4.12.v20180830]
>     at org.eclipse.jetty.client.HttpExchange.abort(HttpExchange.java:257) 
> ~[jetty-client-9.4.12.v20180830.jar:9.4.12.v20180830]
>     at 
> org.eclipse.jetty.client.HttpConversation.abort(HttpConversation.java:141) 
> ~[jetty-client-9.4.12.v20180830.jar:9.4.12.v20180830]
>     at org.eclipse.jetty.client.HttpRequest.abort(HttpRequest.java:767) 
> ~[jetty-client-9.4.12.v20180830.jar:9.4.12.v20180830]
>     at 
> org.eclipse.jetty.client.http.HttpConnectionOverHTTP.abort(HttpConnectionOverHTTP.java:204)
>  ~[jetty-client-9.4.12.v20180830.jar:9.4.12.v20180830]
>     at 
> org.eclipse.jetty.client.http.HttpConnectionOverHTTP.close(HttpConnectionOverHTTP.java:190)
>  ~[jetty-client-9.4.12.v20180830.jar:9.4.12.v20180830]
>     at 
> org.eclipse.jetty.client.http.HttpConnectionOverHTTP.onIdleExpired(HttpConnectionOverHTTP.java:145)
>  ~[jetty-client-9.4.12.v20180830.jar:9.4.12.v20180830]
>     at 
> org.eclipse.jetty.io.ssl.SslConnection.onIdleExpired(SslConnection.java:286) 
> ~[jetty-io-9.4.12.v20180830.jar:9.4.12.v20180830]
>     at 
> org.eclipse.jetty.io.AbstractEndPoint.onIdleExpired(AbstractEndPoint.java:401)
>  ~[jetty-io-9.4.12.v20180830.jar:9.4.12.v20180830]
>     at 
> org.eclipse.jetty.io.IdleTimeout.checkIdleTimeout(IdleTimeout.java:166) 
> ~[jetty-io-9.4.12.v20180830.jar:9.4.12.v20180830]
>     at org.eclipse.jetty.io.IdleTimeout$1.run(IdleTimeout.java:50) 
> ~[jetty-io-9.4.12.v20180830.jar:9.4.12.v20180830]
>     at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) 
> ~[?:1.8.0_201]
>     at java.util.concurrent.FutureTask.run(FutureTask.java:266) 
> ~[?:1.8.0_201]
>     at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
>  ~[?:1.8.0_201]
>     at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
>  ~[?:1.8.0_201]
>     at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>  ~[?:1.8.0_201]
>     at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>  ~[?:1.8.0_201]
>     ... 1 more
> *Caused by: java.util.concurrent.TimeoutException: Idle timeout 5000 ms*
>     at 
> org.eclipse.jetty.client.http.HttpConnectionOverHTTP.onIdleExpired(HttpConnectionOverHTTP.java:145)

[jira] [Created] (CAMEL-13999) Salesforce Component IDLE_TIMEOUT Blocks Async Request Responses for 2.x

2019-09-20 Thread Hemang Ajmera (Jira)
Hemang Ajmera created CAMEL-13999:
-

 Summary: Salesforce Component IDLE_TIMEOUT Blocks Async Request 
Responses for 2.x
 Key: CAMEL-13999
 URL: https://issues.apache.org/jira/browse/CAMEL-13999
 Project: Camel
  Issue Type: Bug
  Components: camel-salesforce
Affects Versions: 2.23.0
Reporter: Hemang Ajmera
Assignee: Claus Ibsen
 Fix For: 3.0.0, 3.0.0.RC1


Bulk, Composite Batch, etc. all throw an exception when trying to return on 
more than a few records due to [static final 
IDLE_TIMEOUT|https://github.com/apache/camel/blob/master/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/SalesforceComponent.java#L80]
 on the instantiated salesforce component httpClient:

 

Caused by: org.apache.camel.component.salesforce.api.SalesforceException: 
Unexpected error \{0:null} executing 
\{POST:https://genericSFDCInstance.salesforce.com/services/data/v38.0/composite/batch}
    at 
org.apache.camel.component.salesforce.internal.client.AbstractClientBase$1.onComplete(AbstractClientBase.java:199)
 ~[camel-salesforce-2.23.0.jar:2.23.0]
    at 
org.eclipse.jetty.client.ResponseNotifier.notifyComplete(ResponseNotifier.java:202)
 ~[jetty-client-9.4.12.v20180830.jar:9.4.12.v20180830]
    at 
org.eclipse.jetty.client.ResponseNotifier.notifyComplete(ResponseNotifier.java:194)
 ~[jetty-client-9.4.12.v20180830.jar:9.4.12.v20180830]
    at 
org.eclipse.jetty.client.HttpReceiver.terminateResponse(HttpReceiver.java:470) 
~[jetty-client-9.4.12.v20180830.jar:9.4.12.v20180830]
    at org.eclipse.jetty.client.HttpReceiver.abort(HttpReceiver.java:552) 
~[jetty-client-9.4.12.v20180830.jar:9.4.12.v20180830]
    at 
org.eclipse.jetty.client.HttpChannel.abortResponse(HttpChannel.java:156) 
~[jetty-client-9.4.12.v20180830.jar:9.4.12.v20180830]
    at org.eclipse.jetty.client.HttpChannel.abort(HttpChannel.java:149) 
~[jetty-client-9.4.12.v20180830.jar:9.4.12.v20180830]
    at org.eclipse.jetty.client.HttpExchange.abort(HttpExchange.java:257) 
~[jetty-client-9.4.12.v20180830.jar:9.4.12.v20180830]
    at 
org.eclipse.jetty.client.HttpConversation.abort(HttpConversation.java:141) 
~[jetty-client-9.4.12.v20180830.jar:9.4.12.v20180830]
    at org.eclipse.jetty.client.HttpRequest.abort(HttpRequest.java:767) 
~[jetty-client-9.4.12.v20180830.jar:9.4.12.v20180830]
    at 
org.eclipse.jetty.client.http.HttpConnectionOverHTTP.abort(HttpConnectionOverHTTP.java:204)
 ~[jetty-client-9.4.12.v20180830.jar:9.4.12.v20180830]
    at 
org.eclipse.jetty.client.http.HttpConnectionOverHTTP.close(HttpConnectionOverHTTP.java:190)
 ~[jetty-client-9.4.12.v20180830.jar:9.4.12.v20180830]
    at 
org.eclipse.jetty.client.http.HttpConnectionOverHTTP.onIdleExpired(HttpConnectionOverHTTP.java:145)
 ~[jetty-client-9.4.12.v20180830.jar:9.4.12.v20180830]
    at 
org.eclipse.jetty.io.ssl.SslConnection.onIdleExpired(SslConnection.java:286) 
~[jetty-io-9.4.12.v20180830.jar:9.4.12.v20180830]
    at 
org.eclipse.jetty.io.AbstractEndPoint.onIdleExpired(AbstractEndPoint.java:401) 
~[jetty-io-9.4.12.v20180830.jar:9.4.12.v20180830]
    at 
org.eclipse.jetty.io.IdleTimeout.checkIdleTimeout(IdleTimeout.java:166) 
~[jetty-io-9.4.12.v20180830.jar:9.4.12.v20180830]
    at org.eclipse.jetty.io.IdleTimeout$1.run(IdleTimeout.java:50) 
~[jetty-io-9.4.12.v20180830.jar:9.4.12.v20180830]
    at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) 
~[?:1.8.0_201]
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) 
~[?:1.8.0_201]
    at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
 ~[?:1.8.0_201]
    at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
 ~[?:1.8.0_201]
    at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) 
~[?:1.8.0_201]
    at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) 
~[?:1.8.0_201]
    ... 1 more


*Caused by: java.util.concurrent.TimeoutException: Idle timeout 5000 ms*
    at 
org.eclipse.jetty.client.http.HttpConnectionOverHTTP.onIdleExpired(HttpConnectionOverHTTP.java:145)
 ~[jetty-client-9.4.12.v20180830.jar:9.4.12.v20180830]
    at 
org.eclipse.jetty.io.ssl.SslConnection.onIdleExpired(SslConnection.java:286) 
~[jetty-io-9.4.12.v20180830.jar:9.4.12.v20180830]
    at 
org.eclipse.jetty.io.AbstractEndPoint.onIdleExpired(AbstractEndPoint.java:401) 
~[jetty-io-9.4.12.v20180830.jar:9.4.12.v20180830]
    at 
org.eclipse.jetty.io.IdleTimeout.checkIdleTimeout(IdleTimeout.java:166) 
~[jetty-io-9.4.12.v20180830.jar:9.4.12.v20180830]
    at org.eclipse.jetty.io.IdleTimeout$1.run(IdleTimeout.java:50) 

[jira] [Commented] (CAMEL-13766) Salesforce component Mocking does not work correctly

2019-08-02 Thread Hemang Ajmera (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-13766?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16899008#comment-16899008
 ] 

Hemang Ajmera commented on CAMEL-13766:
---

I did more analysis into this. I noticed that during initialization salesfoce 
component does not try to login if lazylogin is set to true. But it tries to 
login when starts the route. Sharing here, in case it helps resolving the issue.

> Salesforce component Mocking does not work correctly
> 
>
> Key: CAMEL-13766
> URL: https://issues.apache.org/jira/browse/CAMEL-13766
> Project: Camel
>  Issue Type: Bug
>  Components: camel-salesforce, camel-test
>Affects Versions: 2.24.0
>Reporter: Hemang Ajmera
>Priority: Minor
> Attachments: CAMEL-13766-Code.zip, camel-13766.log.zip
>
>
> In my unit test, I am replacing salesfoce component with a mock. However, 
> still the component is getting activated with being replace with mock. 
> Because of this test case fails in our Jenkins environment as from Jenkins 
> server, there is no connectivity to salesforce.
>  
> Here is the part of unit test code
> {code:java}
>     @EndpointInject(uri = "mock:salesforce:query")
>     private MockEndpoint sfMock;
>     String sfResponse = "{}"; // Expected  response value from SF
>     RouteDefinition mainRoute = context.getRouteDefinition("main-route");
>     mainRoute.adviceWith(context, new AdviceWithRouteBuilder(){
>     
>     @Override
>     public void configure() throws Exception {
>     mockEndpointsAndSkip("salesforce.*");
>     }
>     });
>     sfMock.whenAnyExchangeReceived(new Processor(){
>     @Override
>     public void process(Exchange exchange) throws Exception {
>     exchange.getIn().setBody(sfResponse);
>     }
>     });{code}
> Here is the logs in my local machine
>  
> {quote}
> 2019-07-18 13:43:42.719  INFO 4288 --- [   main] 
> org.eclipse.jetty.util.log   : Logging initialized @22433ms to 
> org.eclipse.jetty.util.log.Slf4jLog}}
> {{2019-07-18 13:43:42.890  INFO 4288 --- [   main] 
> o.a.c.util.jsse.SSLContextParameters : Available providers: SUN version 
> 1.8.}}
> {{2019-07-18 13:43:43.608  INFO 4288 --- [   main] 
> o.a.c.c.s.internal.SalesforceSession : Login at Salesforce loginUrl: 
> https://test.salesforce.com/services/oauth2/token}}
> {{2019-07-18 13:43:46.514  INFO 4288 --- [   main] 
> o.a.c.c.s.internal.SalesforceSession : Login successful}}
> {{2019-07-18 13:43:46.519  INFO 4288 --- [   main] 
> o.a.c.c.salesforce.SalesforceComponent   : Found 0 generated classes in 
> packages: [org.apache.camel.salesforce.dto]}}
> {{2019-07-18 13:43:46.523  INFO 4288 --- [   main] 
> .c.i.InterceptSendToMockEndpointStrategy : Adviced endpoint 
> [salesforce://query?format=JSON=true=SELECT+Id%2C+OwnerId%2CLastModifiedById%2CLastModifiedDate+FROM+Account+WHERE+Id+IN%28%27abcd%27%29]
>  with mock endpoint [mock:salesforce:query]
> {quote}
> We can clearly see the component is initiated first and then replaced with 
> mock. The idea of replacing with mock is that we should be able to test even 
> if component cannot be initiated.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Commented] (CAMEL-13770) Properties of class Map does not work with Spring Boot 2.x

2019-08-01 Thread Hemang Ajmera (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-13770?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16898561#comment-16898561
 ] 

Hemang Ajmera commented on CAMEL-13770:
---

hi
  I was searching for release calendar or guideline. Do you know when are these 
version planned to be released?

> Properties of class Map does not work with Spring Boot 2.x
> --
>
> Key: CAMEL-13770
> URL: https://issues.apache.org/jira/browse/CAMEL-13770
> Project: Camel
>  Issue Type: Bug
>  Components: camel-salesforce, camel-spring-boot-starters
>Affects Versions: 2.23.3, 2.24.1
>Reporter: Hemang Ajmera
>Assignee: Claus Ibsen
>Priority: Major
> Fix For: 3.0.0, 2.23.4, 2.24.2, 2.25.0, 3.0.0.M5
>
> Attachments: screenshot-with-2.21.1.png, screenshot-with-2.24.1.png
>
>
> From version 2.22.0 onwards spring-boot version is upgraded to 2.x
> After that all Map properties are not working
> For example in application.properties
> camel.component.salesforce.http-client-properties is treated as string 
> instead of Map and whatever value we provide to it, the Map is initialize as 
> null



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Commented] (CAMEL-13766) Salesforce component Mocking does not work correctly

2019-08-01 Thread Hemang Ajmera (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-13766?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16897883#comment-16897883
 ] 

Hemang Ajmera commented on CAMEL-13766:
---

[~davsclaus] any clue on this one?

> Salesforce component Mocking does not work correctly
> 
>
> Key: CAMEL-13766
> URL: https://issues.apache.org/jira/browse/CAMEL-13766
> Project: Camel
>  Issue Type: Bug
>  Components: camel-salesforce, camel-test
>Affects Versions: 2.24.0
>Reporter: Hemang Ajmera
>Priority: Minor
> Attachments: CAMEL-13766-Code.zip, camel-13766.log.zip
>
>
> In my unit test, I am replacing salesfoce component with a mock. However, 
> still the component is getting activated with being replace with mock. 
> Because of this test case fails in our Jenkins environment as from Jenkins 
> server, there is no connectivity to salesforce.
>  
> Here is the part of unit test code
> {code:java}
>     @EndpointInject(uri = "mock:salesforce:query")
>     private MockEndpoint sfMock;
>     String sfResponse = "{}"; // Expected  response value from SF
>     RouteDefinition mainRoute = context.getRouteDefinition("main-route");
>     mainRoute.adviceWith(context, new AdviceWithRouteBuilder(){
>     
>     @Override
>     public void configure() throws Exception {
>     mockEndpointsAndSkip("salesforce.*");
>     }
>     });
>     sfMock.whenAnyExchangeReceived(new Processor(){
>     @Override
>     public void process(Exchange exchange) throws Exception {
>     exchange.getIn().setBody(sfResponse);
>     }
>     });{code}
> Here is the logs in my local machine
>  
> {quote}
> 2019-07-18 13:43:42.719  INFO 4288 --- [   main] 
> org.eclipse.jetty.util.log   : Logging initialized @22433ms to 
> org.eclipse.jetty.util.log.Slf4jLog}}
> {{2019-07-18 13:43:42.890  INFO 4288 --- [   main] 
> o.a.c.util.jsse.SSLContextParameters : Available providers: SUN version 
> 1.8.}}
> {{2019-07-18 13:43:43.608  INFO 4288 --- [   main] 
> o.a.c.c.s.internal.SalesforceSession : Login at Salesforce loginUrl: 
> https://test.salesforce.com/services/oauth2/token}}
> {{2019-07-18 13:43:46.514  INFO 4288 --- [   main] 
> o.a.c.c.s.internal.SalesforceSession : Login successful}}
> {{2019-07-18 13:43:46.519  INFO 4288 --- [   main] 
> o.a.c.c.salesforce.SalesforceComponent   : Found 0 generated classes in 
> packages: [org.apache.camel.salesforce.dto]}}
> {{2019-07-18 13:43:46.523  INFO 4288 --- [   main] 
> .c.i.InterceptSendToMockEndpointStrategy : Adviced endpoint 
> [salesforce://query?format=JSON=true=SELECT+Id%2C+OwnerId%2CLastModifiedById%2CLastModifiedDate+FROM+Account+WHERE+Id+IN%28%27abcd%27%29]
>  with mock endpoint [mock:salesforce:query]
> {quote}
> We can clearly see the component is initiated first and then replaced with 
> mock. The idea of replacing with mock is that we should be able to test even 
> if component cannot be initiated.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Commented] (CAMEL-13770) Properties of class Map does not work with Spring Boot 2.x

2019-07-24 Thread Hemang Ajmera (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-13770?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16891819#comment-16891819
 ] 

Hemang Ajmera commented on CAMEL-13770:
---

Can this be please fixed in version 2.x also.




> Properties of class Map does not work with Spring Boot 2.x
> --
>
> Key: CAMEL-13770
> URL: https://issues.apache.org/jira/browse/CAMEL-13770
> Project: Camel
>  Issue Type: Bug
>  Components: camel-salesforce, camel-spring-boot-starters
>Affects Versions: 2.22.0, 2.23.3, 2.24.1
>Reporter: Hemang Ajmera
>Assignee: Claus Ibsen
>Priority: Major
> Fix For: 3.0.0, 3.0.0.M5
>
> Attachments: screenshot-with-2.21.1.png, screenshot-with-2.24.1.png
>
>
> From version 2.22.0 onwards spring-boot version is upgraded to 2.x
> After that all Map properties are not working
> For example in application.properties
> camel.component.salesforce.http-client-properties is treated as string 
> instead of Map and whatever value we provide to it, the Map is initialize as 
> null



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Commented] (CAMEL-13699) Add Json to Json transformation using JSLT

2019-07-23 Thread Hemang Ajmera (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-13699?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16890711#comment-16890711
 ] 

Hemang Ajmera commented on CAMEL-13699:
---

Any chances of this happening?

> Add Json to Json transformation using JSLT
> --
>
> Key: CAMEL-13699
> URL: https://issues.apache.org/jira/browse/CAMEL-13699
> Project: Camel
>  Issue Type: New Feature
>  Components: camel-jolt
>Reporter: Hemang Ajmera
>Priority: Major
>  Labels: features
>
> It will be really great to have an additional component camel-jslt similar to 
> camel-jolt. This component should use [https://github.com/schibsted/jslt] 
> library for transformation.
> I think JSLT is much simpler yet can do more complex transformation compared 
> to Jolt. Please have a look at 
> [https://github.com/schibsted/jslt/blob/master/tutorial.md] for brief 
> tutorial.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Comment Edited] (CAMEL-13770) Properties of class Map does not work with Spring Boot 2.x

2019-07-22 Thread Hemang Ajmera (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-13770?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16890157#comment-16890157
 ] 

Hemang Ajmera edited comment on CAMEL-13770 at 7/22/19 1:21 PM:


code attached in CAMEL-13766 can be used to check this.


was (Author: hemangajmera):
code attached in #13766 can be used to check this.

> Properties of class Map does not work with Spring Boot 2.x
> --
>
> Key: CAMEL-13770
> URL: https://issues.apache.org/jira/browse/CAMEL-13770
> Project: Camel
>  Issue Type: Bug
>  Components: camel-salesforce, camel-spring-boot-starters
>Affects Versions: 2.22.0, 2.23.3, 2.24.1
>Reporter: Hemang Ajmera
>Priority: Major
> Attachments: screenshot-with-2.21.1.png, screenshot-with-2.24.1.png
>
>
> From version 2.22.0 onwards spring-boot version is upgraded to 2.x
> After that all Map properties are not working
> For example in application.properties
> camel.component.salesforce.http-client-properties is treated as string 
> instead of Map and whatever value we provide to it, the Map is initialize as 
> null



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Commented] (CAMEL-13770) Properties of class Map does not work with Spring Boot 2.x

2019-07-22 Thread Hemang Ajmera (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-13770?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16890157#comment-16890157
 ] 

Hemang Ajmera commented on CAMEL-13770:
---

code attached in #13766 can be used to check this.

> Properties of class Map does not work with Spring Boot 2.x
> --
>
> Key: CAMEL-13770
> URL: https://issues.apache.org/jira/browse/CAMEL-13770
> Project: Camel
>  Issue Type: Bug
>  Components: camel-salesforce, camel-spring-boot-starters
>Affects Versions: 2.22.0, 2.23.3, 2.24.1
>Reporter: Hemang Ajmera
>Priority: Major
> Attachments: screenshot-with-2.21.1.png, screenshot-with-2.24.1.png
>
>
> From version 2.22.0 onwards spring-boot version is upgraded to 2.x
> After that all Map properties are not working
> For example in application.properties
> camel.component.salesforce.http-client-properties is treated as string 
> instead of Map and whatever value we provide to it, the Map is initialize as 
> null



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Commented] (CAMEL-13770) Properties of class Map does not work with Spring Boot 2.x

2019-07-22 Thread Hemang Ajmera (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-13770?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16890022#comment-16890022
 ] 

Hemang Ajmera commented on CAMEL-13770:
---

I was using camel.component.
{code:java}
salesforce.http-client-properties.requestBufferSize=65536
{code}

Since we have very long query. The default value is not sufficient.

If this parameter is not used, we get exception 
{code}
Caused by: org.eclipse.jetty.http.BadMessageException: 500: Request header too 
large
{code}

I also run in debug mode. When using old version, I can see 
httpClientProperties in SalesforceComponent as empty in new version and 
initialized with requestBufferSize in old version.

> Properties of class Map does not work with Spring Boot 2.x
> --
>
> Key: CAMEL-13770
> URL: https://issues.apache.org/jira/browse/CAMEL-13770
> Project: Camel
>  Issue Type: Bug
>  Components: camel-salesforce, camel-spring-boot-starters
>Affects Versions: 2.22.0, 2.23.3, 2.24.1
>Reporter: Hemang Ajmera
>Priority: Major
> Attachments: screenshot-with-2.21.1.png, screenshot-with-2.24.1.png
>
>
> From version 2.22.0 onwards spring-boot version is upgraded to 2.x
> After that all Map properties are not working
> For example in application.properties
> camel.component.salesforce.http-client-properties is treated as string 
> instead of Map and whatever value we provide to it, the Map is initialize as 
> null



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Comment Edited] (CAMEL-13770) Properties of class Map does not work with Spring Boot 2.x

2019-07-22 Thread Hemang Ajmera (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-13770?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16890022#comment-16890022
 ] 

Hemang Ajmera edited comment on CAMEL-13770 at 7/22/19 9:15 AM:


I was using camel.component.
{code:java}
salesforce.http-client-properties.requestBufferSize=65536
{code}

Since we have very long query. The default value is not sufficient.

If this parameter is not used, we get exception 
{code}
Caused by: org.eclipse.jetty.http.BadMessageException: 500: Request header too 
large
{code}

I also run in debug mode, where I can see httpClientProperties in 
SalesforceComponent as empty in new version and initialized with 
requestBufferSize in old version.


was (Author: hemangajmera):
I was using camel.component.
{code:java}
salesforce.http-client-properties.requestBufferSize=65536
{code}

Since we have very long query. The default value is not sufficient.

If this parameter is not used, we get exception 
{code}
Caused by: org.eclipse.jetty.http.BadMessageException: 500: Request header too 
large
{code}

I also run in debug mode. When using old version, I can see 
httpClientProperties in SalesforceComponent as empty in new version and 
initialized with requestBufferSize in old version.

> Properties of class Map does not work with Spring Boot 2.x
> --
>
> Key: CAMEL-13770
> URL: https://issues.apache.org/jira/browse/CAMEL-13770
> Project: Camel
>  Issue Type: Bug
>  Components: camel-salesforce, camel-spring-boot-starters
>Affects Versions: 2.22.0, 2.23.3, 2.24.1
>Reporter: Hemang Ajmera
>Priority: Major
> Attachments: screenshot-with-2.21.1.png, screenshot-with-2.24.1.png
>
>
> From version 2.22.0 onwards spring-boot version is upgraded to 2.x
> After that all Map properties are not working
> For example in application.properties
> camel.component.salesforce.http-client-properties is treated as string 
> instead of Map and whatever value we provide to it, the Map is initialize as 
> null



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Updated] (CAMEL-13770) Properties of class Map does not work with Spring Boot 2.x

2019-07-19 Thread Hemang Ajmera (JIRA)


 [ 
https://issues.apache.org/jira/browse/CAMEL-13770?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Hemang Ajmera updated CAMEL-13770:
--
Summary: Properties of class Map does not work with Spring Boot 2.x  (was: 
Properties of class Map does not work anymore)

> Properties of class Map does not work with Spring Boot 2.x
> --
>
> Key: CAMEL-13770
> URL: https://issues.apache.org/jira/browse/CAMEL-13770
> Project: Camel
>  Issue Type: Bug
>  Components: camel-salesforce, camel-spring-boot-starters
>Affects Versions: 2.22.0, 2.23.3, 2.24.1
>Reporter: Hemang Ajmera
>Priority: Major
> Attachments: screenshot-with-2.21.1.png, screenshot-with-2.24.1.png
>
>
> From version 2.22.0 onwards spring-boot version is upgraded to 2.x
> After that all Map properties are not working
> For example in application.properties
> camel.component.salesforce.http-client-properties is treated as string 
> instead of Map and whatever value we provide to it, the Map is initialize as 
> null



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Commented] (CAMEL-13770) Properties of class Map does not work anymore

2019-07-19 Thread Hemang Ajmera (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-13770?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16888793#comment-16888793
 ] 

Hemang Ajmera commented on CAMEL-13770:
---

This is with Camel 2.24.1 and Spring-boot 2.1.6 !screenshot-with-2.24.1.png! 

This is with camel 2.21.1 and spring-boot 1.5.21  !screenshot-with-2.21.1.png! 

> Properties of class Map does not work anymore
> -
>
> Key: CAMEL-13770
> URL: https://issues.apache.org/jira/browse/CAMEL-13770
> Project: Camel
>  Issue Type: Bug
>  Components: camel-salesforce, camel-spring-boot-starters
>Affects Versions: 2.22.0, 2.23.3, 2.24.1
>Reporter: Hemang Ajmera
>Priority: Major
> Attachments: screenshot-with-2.21.1.png, screenshot-with-2.24.1.png
>
>
> From version 2.22.0 onwards spring-boot version is upgraded to 2.x
> After that all Map properties are not working
> For example in application.properties
> camel.component.salesforce.http-client-properties is treated as string 
> instead of Map and whatever value we provide to it, the Map is initialize as 
> null



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Updated] (CAMEL-13770) Properties of class Map does not work anymore

2019-07-19 Thread Hemang Ajmera (JIRA)


 [ 
https://issues.apache.org/jira/browse/CAMEL-13770?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Hemang Ajmera updated CAMEL-13770:
--
Attachment: screenshot-with-2.21.1.png

> Properties of class Map does not work anymore
> -
>
> Key: CAMEL-13770
> URL: https://issues.apache.org/jira/browse/CAMEL-13770
> Project: Camel
>  Issue Type: Bug
>  Components: camel-salesforce, camel-spring-boot-starters
>Affects Versions: 2.22.0, 2.23.3, 2.24.1
>Reporter: Hemang Ajmera
>Priority: Major
> Attachments: screenshot-with-2.21.1.png, screenshot-with-2.24.1.png
>
>
> From version 2.22.0 onwards spring-boot version is upgraded to 2.x
> After that all Map properties are not working
> For example in application.properties
> camel.component.salesforce.http-client-properties is treated as string 
> instead of Map and whatever value we provide to it, the Map is initialize as 
> null



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Updated] (CAMEL-13770) Properties of class Map does not work anymore

2019-07-19 Thread Hemang Ajmera (JIRA)


 [ 
https://issues.apache.org/jira/browse/CAMEL-13770?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Hemang Ajmera updated CAMEL-13770:
--
Attachment: screenshot-with-2.24.1.png

> Properties of class Map does not work anymore
> -
>
> Key: CAMEL-13770
> URL: https://issues.apache.org/jira/browse/CAMEL-13770
> Project: Camel
>  Issue Type: Bug
>  Components: camel-salesforce, camel-spring-boot-starters
>Affects Versions: 2.22.0, 2.23.3, 2.24.1
>Reporter: Hemang Ajmera
>Priority: Major
> Attachments: screenshot-with-2.24.1.png
>
>
> From version 2.22.0 onwards spring-boot version is upgraded to 2.x
> After that all Map properties are not working
> For example in application.properties
> camel.component.salesforce.http-client-properties is treated as string 
> instead of Map and whatever value we provide to it, the Map is initialize as 
> null



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Created] (CAMEL-13770) Properties of class Map does not work anymore

2019-07-19 Thread Hemang Ajmera (JIRA)
Hemang Ajmera created CAMEL-13770:
-

 Summary: Properties of class Map does not work anymore
 Key: CAMEL-13770
 URL: https://issues.apache.org/jira/browse/CAMEL-13770
 Project: Camel
  Issue Type: Bug
  Components: camel-salesforce, camel-spring-boot-starters
Affects Versions: 2.24.1, 2.23.3, 2.22.0
Reporter: Hemang Ajmera


>From version 2.22.0 onwards spring-boot version is upgraded to 2.x
After that all Map properties are not working

For example in application.properties
camel.component.salesforce.http-client-properties is treated as string instead 
of Map and whatever value we provide to it, the Map is initialize as null





--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Commented] (CAMEL-13766) Salesforce component Mocking does not work correctly

2019-07-19 Thread Hemang Ajmera (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-13766?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16888783#comment-16888783
 ] 

Hemang Ajmera commented on CAMEL-13766:
---

Source code and debug log attached.

I tried using 3.0.0-M4, but test code could not compile as it. So couldn't test 
it.

> Salesforce component Mocking does not work correctly
> 
>
> Key: CAMEL-13766
> URL: https://issues.apache.org/jira/browse/CAMEL-13766
> Project: Camel
>  Issue Type: Bug
>  Components: camel-salesforce, camel-test
>Affects Versions: 2.24.0
>Reporter: Hemang Ajmera
>Priority: Minor
> Attachments: CAMEL-13766-Code.zip, camel-13766.log.zip
>
>
> In my unit test, I am replacing salesfoce component with a mock. However, 
> still the component is getting activated with being replace with mock. 
> Because of this test case fails in our Jenkins environment as from Jenkins 
> server, there is no connectivity to salesforce.
>  
> Here is the part of unit test code
> {code:java}
>     @EndpointInject(uri = "mock:salesforce:query")
>     private MockEndpoint sfMock;
>     String sfResponse = "{}"; // Expected  response value from SF
>     RouteDefinition mainRoute = context.getRouteDefinition("main-route");
>     mainRoute.adviceWith(context, new AdviceWithRouteBuilder(){
>     
>     @Override
>     public void configure() throws Exception {
>     mockEndpointsAndSkip("salesforce.*");
>     }
>     });
>     sfMock.whenAnyExchangeReceived(new Processor(){
>     @Override
>     public void process(Exchange exchange) throws Exception {
>     exchange.getIn().setBody(sfResponse);
>     }
>     });{code}
> Here is the logs in my local machine
>  
> {quote}
> 2019-07-18 13:43:42.719  INFO 4288 --- [   main] 
> org.eclipse.jetty.util.log   : Logging initialized @22433ms to 
> org.eclipse.jetty.util.log.Slf4jLog}}
> {{2019-07-18 13:43:42.890  INFO 4288 --- [   main] 
> o.a.c.util.jsse.SSLContextParameters : Available providers: SUN version 
> 1.8.}}
> {{2019-07-18 13:43:43.608  INFO 4288 --- [   main] 
> o.a.c.c.s.internal.SalesforceSession : Login at Salesforce loginUrl: 
> https://test.salesforce.com/services/oauth2/token}}
> {{2019-07-18 13:43:46.514  INFO 4288 --- [   main] 
> o.a.c.c.s.internal.SalesforceSession : Login successful}}
> {{2019-07-18 13:43:46.519  INFO 4288 --- [   main] 
> o.a.c.c.salesforce.SalesforceComponent   : Found 0 generated classes in 
> packages: [org.apache.camel.salesforce.dto]}}
> {{2019-07-18 13:43:46.523  INFO 4288 --- [   main] 
> .c.i.InterceptSendToMockEndpointStrategy : Adviced endpoint 
> [salesforce://query?format=JSON=true=SELECT+Id%2C+OwnerId%2CLastModifiedById%2CLastModifiedDate+FROM+Account+WHERE+Id+IN%28%27abcd%27%29]
>  with mock endpoint [mock:salesforce:query]
> {quote}
> We can clearly see the component is initiated first and then replaced with 
> mock. The idea of replacing with mock is that we should be able to test even 
> if component cannot be initiated.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Updated] (CAMEL-13766) Salesforce component Mocking does not work correctly

2019-07-19 Thread Hemang Ajmera (JIRA)


 [ 
https://issues.apache.org/jira/browse/CAMEL-13766?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Hemang Ajmera updated CAMEL-13766:
--
Attachment: camel-13766.log.zip

> Salesforce component Mocking does not work correctly
> 
>
> Key: CAMEL-13766
> URL: https://issues.apache.org/jira/browse/CAMEL-13766
> Project: Camel
>  Issue Type: Bug
>  Components: camel-salesforce, camel-test
>Affects Versions: 2.24.0
>Reporter: Hemang Ajmera
>Priority: Minor
> Attachments: CAMEL-13766-Code.zip, camel-13766.log.zip
>
>
> In my unit test, I am replacing salesfoce component with a mock. However, 
> still the component is getting activated with being replace with mock. 
> Because of this test case fails in our Jenkins environment as from Jenkins 
> server, there is no connectivity to salesforce.
>  
> Here is the part of unit test code
> {code:java}
>     @EndpointInject(uri = "mock:salesforce:query")
>     private MockEndpoint sfMock;
>     String sfResponse = "{}"; // Expected  response value from SF
>     RouteDefinition mainRoute = context.getRouteDefinition("main-route");
>     mainRoute.adviceWith(context, new AdviceWithRouteBuilder(){
>     
>     @Override
>     public void configure() throws Exception {
>     mockEndpointsAndSkip("salesforce.*");
>     }
>     });
>     sfMock.whenAnyExchangeReceived(new Processor(){
>     @Override
>     public void process(Exchange exchange) throws Exception {
>     exchange.getIn().setBody(sfResponse);
>     }
>     });{code}
> Here is the logs in my local machine
>  
> {quote}
> 2019-07-18 13:43:42.719  INFO 4288 --- [   main] 
> org.eclipse.jetty.util.log   : Logging initialized @22433ms to 
> org.eclipse.jetty.util.log.Slf4jLog}}
> {{2019-07-18 13:43:42.890  INFO 4288 --- [   main] 
> o.a.c.util.jsse.SSLContextParameters : Available providers: SUN version 
> 1.8.}}
> {{2019-07-18 13:43:43.608  INFO 4288 --- [   main] 
> o.a.c.c.s.internal.SalesforceSession : Login at Salesforce loginUrl: 
> https://test.salesforce.com/services/oauth2/token}}
> {{2019-07-18 13:43:46.514  INFO 4288 --- [   main] 
> o.a.c.c.s.internal.SalesforceSession : Login successful}}
> {{2019-07-18 13:43:46.519  INFO 4288 --- [   main] 
> o.a.c.c.salesforce.SalesforceComponent   : Found 0 generated classes in 
> packages: [org.apache.camel.salesforce.dto]}}
> {{2019-07-18 13:43:46.523  INFO 4288 --- [   main] 
> .c.i.InterceptSendToMockEndpointStrategy : Adviced endpoint 
> [salesforce://query?format=JSON=true=SELECT+Id%2C+OwnerId%2CLastModifiedById%2CLastModifiedDate+FROM+Account+WHERE+Id+IN%28%27abcd%27%29]
>  with mock endpoint [mock:salesforce:query]
> {quote}
> We can clearly see the component is initiated first and then replaced with 
> mock. The idea of replacing with mock is that we should be able to test even 
> if component cannot be initiated.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Updated] (CAMEL-13766) Salesforce component Mocking does not work correctly

2019-07-19 Thread Hemang Ajmera (JIRA)


 [ 
https://issues.apache.org/jira/browse/CAMEL-13766?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Hemang Ajmera updated CAMEL-13766:
--
Attachment: CAMEL-13766-Code.zip

> Salesforce component Mocking does not work correctly
> 
>
> Key: CAMEL-13766
> URL: https://issues.apache.org/jira/browse/CAMEL-13766
> Project: Camel
>  Issue Type: Bug
>  Components: camel-salesforce, camel-test
>Affects Versions: 2.24.0
>Reporter: Hemang Ajmera
>Priority: Minor
> Attachments: CAMEL-13766-Code.zip, camel-13766.log.zip
>
>
> In my unit test, I am replacing salesfoce component with a mock. However, 
> still the component is getting activated with being replace with mock. 
> Because of this test case fails in our Jenkins environment as from Jenkins 
> server, there is no connectivity to salesforce.
>  
> Here is the part of unit test code
> {code:java}
>     @EndpointInject(uri = "mock:salesforce:query")
>     private MockEndpoint sfMock;
>     String sfResponse = "{}"; // Expected  response value from SF
>     RouteDefinition mainRoute = context.getRouteDefinition("main-route");
>     mainRoute.adviceWith(context, new AdviceWithRouteBuilder(){
>     
>     @Override
>     public void configure() throws Exception {
>     mockEndpointsAndSkip("salesforce.*");
>     }
>     });
>     sfMock.whenAnyExchangeReceived(new Processor(){
>     @Override
>     public void process(Exchange exchange) throws Exception {
>     exchange.getIn().setBody(sfResponse);
>     }
>     });{code}
> Here is the logs in my local machine
>  
> {quote}
> 2019-07-18 13:43:42.719  INFO 4288 --- [   main] 
> org.eclipse.jetty.util.log   : Logging initialized @22433ms to 
> org.eclipse.jetty.util.log.Slf4jLog}}
> {{2019-07-18 13:43:42.890  INFO 4288 --- [   main] 
> o.a.c.util.jsse.SSLContextParameters : Available providers: SUN version 
> 1.8.}}
> {{2019-07-18 13:43:43.608  INFO 4288 --- [   main] 
> o.a.c.c.s.internal.SalesforceSession : Login at Salesforce loginUrl: 
> https://test.salesforce.com/services/oauth2/token}}
> {{2019-07-18 13:43:46.514  INFO 4288 --- [   main] 
> o.a.c.c.s.internal.SalesforceSession : Login successful}}
> {{2019-07-18 13:43:46.519  INFO 4288 --- [   main] 
> o.a.c.c.salesforce.SalesforceComponent   : Found 0 generated classes in 
> packages: [org.apache.camel.salesforce.dto]}}
> {{2019-07-18 13:43:46.523  INFO 4288 --- [   main] 
> .c.i.InterceptSendToMockEndpointStrategy : Adviced endpoint 
> [salesforce://query?format=JSON=true=SELECT+Id%2C+OwnerId%2CLastModifiedById%2CLastModifiedDate+FROM+Account+WHERE+Id+IN%28%27abcd%27%29]
>  with mock endpoint [mock:salesforce:query]
> {quote}
> We can clearly see the component is initiated first and then replaced with 
> mock. The idea of replacing with mock is that we should be able to test even 
> if component cannot be initiated.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Commented] (CAMEL-13766) Salesforce component Mocking does not work correctly

2019-07-18 Thread Hemang Ajmera (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-13766?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16888503#comment-16888503
 ] 

Hemang Ajmera commented on CAMEL-13766:
---

We are still using version 2.x in all our application, so as of now we are not 
ready for version 3.x. Also is 3.0.0-M4 production ready? My understanding is 
this version is somewhat similar to Beta version.

I will create a standalone minimal code to reproduce the situation and share 
the debug log shortly.

> Salesforce component Mocking does not work correctly
> 
>
> Key: CAMEL-13766
> URL: https://issues.apache.org/jira/browse/CAMEL-13766
> Project: Camel
>  Issue Type: Bug
>  Components: camel-salesforce, camel-test
>Affects Versions: 2.24.0
>Reporter: Hemang Ajmera
>Priority: Minor
>
> In my unit test, I am replacing salesfoce component with a mock. However, 
> still the component is getting activated with being replace with mock. 
> Because of this test case fails in our Jenkins environment as from Jenkins 
> server, there is no connectivity to salesforce.
>  
> Here is the part of unit test code
> {code:java}
>     @EndpointInject(uri = "mock:salesforce:query")
>     private MockEndpoint sfMock;
>     String sfResponse = "{}"; // Expected  response value from SF
>     RouteDefinition mainRoute = context.getRouteDefinition("main-route");
>     mainRoute.adviceWith(context, new AdviceWithRouteBuilder(){
>     
>     @Override
>     public void configure() throws Exception {
>     mockEndpointsAndSkip("salesforce.*");
>     }
>     });
>     sfMock.whenAnyExchangeReceived(new Processor(){
>     @Override
>     public void process(Exchange exchange) throws Exception {
>     exchange.getIn().setBody(sfResponse);
>     }
>     });{code}
> Here is the logs in my local machine
>  
> {quote}
> 2019-07-18 13:43:42.719  INFO 4288 --- [   main] 
> org.eclipse.jetty.util.log   : Logging initialized @22433ms to 
> org.eclipse.jetty.util.log.Slf4jLog}}
> {{2019-07-18 13:43:42.890  INFO 4288 --- [   main] 
> o.a.c.util.jsse.SSLContextParameters : Available providers: SUN version 
> 1.8.}}
> {{2019-07-18 13:43:43.608  INFO 4288 --- [   main] 
> o.a.c.c.s.internal.SalesforceSession : Login at Salesforce loginUrl: 
> https://test.salesforce.com/services/oauth2/token}}
> {{2019-07-18 13:43:46.514  INFO 4288 --- [   main] 
> o.a.c.c.s.internal.SalesforceSession : Login successful}}
> {{2019-07-18 13:43:46.519  INFO 4288 --- [   main] 
> o.a.c.c.salesforce.SalesforceComponent   : Found 0 generated classes in 
> packages: [org.apache.camel.salesforce.dto]}}
> {{2019-07-18 13:43:46.523  INFO 4288 --- [   main] 
> .c.i.InterceptSendToMockEndpointStrategy : Adviced endpoint 
> [salesforce://query?format=JSON=true=SELECT+Id%2C+OwnerId%2CLastModifiedById%2CLastModifiedDate+FROM+Account+WHERE+Id+IN%28%27abcd%27%29]
>  with mock endpoint [mock:salesforce:query]
> {quote}
> We can clearly see the component is initiated first and then replaced with 
> mock. The idea of replacing with mock is that we should be able to test even 
> if component cannot be initiated.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Commented] (CAMEL-13766) Salesforce component Mocking does not work correctly

2019-07-18 Thread Hemang Ajmera (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-13766?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16887867#comment-16887867
 ] 

Hemang Ajmera commented on CAMEL-13766:
---

Added camel.component.salesforce.lazy-login=true in application.properties. 
Still it is login to salesforce.

> Salesforce component Mocking does not work correctly
> 
>
> Key: CAMEL-13766
> URL: https://issues.apache.org/jira/browse/CAMEL-13766
> Project: Camel
>  Issue Type: Bug
>  Components: camel-salesforce, camel-test
>Affects Versions: 2.24.0
>Reporter: Hemang Ajmera
>Priority: Minor
>
> In my unit test, I am replacing salesfoce component with a mock. However, 
> still the component is getting activated with being replace with mock. 
> Because of this test case fails in our Jenkins environment as from Jenkins 
> server, there is no connectivity to salesforce.
>  
> Here is the part of unit test code
> {code:java}
>     @EndpointInject(uri = "mock:salesforce:query")
>     private MockEndpoint sfMock;
>     String sfResponse = "{}"; // Expected  response value from SF
>     RouteDefinition mainRoute = context.getRouteDefinition("main-route");
>     mainRoute.adviceWith(context, new AdviceWithRouteBuilder(){
>     
>     @Override
>     public void configure() throws Exception {
>     mockEndpointsAndSkip("salesforce.*");
>     }
>     });
>     sfMock.whenAnyExchangeReceived(new Processor(){
>     @Override
>     public void process(Exchange exchange) throws Exception {
>     exchange.getIn().setBody(sfResponse);
>     }
>     });{code}
> Here is the logs in my local machine
>  
> {quote}
> 2019-07-18 13:43:42.719  INFO 4288 --- [   main] 
> org.eclipse.jetty.util.log   : Logging initialized @22433ms to 
> org.eclipse.jetty.util.log.Slf4jLog}}
> {{2019-07-18 13:43:42.890  INFO 4288 --- [   main] 
> o.a.c.util.jsse.SSLContextParameters : Available providers: SUN version 
> 1.8.}}
> {{2019-07-18 13:43:43.608  INFO 4288 --- [   main] 
> o.a.c.c.s.internal.SalesforceSession : Login at Salesforce loginUrl: 
> https://test.salesforce.com/services/oauth2/token}}
> {{2019-07-18 13:43:46.514  INFO 4288 --- [   main] 
> o.a.c.c.s.internal.SalesforceSession : Login successful}}
> {{2019-07-18 13:43:46.519  INFO 4288 --- [   main] 
> o.a.c.c.salesforce.SalesforceComponent   : Found 0 generated classes in 
> packages: [org.apache.camel.salesforce.dto]}}
> {{2019-07-18 13:43:46.523  INFO 4288 --- [   main] 
> .c.i.InterceptSendToMockEndpointStrategy : Adviced endpoint 
> [salesforce://query?format=JSON=true=SELECT+Id%2C+OwnerId%2CLastModifiedById%2CLastModifiedDate+FROM+Account+WHERE+Id+IN%28%27abcd%27%29]
>  with mock endpoint [mock:salesforce:query]
> {quote}
> We can clearly see the component is initiated first and then replaced with 
> mock. The idea of replacing with mock is that we should be able to test even 
> if component cannot be initiated.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Commented] (CAMEL-13766) Salesforce component Mocking does not work correctly

2019-07-18 Thread Hemang Ajmera (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-13766?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16887826#comment-16887826
 ] 

Hemang Ajmera commented on CAMEL-13766:
---

Here is complete test class where some of the client details are 
removed/replaced

{code:java}

package xxx.routing;

import xxx.AccountApplication;

import org.apache.camel.CamelContext;
import org.apache.camel.EndpointInject;
import org.apache.camel.Exchange;
import org.apache.camel.Processor;
import org.apache.camel.ProducerTemplate;
import org.apache.camel.builder.AdviceWithRouteBuilder;
import org.apache.camel.component.mock.MockEndpoint;
import org.apache.camel.model.RouteDefinition;
import org.apache.camel.test.spring.CamelSpringBootRunner;
import org.apache.camel.test.spring.UseAdviceWith;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

@RunWith(CamelSpringBootRunner.class)
@SpringBootTest(classes = AccountApplication.class)
@UseAdviceWith
public class AccountRouteTest {

@Autowired
private CamelContext context;

@Autowired
private ProducerTemplate template;

@EndpointInject(uri = "mock:ems:topic:{{tibcoems.topicname.account}}")
private MockEndpoint target2Mock;

@EndpointInject(uri = "mock:ems:queue:{{tibcoems.queuename.account}}")
private MockEndpoint target1Mock;


@EndpointInject(uri = "mock:salesforce:query")
private MockEndpoint sfMock;

@Test
public void testMessageWithOneId() throws Exception {

RouteDefinition deliveryAccountOwnerMain = 
context.getRouteDefinition("delivery-accountowner-main");
deliveryAccountOwnerMain.adviceWith(context, new 
AdviceWithRouteBuilder(){

@Override
public void configure() throws Exception {
replaceFromWith("direct:hitme");
mockEndpointsAndSkip("ems.*");
mockEndpointsAndSkip("salesforce.*"); 
}
});

String input = "input data";

String sfResponse = "sf response data";

String expectedtarget2 = "expected target 1";

context.start();

sfMock.whenAnyExchangeReceived(new Processor(){
@Override
public void process(Exchange exchange) throws Exception {
exchange.getIn().setBody(sfResponse);
}
});

//Set all expections
target2Mock.expectedBodiesReceived(expectedtarget2);
target1Mock.allMessages().xpath("//UserId/text()").isEqualTo("user");

target1Mock.allMessages().xpath("//Email/text()").isEqualTo("u...@example.com");

//Trigger the message
template.sendBody("direct:hitme", input);

//Confirm all expections
target2Mock.assertIsSatisfied();
target1Mock.assertIsSatisfied();

}

}
{code}


> Salesforce component Mocking does not work correctly
> 
>
> Key: CAMEL-13766
> URL: https://issues.apache.org/jira/browse/CAMEL-13766
> Project: Camel
>  Issue Type: Bug
>  Components: camel-salesforce, camel-test
>Affects Versions: 2.24.0
>Reporter: Hemang Ajmera
>Priority: Minor
>
> In my unit test, I am replacing salesfoce component with a mock. However, 
> still the component is getting activated with being replace with mock. 
> Because of this test case fails in our Jenkins environment as from Jenkins 
> server, there is no connectivity to salesforce.
>  
> Here is the part of unit test code
> {code:java}
>     @EndpointInject(uri = "mock:salesforce:query")
>     private MockEndpoint sfMock;
>     String sfResponse = "{}"; // Expected  response value from SF
>     RouteDefinition mainRoute = context.getRouteDefinition("main-route");
>     mainRoute.adviceWith(context, new AdviceWithRouteBuilder(){
>     
>     @Override
>     public void configure() throws Exception {
>     mockEndpointsAndSkip("salesforce.*");
>     }
>     });
>     sfMock.whenAnyExchangeReceived(new Processor(){
>     @Override
>     public void process(Exchange exchange) throws Exception {
>     exchange.getIn().setBody(sfResponse);
>     }
>     });{code}
> Here is the logs in my local machine
>  
> {quote}
> 2019-07-18 13:43:42.719  INFO 4288 --- [   main] 
> org.eclipse.jetty.util.log   : Logging initialized @22433ms to 
> org.eclipse.jetty.util.log.Slf4jLog}}
> {{2019-07-18 13:43:42.890  INFO 4288 --- [   main] 
> o.a.c.util.jsse.SSLContextParameters : Available providers: SUN version 
> 1.8.}}
> {{2019-07-18 13:43:43.608  INFO 4288 --- [   main] 
> o.a.c.c.s.internal.SalesforceSession : Login 

[jira] [Commented] (CAMEL-13766) Salesforce component Mocking does not work correctly

2019-07-18 Thread Hemang Ajmera (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-13766?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16887812#comment-16887812
 ] 

Hemang Ajmera commented on CAMEL-13766:
---

I am already doing it. This is my Test class declaration

{code:java}

@RunWith(CamelSpringBootRunner.class)
@SpringBootTest(classes = AccountOwnerNotificationApplication.class)
@UseAdviceWith
public class AccountOwnerNotificationRouteTest {
{code}


> Salesforce component Mocking does not work correctly
> 
>
> Key: CAMEL-13766
> URL: https://issues.apache.org/jira/browse/CAMEL-13766
> Project: Camel
>  Issue Type: Bug
>  Components: camel-salesforce, camel-test
>Affects Versions: 2.24.0
>Reporter: Hemang Ajmera
>Priority: Minor
>
> In my unit test, I am replacing salesfoce component with a mock. However, 
> still the component is getting activated with being replace with mock. 
> Because of this test case fails in our Jenkins environment as from Jenkins 
> server, there is no connectivity to salesforce.
>  
> Here is the part of unit test code
> {code:java}
>     @EndpointInject(uri = "mock:salesforce:query")
>     private MockEndpoint sfMock;
>     String sfResponse = "{}"; // Expected  response value from SF
>     RouteDefinition mainRoute = context.getRouteDefinition("main-route");
>     mainRoute.adviceWith(context, new AdviceWithRouteBuilder(){
>     
>     @Override
>     public void configure() throws Exception {
>     mockEndpointsAndSkip("salesforce.*");
>     }
>     });
>     sfMock.whenAnyExchangeReceived(new Processor(){
>     @Override
>     public void process(Exchange exchange) throws Exception {
>     exchange.getIn().setBody(sfResponse);
>     }
>     });{code}
> Here is the logs in my local machine
>  
> {quote}
> 2019-07-18 13:43:42.719  INFO 4288 --- [   main] 
> org.eclipse.jetty.util.log   : Logging initialized @22433ms to 
> org.eclipse.jetty.util.log.Slf4jLog}}
> {{2019-07-18 13:43:42.890  INFO 4288 --- [   main] 
> o.a.c.util.jsse.SSLContextParameters : Available providers: SUN version 
> 1.8.}}
> {{2019-07-18 13:43:43.608  INFO 4288 --- [   main] 
> o.a.c.c.s.internal.SalesforceSession : Login at Salesforce loginUrl: 
> https://test.salesforce.com/services/oauth2/token}}
> {{2019-07-18 13:43:46.514  INFO 4288 --- [   main] 
> o.a.c.c.s.internal.SalesforceSession : Login successful}}
> {{2019-07-18 13:43:46.519  INFO 4288 --- [   main] 
> o.a.c.c.salesforce.SalesforceComponent   : Found 0 generated classes in 
> packages: [org.apache.camel.salesforce.dto]}}
> {{2019-07-18 13:43:46.523  INFO 4288 --- [   main] 
> .c.i.InterceptSendToMockEndpointStrategy : Adviced endpoint 
> [salesforce://query?format=JSON=true=SELECT+Id%2C+OwnerId%2CLastModifiedById%2CLastModifiedDate+FROM+Account+WHERE+Id+IN%28%27abcd%27%29]
>  with mock endpoint [mock:salesforce:query]
> {quote}
> We can clearly see the component is initiated first and then replaced with 
> mock. The idea of replacing with mock is that we should be able to test even 
> if component cannot be initiated.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Updated] (CAMEL-13766) Salesforce component Mocking does not work correctly

2019-07-18 Thread Hemang Ajmera (JIRA)


 [ 
https://issues.apache.org/jira/browse/CAMEL-13766?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Hemang Ajmera updated CAMEL-13766:
--
Component/s: camel-test

> Salesforce component Mocking does not work correctly
> 
>
> Key: CAMEL-13766
> URL: https://issues.apache.org/jira/browse/CAMEL-13766
> Project: Camel
>  Issue Type: Bug
>  Components: camel-salesforce, camel-test
>Affects Versions: 2.24.0
>Reporter: Hemang Ajmera
>Priority: Minor
>
> In my unit test, I am replacing salesfoce component with a mock. However, 
> still the component is getting activated with being replace with mock. 
> Because of this test case fails in our Jenkins environment as from Jenkins 
> server, there is no connectivity to salesforce.
>  
> Here is the part of unit test code
> {code:java}
>     @EndpointInject(uri = "mock:salesforce:query")
>     private MockEndpoint sfMock;
>     String sfResponse = "{}"; // Expected  response value from SF
>     RouteDefinition mainRoute = context.getRouteDefinition("main-route");
>     mainRoute.adviceWith(context, new AdviceWithRouteBuilder(){
>     
>     @Override
>     public void configure() throws Exception {
>     mockEndpointsAndSkip("salesforce.*");
>     }
>     });
>     sfMock.whenAnyExchangeReceived(new Processor(){
>     @Override
>     public void process(Exchange exchange) throws Exception {
>     exchange.getIn().setBody(sfResponse);
>     }
>     });{code}
> Here is the logs in my local machine
>  
> {quote}
> 2019-07-18 13:43:42.719  INFO 4288 --- [   main] 
> org.eclipse.jetty.util.log   : Logging initialized @22433ms to 
> org.eclipse.jetty.util.log.Slf4jLog}}
> {{2019-07-18 13:43:42.890  INFO 4288 --- [   main] 
> o.a.c.util.jsse.SSLContextParameters : Available providers: SUN version 
> 1.8.}}
> {{2019-07-18 13:43:43.608  INFO 4288 --- [   main] 
> o.a.c.c.s.internal.SalesforceSession : Login at Salesforce loginUrl: 
> https://test.salesforce.com/services/oauth2/token}}
> {{2019-07-18 13:43:46.514  INFO 4288 --- [   main] 
> o.a.c.c.s.internal.SalesforceSession : Login successful}}
> {{2019-07-18 13:43:46.519  INFO 4288 --- [   main] 
> o.a.c.c.salesforce.SalesforceComponent   : Found 0 generated classes in 
> packages: [org.apache.camel.salesforce.dto]}}
> {{2019-07-18 13:43:46.523  INFO 4288 --- [   main] 
> .c.i.InterceptSendToMockEndpointStrategy : Adviced endpoint 
> [salesforce://query?format=JSON=true=SELECT+Id%2C+OwnerId%2CLastModifiedById%2CLastModifiedDate+FROM+Account+WHERE+Id+IN%28%27abcd%27%29]
>  with mock endpoint [mock:salesforce:query]
> {quote}
> We can clearly see the component is initiated first and then replaced with 
> mock. The idea of replacing with mock is that we should be able to test even 
> if component cannot be initiated.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Created] (CAMEL-13766) Salesforce component Mocking does not work correctly

2019-07-18 Thread Hemang Ajmera (JIRA)
Hemang Ajmera created CAMEL-13766:
-

 Summary: Salesforce component Mocking does not work correctly
 Key: CAMEL-13766
 URL: https://issues.apache.org/jira/browse/CAMEL-13766
 Project: Camel
  Issue Type: Bug
  Components: camel-salesforce
Affects Versions: 2.24.0
Reporter: Hemang Ajmera


In my unit test, I am replacing salesfoce component with a mock. However, still 
the component is getting activated with being replace with mock. Because of 
this test case fails in our Jenkins environment as from Jenkins server, there 
is no connectivity to salesforce.

 

Here is the part of unit test code

{code:java}
    @EndpointInject(uri = "mock:salesforce:query")
    private MockEndpoint sfMock;

    String sfResponse = "{}"; // Expected  response value from SF

    RouteDefinition mainRoute = context.getRouteDefinition("main-route");
    mainRoute.adviceWith(context, new AdviceWithRouteBuilder(){
    
    @Override
    public void configure() throws Exception {
    mockEndpointsAndSkip("salesforce.*");
    }
    });
    sfMock.whenAnyExchangeReceived(new Processor(){
    @Override
    public void process(Exchange exchange) throws Exception {
    exchange.getIn().setBody(sfResponse);
    }
    });{code}

Here is the logs in my local machine
 
{quote}
2019-07-18 13:43:42.719  INFO 4288 --- [   main] 
org.eclipse.jetty.util.log   : Logging initialized @22433ms to 
org.eclipse.jetty.util.log.Slf4jLog}}
{{2019-07-18 13:43:42.890  INFO 4288 --- [   main] 
o.a.c.util.jsse.SSLContextParameters : Available providers: SUN version 
1.8.}}
{{2019-07-18 13:43:43.608  INFO 4288 --- [   main] 
o.a.c.c.s.internal.SalesforceSession : Login at Salesforce loginUrl: 
https://test.salesforce.com/services/oauth2/token}}
{{2019-07-18 13:43:46.514  INFO 4288 --- [   main] 
o.a.c.c.s.internal.SalesforceSession : Login successful}}
{{2019-07-18 13:43:46.519  INFO 4288 --- [   main] 
o.a.c.c.salesforce.SalesforceComponent   : Found 0 generated classes in 
packages: [org.apache.camel.salesforce.dto]}}
{{2019-07-18 13:43:46.523  INFO 4288 --- [   main] 
.c.i.InterceptSendToMockEndpointStrategy : Adviced endpoint 
[salesforce://query?format=JSON=true=SELECT+Id%2C+OwnerId%2CLastModifiedById%2CLastModifiedDate+FROM+Account+WHERE+Id+IN%28%27abcd%27%29]
 with mock endpoint [mock:salesforce:query]
{quote}

We can clearly see the component is initiated first and then replaced with 
mock. The idea of replacing with mock is that we should be able to test even if 
component cannot be initiated.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Created] (CAMEL-13740) Document for XStream JSON not proper

2019-07-08 Thread Hemang Ajmera (JIRA)
Hemang Ajmera created CAMEL-13740:
-

 Summary: Document for XStream JSON not proper
 Key: CAMEL-13740
 URL: https://issues.apache.org/jira/browse/CAMEL-13740
 Project: Camel
  Issue Type: Improvement
  Components: documentation
Affects Versions: 3.0.0-M3
Reporter: Hemang Ajmera


The document of Json Xtream 
[https://github.com/apache/camel/blob/master/components/camel-xstream/src/main/docs/json-xstream-dataformat.adoc]
 is exactly identical to Xstream 
[https://github.com/apache/camel/blob/master/components/camel-xstream/src/main/docs/xstream-dataformat.adoc.]

 

Although both uses same component, but JSON xtream document should have 
document on how to convert JSON to object and vis versa. But it also talks 
about XML. This needs to be improved.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (CAMEL-13699) Add Json to Json transformation using JSLT

2019-07-05 Thread Hemang Ajmera (JIRA)


 [ 
https://issues.apache.org/jira/browse/CAMEL-13699?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Hemang Ajmera updated CAMEL-13699:
--
Estimated Complexity: Moderate  (was: Unknown)

> Add Json to Json transformation using JSLT
> --
>
> Key: CAMEL-13699
> URL: https://issues.apache.org/jira/browse/CAMEL-13699
> Project: Camel
>  Issue Type: New Feature
>  Components: camel-jolt
>Reporter: Hemang Ajmera
>Priority: Major
>
> It will be really great to have an additional component camel-jslt similar to 
> camel-jolt. This component should use [https://github.com/schibsted/jslt] 
> library for transformation.
> I think JSLT is much simpler yet can do more complex transformation compared 
> to Jolt. Please have a look at 
> [https://github.com/schibsted/jslt/blob/master/tutorial.md] for brief 
> tutorial.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (CAMEL-13699) Add Json to Json transformation using JSLT

2019-07-05 Thread Hemang Ajmera (JIRA)


 [ 
https://issues.apache.org/jira/browse/CAMEL-13699?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Hemang Ajmera updated CAMEL-13699:
--
Labels: features  (was: )

> Add Json to Json transformation using JSLT
> --
>
> Key: CAMEL-13699
> URL: https://issues.apache.org/jira/browse/CAMEL-13699
> Project: Camel
>  Issue Type: New Feature
>  Components: camel-jolt
>Reporter: Hemang Ajmera
>Priority: Major
>  Labels: features
>
> It will be really great to have an additional component camel-jslt similar to 
> camel-jolt. This component should use [https://github.com/schibsted/jslt] 
> library for transformation.
> I think JSLT is much simpler yet can do more complex transformation compared 
> to Jolt. Please have a look at 
> [https://github.com/schibsted/jslt/blob/master/tutorial.md] for brief 
> tutorial.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (CAMEL-13699) Add Json to Json transformation using JSLT

2019-06-28 Thread Hemang Ajmera (JIRA)
Hemang Ajmera created CAMEL-13699:
-

 Summary: Add Json to Json transformation using JSLT
 Key: CAMEL-13699
 URL: https://issues.apache.org/jira/browse/CAMEL-13699
 Project: Camel
  Issue Type: New Feature
  Components: camel-jolt
Reporter: Hemang Ajmera


It will be really great to have an additional component camel-jslt similar to 
camel-jolt. This component should use [https://github.com/schibsted/jslt] 
library for transformation.

I think JSLT is much simpler yet can do more complex transformation compared to 
Jolt. Please have a look at 
[https://github.com/schibsted/jslt/blob/master/tutorial.md] for brief tutorial.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-13274) Minor correction in metics document

2019-03-24 Thread Hemang Ajmera (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-13274?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=1672#comment-1672
 ] 

Hemang Ajmera commented on CAMEL-13274:
---

Thanks for suggestion. I have created a PR for the same.

> Minor correction in metics document
> ---
>
> Key: CAMEL-13274
> URL: https://issues.apache.org/jira/browse/CAMEL-13274
> Project: Camel
>  Issue Type: Task
>  Components: camel-metrics
>Affects Versions: 2.23.1
>Reporter: Hemang Ajmera
>Priority: Trivial
> Fix For: 3.0.0, 3.0.0-M2
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> At location 
> [https://github.com/apache/camel/blob/master/components/camel-metrics/src/main/docs/metrics-component.adoc#options-2]
> The sentence is "If no {{value}} is not set nothing is added to histogram and 
> warning is logged."
> It should be "If -no- {{value}} is not set nothing is added to histogram and 
> warning is logged."
> Please remove that additional "no"



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (CAMEL-13274) Minor correction in document

2019-02-28 Thread Hemang Ajmera (JIRA)
Hemang Ajmera created CAMEL-13274:
-

 Summary: Minor correction in document
 Key: CAMEL-13274
 URL: https://issues.apache.org/jira/browse/CAMEL-13274
 Project: Camel
  Issue Type: Bug
  Components: camel-metrics
Affects Versions: 2.23.1
Reporter: Hemang Ajmera


At location 
[https://github.com/apache/camel/blob/master/components/camel-metrics/src/main/docs/metrics-component.adoc#options-2]

The sentence is "If no {{value}} is not set nothing is added to histogram and 
warning is logged."

It should be "If -no- {{value}} is not set nothing is added to histogram and 
warning is logged."

Please remove that additional "no"



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (CAMEL-13273) Link missing in JMX Documentation

2019-02-28 Thread Hemang Ajmera (JIRA)


 [ 
https://issues.apache.org/jira/browse/CAMEL-13273?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Hemang Ajmera updated CAMEL-13273:
--
Summary: Link missing in JMX Documentation  (was: Link missing in 
Documentation)

> Link missing in JMX Documentation
> -
>
> Key: CAMEL-13273
> URL: https://issues.apache.org/jira/browse/CAMEL-13273
> Project: Camel
>  Issue Type: Bug
>  Components: camel-jmx
>Affects Versions: 2.23.1
>Reporter: Hemang Ajmera
>Priority: Trivial
>
> Reference: 
> [https://github.com/apache/camel/blob/master/components/camel-jmx/src/main/docs/jmx-component.adoc#which-processors-are-registered]
> {{It mentions "See this FAQ". But there is no link for it.}}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (CAMEL-13273) Correction in Documentation

2019-02-28 Thread Hemang Ajmera (JIRA)
Hemang Ajmera created CAMEL-13273:
-

 Summary: Correction in Documentation
 Key: CAMEL-13273
 URL: https://issues.apache.org/jira/browse/CAMEL-13273
 Project: Camel
  Issue Type: Bug
  Components: camel-jmx
Affects Versions: 2.23.1
Reporter: Hemang Ajmera


Reference: 
[https://github.com/apache/camel/blob/master/components/camel-jmx/src/main/docs/jmx-component.adoc#which-processors-are-registered]

{{It mentions "See this FAQ". But there is no link for it.}}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12871) Camel-salesforce component drops the streaming topic

2018-11-05 Thread Hemang Ajmera (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12871?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16674957#comment-16674957
 ] 

Hemang Ajmera commented on CAMEL-12871:
---

Hi

   Is it possible for you to send me compiled jar file for this component. I 
will try to use your jar instead of original the keep it running for couple of 
days to see how it behaves.

> Camel-salesforce component drops the streaming topic
> 
>
> Key: CAMEL-12871
> URL: https://issues.apache.org/jira/browse/CAMEL-12871
> Project: Camel
>  Issue Type: Bug
>  Components: camel-salesforce
>Affects Versions: 2.21.1
>Reporter: Hemang Ajmera
>Priority: Major
>
> h1. Summary
> Salesforce component tries to reconnect to salesforce, if it gets disconnect. 
> Most of the time it is succeeded. However, there is case when re-connect does 
> not work. At that time salesforce component drops the topic which is 
> subscribe and reconnects back. Everything looks normal again, however, no new 
> streaming messages are received, as the component has dropped the topic.
> h1. Observation
> Here is the logs which show good reconnect. We can see that camel attempts to 
> subscribe to topic /topic/AccountOwner
> {quote}
> 2018-09-12 02:54:23.530 DEBUG 1 --- [ent@2362f559-20] 
> o.a.c.c.s.i.s.SubscriptionHelper$5   : Received messages 
> [{advice={reconnect=handshake, interval=0}, channel=/meta/connect, id=410, 
> error=403::Unknown client, successful=false}]
> 2018-09-12 02:54:23.531 DEBUG 1 --- [ent@2362f559-20] 
> o.a.c.c.s.i.s.SubscriptionHelper : [CHANNEL:META_CONNECT]: 
> {advice={reconnect=handshake, interval=0}, channel=/meta/connect, id=410, 
> error=403::Unknown client, successful=false}
> 2018-09-12 02:54:23.531  WARN 1 --- [ent@2362f559-20] 
> o.a.c.c.s.i.s.SubscriptionHelper : Connect failure: 
> {advice={reconnect=handshake, interval=0}, channel=/meta/connect, id=410, 
> error=403::Unknown client, successful=false}
> 2018-09-12 02:54:23.588 DEBUG 1 --- [ent@2362f559-21] 
> o.a.c.c.s.i.s.SubscriptionHelper$5   : Received messages 
> [{ext={replay=true, payload.format=true}, minimumVersion=1.0, 
> clientId=p1t17l7111gqk4p6eff60893qeev, 
> supportedConnectionTypes=[Ljava.lang.Object;@471ebac8, 
> channel=/meta/handshake, id=411, version=1.0, successful=true}]
> 2018-09-12 02:54:23.589 DEBUG 1 --- [ent@2362f559-21] 
> o.a.c.c.s.i.s.SubscriptionHelper : [CHANNEL:META_HANDSHAKE]: 
> {ext={replay=true, payload.format=true}, minimumVersion=1.0, 
> clientId=p1t17l7111gqk4p6eff60893qeev, 
> supportedConnectionTypes=[Ljava.lang.Object;@471ebac8, 
> channel=/meta/handshake, id=411, version=1.0, successful=true}
> 2018-09-12 02:54:23.625 DEBUG 1 --- [ent@2362f559-20] 
> o.a.c.c.s.i.s.SubscriptionHelper$5   : Received messages 
> [{clientId=p1t17l7111gqk4p6eff60893qeev, advice={reconnect=retry, interval=0, 
> timeout=11}, channel=/meta/connect, id=412, successful=true}]
> 2018-09-12 02:54:23.625 DEBUG 1 --- [ent@2362f559-20] 
> o.a.c.c.s.i.s.SubscriptionHelper : [CHANNEL:META_CONNECT]: 
> {clientId=p1t17l7111gqk4p6eff60893qeev, advice={reconnect=retry, interval=0, 
> timeout=11}, channel=/meta/connect, id=412, successful=true}
> 2018-09-12 02:54:23.625 DEBUG 1 --- [ent@2362f559-20] 
> o.a.c.c.s.i.s.SubscriptionHelper : Refreshing subscriptions to 1 
> channels on reconnect
> 2018-09-12 02:54:23.626  INFO 1 --- [ent@2362f559-20] 
> o.a.c.c.s.i.s.SubscriptionHelper : Set Replay extension to replay 
> from `-2` for channel `/topic/AccountOwners`
> 2018-09-12 02:54:23.626  INFO 1 --- [ent@2362f559-20] 
> o.a.c.c.s.i.s.SubscriptionHelper : Subscribing to channel 
> /topic/AccountOwners...
> 2018-09-12 02:54:23.693 DEBUG 1 --- [ent@2362f559-21] 
> o.a.c.c.s.i.s.SubscriptionHelper$5   : Received messages 
> [{clientId=p1t17l7111gqk4p6eff60893qeev, channel=/meta/subscribe, id=413, 
> subscription=/topic/AccountOwners, successful=true}]
> 2018-09-12 02:54:23.693 DEBUG 1 --- [ent@2362f559-21] 
> o.a.c.c.s.i.s.SubscriptionHelper : [CHANNEL:META_SUBSCRIBE]: 
> {clientId=p1t17l7111gqk4p6eff60893qeev, channel=/meta/subscribe, id=413, 
> subscription=/topic/AccountOwners, successful=true}
> 2018-09-12 02:54:23.693  INFO 1 --- [ent@2362f559-21] 
> o.a.c.c.s.i.s.SubscriptionHelper : Subscribed to channel 
> /topic/AccountOwners
> 2018-09-12 02:54:25.453 DEBUG 1 --- [ent@2362f559-20] 
> o.a.c.c.s.i.s.SubscriptionHelper$5   : Received messages 
> {quote}
> Here is the logs which shows connection fails. Camel tries to reconnect, but 
> fails. Then camel reconnects after dropping the topic. After this incident, 
> no new messages are received. 
> {quote}
> 2018-09-22 05:26:17.121  WARN 1 --- [ent@2362f559-23] 
> o.a.c.c.s.i.s.SubscriptionHelper : Connect 

[jira] [Commented] (CAMEL-12871) Camel-salesforce component drops the streaming topic

2018-10-26 Thread Hemang Ajmera (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12871?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16664952#comment-16664952
 ] 

Hemang Ajmera commented on CAMEL-12871:
---

Hi [~zregvart] & [~cib...@e-ma.net]

   Any thoughts on this issue? I think camel got error which subscribing topic 
after successful handshake. After that camel stopped subscribing the topic. Can 
we add retry logic?

> Camel-salesforce component drops the streaming topic
> 
>
> Key: CAMEL-12871
> URL: https://issues.apache.org/jira/browse/CAMEL-12871
> Project: Camel
>  Issue Type: Bug
>  Components: camel-salesforce
>Affects Versions: 2.21.1
>Reporter: Hemang Ajmera
>Priority: Major
>
> h1. Summary
> Salesforce component tries to reconnect to salesforce, if it gets disconnect. 
> Most of the time it is succeeded. However, there is case when re-connect does 
> not work. At that time salesforce component drops the topic which is 
> subscribe and reconnects back. Everything looks normal again, however, no new 
> streaming messages are received, as the component has dropped the topic.
> h1. Observation
> Here is the logs which show good reconnect. We can see that camel attempts to 
> subscribe to topic /topic/AccountOwner
> {quote}
> 2018-09-12 02:54:23.530 DEBUG 1 --- [ent@2362f559-20] 
> o.a.c.c.s.i.s.SubscriptionHelper$5   : Received messages 
> [{advice={reconnect=handshake, interval=0}, channel=/meta/connect, id=410, 
> error=403::Unknown client, successful=false}]
> 2018-09-12 02:54:23.531 DEBUG 1 --- [ent@2362f559-20] 
> o.a.c.c.s.i.s.SubscriptionHelper : [CHANNEL:META_CONNECT]: 
> {advice={reconnect=handshake, interval=0}, channel=/meta/connect, id=410, 
> error=403::Unknown client, successful=false}
> 2018-09-12 02:54:23.531  WARN 1 --- [ent@2362f559-20] 
> o.a.c.c.s.i.s.SubscriptionHelper : Connect failure: 
> {advice={reconnect=handshake, interval=0}, channel=/meta/connect, id=410, 
> error=403::Unknown client, successful=false}
> 2018-09-12 02:54:23.588 DEBUG 1 --- [ent@2362f559-21] 
> o.a.c.c.s.i.s.SubscriptionHelper$5   : Received messages 
> [{ext={replay=true, payload.format=true}, minimumVersion=1.0, 
> clientId=p1t17l7111gqk4p6eff60893qeev, 
> supportedConnectionTypes=[Ljava.lang.Object;@471ebac8, 
> channel=/meta/handshake, id=411, version=1.0, successful=true}]
> 2018-09-12 02:54:23.589 DEBUG 1 --- [ent@2362f559-21] 
> o.a.c.c.s.i.s.SubscriptionHelper : [CHANNEL:META_HANDSHAKE]: 
> {ext={replay=true, payload.format=true}, minimumVersion=1.0, 
> clientId=p1t17l7111gqk4p6eff60893qeev, 
> supportedConnectionTypes=[Ljava.lang.Object;@471ebac8, 
> channel=/meta/handshake, id=411, version=1.0, successful=true}
> 2018-09-12 02:54:23.625 DEBUG 1 --- [ent@2362f559-20] 
> o.a.c.c.s.i.s.SubscriptionHelper$5   : Received messages 
> [{clientId=p1t17l7111gqk4p6eff60893qeev, advice={reconnect=retry, interval=0, 
> timeout=11}, channel=/meta/connect, id=412, successful=true}]
> 2018-09-12 02:54:23.625 DEBUG 1 --- [ent@2362f559-20] 
> o.a.c.c.s.i.s.SubscriptionHelper : [CHANNEL:META_CONNECT]: 
> {clientId=p1t17l7111gqk4p6eff60893qeev, advice={reconnect=retry, interval=0, 
> timeout=11}, channel=/meta/connect, id=412, successful=true}
> 2018-09-12 02:54:23.625 DEBUG 1 --- [ent@2362f559-20] 
> o.a.c.c.s.i.s.SubscriptionHelper : Refreshing subscriptions to 1 
> channels on reconnect
> 2018-09-12 02:54:23.626  INFO 1 --- [ent@2362f559-20] 
> o.a.c.c.s.i.s.SubscriptionHelper : Set Replay extension to replay 
> from `-2` for channel `/topic/AccountOwners`
> 2018-09-12 02:54:23.626  INFO 1 --- [ent@2362f559-20] 
> o.a.c.c.s.i.s.SubscriptionHelper : Subscribing to channel 
> /topic/AccountOwners...
> 2018-09-12 02:54:23.693 DEBUG 1 --- [ent@2362f559-21] 
> o.a.c.c.s.i.s.SubscriptionHelper$5   : Received messages 
> [{clientId=p1t17l7111gqk4p6eff60893qeev, channel=/meta/subscribe, id=413, 
> subscription=/topic/AccountOwners, successful=true}]
> 2018-09-12 02:54:23.693 DEBUG 1 --- [ent@2362f559-21] 
> o.a.c.c.s.i.s.SubscriptionHelper : [CHANNEL:META_SUBSCRIBE]: 
> {clientId=p1t17l7111gqk4p6eff60893qeev, channel=/meta/subscribe, id=413, 
> subscription=/topic/AccountOwners, successful=true}
> 2018-09-12 02:54:23.693  INFO 1 --- [ent@2362f559-21] 
> o.a.c.c.s.i.s.SubscriptionHelper : Subscribed to channel 
> /topic/AccountOwners
> 2018-09-12 02:54:25.453 DEBUG 1 --- [ent@2362f559-20] 
> o.a.c.c.s.i.s.SubscriptionHelper$5   : Received messages 
> {quote}
> Here is the logs which shows connection fails. Camel tries to reconnect, but 
> fails. Then camel reconnects after dropping the topic. After this incident, 
> no new messages are received. 
> {quote}
> 2018-09-22 05:26:17.121  WARN 1 --- [ent@2362f559-23] 
> 

[jira] [Commented] (CAMEL-12871) Camel-salesforce component drops the streaming topic

2018-10-10 Thread Hemang Ajmera (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12871?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16645993#comment-16645993
 ] 

Hemang Ajmera commented on CAMEL-12871:
---

Hi
 # From salesforce we get 403 error every 2-3 hours. We currently do not know 
the reason, and we are trying to seek help for sf.
 # In log one, upon 403 error, camel was able to reconnect back to salesforce. 
After that it was able to subscribed to the topic. This is repeated every 2-3 
hours
 # As you rightly said, something went wrong during log 2, and camel was not 
able to subscribe to salesforce
 # In log three, camel tried to log in again to salesforce, but  this time 
camel is not trying to subscribe the topic at all.
 # So my question here is why is camel to trying to subscribe again after 
failure in log 2? Shouldn't it try to come out of error?
 # If I restart camel code, everything just works fine
 # I think when we get  error in log 2, camel maintains list of topics and 
replay id to be connected to salesforce. From that list this topic is removed. 
Thus in all future tried, camel does not have any topic to connect. What we 
should fix is that camel should continue to try to connect to topic and not 
drop it.

 

> Camel-salesforce component drops the streaming topic
> 
>
> Key: CAMEL-12871
> URL: https://issues.apache.org/jira/browse/CAMEL-12871
> Project: Camel
>  Issue Type: Bug
>  Components: camel-salesforce
>Affects Versions: 2.21.1
>Reporter: Hemang Ajmera
>Priority: Blocker
>
> h1. Summary
> Salesforce component tries to reconnect to salesforce, if it gets disconnect. 
> Most of the time it is succeeded. However, there is case when re-connect does 
> not work. At that time salesforce component drops the topic which is 
> subscribe and reconnects back. Everything looks normal again, however, no new 
> streaming messages are received, as the component has dropped the topic.
> h1. Observation
> Here is the logs which show good reconnect. We can see that camel attempts to 
> subscribe to topic /topic/AccountOwner
> {quote}
> 2018-09-12 02:54:23.530 DEBUG 1 --- [ent@2362f559-20] 
> o.a.c.c.s.i.s.SubscriptionHelper$5   : Received messages 
> [{advice={reconnect=handshake, interval=0}, channel=/meta/connect, id=410, 
> error=403::Unknown client, successful=false}]
> 2018-09-12 02:54:23.531 DEBUG 1 --- [ent@2362f559-20] 
> o.a.c.c.s.i.s.SubscriptionHelper : [CHANNEL:META_CONNECT]: 
> {advice={reconnect=handshake, interval=0}, channel=/meta/connect, id=410, 
> error=403::Unknown client, successful=false}
> 2018-09-12 02:54:23.531  WARN 1 --- [ent@2362f559-20] 
> o.a.c.c.s.i.s.SubscriptionHelper : Connect failure: 
> {advice={reconnect=handshake, interval=0}, channel=/meta/connect, id=410, 
> error=403::Unknown client, successful=false}
> 2018-09-12 02:54:23.588 DEBUG 1 --- [ent@2362f559-21] 
> o.a.c.c.s.i.s.SubscriptionHelper$5   : Received messages 
> [{ext={replay=true, payload.format=true}, minimumVersion=1.0, 
> clientId=p1t17l7111gqk4p6eff60893qeev, 
> supportedConnectionTypes=[Ljava.lang.Object;@471ebac8, 
> channel=/meta/handshake, id=411, version=1.0, successful=true}]
> 2018-09-12 02:54:23.589 DEBUG 1 --- [ent@2362f559-21] 
> o.a.c.c.s.i.s.SubscriptionHelper : [CHANNEL:META_HANDSHAKE]: 
> {ext={replay=true, payload.format=true}, minimumVersion=1.0, 
> clientId=p1t17l7111gqk4p6eff60893qeev, 
> supportedConnectionTypes=[Ljava.lang.Object;@471ebac8, 
> channel=/meta/handshake, id=411, version=1.0, successful=true}
> 2018-09-12 02:54:23.625 DEBUG 1 --- [ent@2362f559-20] 
> o.a.c.c.s.i.s.SubscriptionHelper$5   : Received messages 
> [{clientId=p1t17l7111gqk4p6eff60893qeev, advice={reconnect=retry, interval=0, 
> timeout=11}, channel=/meta/connect, id=412, successful=true}]
> 2018-09-12 02:54:23.625 DEBUG 1 --- [ent@2362f559-20] 
> o.a.c.c.s.i.s.SubscriptionHelper : [CHANNEL:META_CONNECT]: 
> {clientId=p1t17l7111gqk4p6eff60893qeev, advice={reconnect=retry, interval=0, 
> timeout=11}, channel=/meta/connect, id=412, successful=true}
> 2018-09-12 02:54:23.625 DEBUG 1 --- [ent@2362f559-20] 
> o.a.c.c.s.i.s.SubscriptionHelper : Refreshing subscriptions to 1 
> channels on reconnect
> 2018-09-12 02:54:23.626  INFO 1 --- [ent@2362f559-20] 
> o.a.c.c.s.i.s.SubscriptionHelper : Set Replay extension to replay 
> from `-2` for channel `/topic/AccountOwners`
> 2018-09-12 02:54:23.626  INFO 1 --- [ent@2362f559-20] 
> o.a.c.c.s.i.s.SubscriptionHelper : Subscribing to channel 
> /topic/AccountOwners...
> 2018-09-12 02:54:23.693 DEBUG 1 --- [ent@2362f559-21] 
> o.a.c.c.s.i.s.SubscriptionHelper$5   : Received messages 
> [{clientId=p1t17l7111gqk4p6eff60893qeev, channel=/meta/subscribe, id=413, 
> subscription=/topic/AccountOwners, successful=true}]
> 

[jira] [Commented] (CAMEL-12871) Camel-salesforce component drops the streaming topic

2018-10-10 Thread Hemang Ajmera (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12871?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16645250#comment-16645250
 ] 

Hemang Ajmera commented on CAMEL-12871:
---

One more point

I have just extracted relevant part of logs...

For e.g. every 2-3 hours camel gets disconnection, so the first type of logs is 
seen every 2-3 hours. Then there was issue ( 2nd type of log). After that 3rd 
type of log is seen to be repeating every 2-3 hours.

 

 

> Camel-salesforce component drops the streaming topic
> 
>
> Key: CAMEL-12871
> URL: https://issues.apache.org/jira/browse/CAMEL-12871
> Project: Camel
>  Issue Type: Bug
>  Components: camel-salesforce
>Affects Versions: 2.21.1
>Reporter: Hemang Ajmera
>Priority: Blocker
>
> h1. Summary
> Salesforce component tries to reconnect to salesforce, if it gets disconnect. 
> Most of the time it is succeeded. However, there is case when re-connect does 
> not work. At that time salesforce component drops the topic which is 
> subscribe and reconnects back. Everything looks normal again, however, no new 
> streaming messages are received, as the component has dropped the topic.
> h1. Observation
> Here is the logs which show good reconnect. We can see that camel attempts to 
> subscribe to topic /topic/AccountOwner
> {quote}
> 2018-09-12 02:54:23.530 DEBUG 1 --- [ent@2362f559-20] 
> o.a.c.c.s.i.s.SubscriptionHelper$5   : Received messages 
> [{advice={reconnect=handshake, interval=0}, channel=/meta/connect, id=410, 
> error=403::Unknown client, successful=false}]
> 2018-09-12 02:54:23.531 DEBUG 1 --- [ent@2362f559-20] 
> o.a.c.c.s.i.s.SubscriptionHelper : [CHANNEL:META_CONNECT]: 
> {advice={reconnect=handshake, interval=0}, channel=/meta/connect, id=410, 
> error=403::Unknown client, successful=false}
> 2018-09-12 02:54:23.531  WARN 1 --- [ent@2362f559-20] 
> o.a.c.c.s.i.s.SubscriptionHelper : Connect failure: 
> {advice={reconnect=handshake, interval=0}, channel=/meta/connect, id=410, 
> error=403::Unknown client, successful=false}
> 2018-09-12 02:54:23.588 DEBUG 1 --- [ent@2362f559-21] 
> o.a.c.c.s.i.s.SubscriptionHelper$5   : Received messages 
> [{ext={replay=true, payload.format=true}, minimumVersion=1.0, 
> clientId=p1t17l7111gqk4p6eff60893qeev, 
> supportedConnectionTypes=[Ljava.lang.Object;@471ebac8, 
> channel=/meta/handshake, id=411, version=1.0, successful=true}]
> 2018-09-12 02:54:23.589 DEBUG 1 --- [ent@2362f559-21] 
> o.a.c.c.s.i.s.SubscriptionHelper : [CHANNEL:META_HANDSHAKE]: 
> {ext={replay=true, payload.format=true}, minimumVersion=1.0, 
> clientId=p1t17l7111gqk4p6eff60893qeev, 
> supportedConnectionTypes=[Ljava.lang.Object;@471ebac8, 
> channel=/meta/handshake, id=411, version=1.0, successful=true}
> 2018-09-12 02:54:23.625 DEBUG 1 --- [ent@2362f559-20] 
> o.a.c.c.s.i.s.SubscriptionHelper$5   : Received messages 
> [{clientId=p1t17l7111gqk4p6eff60893qeev, advice={reconnect=retry, interval=0, 
> timeout=11}, channel=/meta/connect, id=412, successful=true}]
> 2018-09-12 02:54:23.625 DEBUG 1 --- [ent@2362f559-20] 
> o.a.c.c.s.i.s.SubscriptionHelper : [CHANNEL:META_CONNECT]: 
> {clientId=p1t17l7111gqk4p6eff60893qeev, advice={reconnect=retry, interval=0, 
> timeout=11}, channel=/meta/connect, id=412, successful=true}
> 2018-09-12 02:54:23.625 DEBUG 1 --- [ent@2362f559-20] 
> o.a.c.c.s.i.s.SubscriptionHelper : Refreshing subscriptions to 1 
> channels on reconnect
> 2018-09-12 02:54:23.626  INFO 1 --- [ent@2362f559-20] 
> o.a.c.c.s.i.s.SubscriptionHelper : Set Replay extension to replay 
> from `-2` for channel `/topic/AccountOwners`
> 2018-09-12 02:54:23.626  INFO 1 --- [ent@2362f559-20] 
> o.a.c.c.s.i.s.SubscriptionHelper : Subscribing to channel 
> /topic/AccountOwners...
> 2018-09-12 02:54:23.693 DEBUG 1 --- [ent@2362f559-21] 
> o.a.c.c.s.i.s.SubscriptionHelper$5   : Received messages 
> [{clientId=p1t17l7111gqk4p6eff60893qeev, channel=/meta/subscribe, id=413, 
> subscription=/topic/AccountOwners, successful=true}]
> 2018-09-12 02:54:23.693 DEBUG 1 --- [ent@2362f559-21] 
> o.a.c.c.s.i.s.SubscriptionHelper : [CHANNEL:META_SUBSCRIBE]: 
> {clientId=p1t17l7111gqk4p6eff60893qeev, channel=/meta/subscribe, id=413, 
> subscription=/topic/AccountOwners, successful=true}
> 2018-09-12 02:54:23.693  INFO 1 --- [ent@2362f559-21] 
> o.a.c.c.s.i.s.SubscriptionHelper : Subscribed to channel 
> /topic/AccountOwners
> 2018-09-12 02:54:25.453 DEBUG 1 --- [ent@2362f559-20] 
> o.a.c.c.s.i.s.SubscriptionHelper$5   : Received messages 
> {quote}
> Here is the logs which shows connection fails. Camel tries to reconnect, but 
> fails. Then camel reconnects after dropping the topic. After this incident, 
> no new messages are received. 
> {quote}
> 2018-09-22 

[jira] [Commented] (CAMEL-12871) Camel-salesforce component drops the streaming topic

2018-10-10 Thread Hemang Ajmera (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12871?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16645242#comment-16645242
 ] 

Hemang Ajmera commented on CAMEL-12871:
---

There are three set logs
 # Camel reconnection before it dropped
 # Camel error after which it could not reconnect
 # Camel reconnection after the error in log 2

If we compare the logs in section 1 and section 3, there is difference in 
reconnection.

In the first set of logs ( good re-connection ) I can see

2018-09-12 02:54:23.625 DEBUG 1 — [ent@2362f559-20] 
o.a.c.c.s.i.s.SubscriptionHelper : Refreshing subscriptions to 1 channels on 
reconnect
 2018-09-12 02:54:23.626 INFO 1 — [ent@2362f559-20] 
o.a.c.c.s.i.s.SubscriptionHelper : Set Replay extension to replay from `-2` for 
channel `/topic/AccountOwners`
 2018-09-12 02:54:23.626 INFO 1 — [ent@2362f559-20] 
o.a.c.c.s.i.s.SubscriptionHelper : *Subscribing to channel 
/topic/AccountOwners*...

 

This is missing in last sets of logs.

Camel is reconnecting to salesforce, but not subscibing to channel. However 
when we restart, it starts working fine.

> Camel-salesforce component drops the streaming topic
> 
>
> Key: CAMEL-12871
> URL: https://issues.apache.org/jira/browse/CAMEL-12871
> Project: Camel
>  Issue Type: Bug
>  Components: camel-salesforce
>Affects Versions: 2.21.1
>Reporter: Hemang Ajmera
>Priority: Blocker
>
> h1. Summary
> Salesforce component tries to reconnect to salesforce, if it gets disconnect. 
> Most of the time it is succeeded. However, there is case when re-connect does 
> not work. At that time salesforce component drops the topic which is 
> subscribe and reconnects back. Everything looks normal again, however, no new 
> streaming messages are received, as the component has dropped the topic.
> h1. Observation
> Here is the logs which show good reconnect. We can see that camel attempts to 
> subscribe to topic /topic/AccountOwner
> {quote}
> 2018-09-12 02:54:23.530 DEBUG 1 --- [ent@2362f559-20] 
> o.a.c.c.s.i.s.SubscriptionHelper$5   : Received messages 
> [{advice={reconnect=handshake, interval=0}, channel=/meta/connect, id=410, 
> error=403::Unknown client, successful=false}]
> 2018-09-12 02:54:23.531 DEBUG 1 --- [ent@2362f559-20] 
> o.a.c.c.s.i.s.SubscriptionHelper : [CHANNEL:META_CONNECT]: 
> {advice={reconnect=handshake, interval=0}, channel=/meta/connect, id=410, 
> error=403::Unknown client, successful=false}
> 2018-09-12 02:54:23.531  WARN 1 --- [ent@2362f559-20] 
> o.a.c.c.s.i.s.SubscriptionHelper : Connect failure: 
> {advice={reconnect=handshake, interval=0}, channel=/meta/connect, id=410, 
> error=403::Unknown client, successful=false}
> 2018-09-12 02:54:23.588 DEBUG 1 --- [ent@2362f559-21] 
> o.a.c.c.s.i.s.SubscriptionHelper$5   : Received messages 
> [{ext={replay=true, payload.format=true}, minimumVersion=1.0, 
> clientId=p1t17l7111gqk4p6eff60893qeev, 
> supportedConnectionTypes=[Ljava.lang.Object;@471ebac8, 
> channel=/meta/handshake, id=411, version=1.0, successful=true}]
> 2018-09-12 02:54:23.589 DEBUG 1 --- [ent@2362f559-21] 
> o.a.c.c.s.i.s.SubscriptionHelper : [CHANNEL:META_HANDSHAKE]: 
> {ext={replay=true, payload.format=true}, minimumVersion=1.0, 
> clientId=p1t17l7111gqk4p6eff60893qeev, 
> supportedConnectionTypes=[Ljava.lang.Object;@471ebac8, 
> channel=/meta/handshake, id=411, version=1.0, successful=true}
> 2018-09-12 02:54:23.625 DEBUG 1 --- [ent@2362f559-20] 
> o.a.c.c.s.i.s.SubscriptionHelper$5   : Received messages 
> [{clientId=p1t17l7111gqk4p6eff60893qeev, advice={reconnect=retry, interval=0, 
> timeout=11}, channel=/meta/connect, id=412, successful=true}]
> 2018-09-12 02:54:23.625 DEBUG 1 --- [ent@2362f559-20] 
> o.a.c.c.s.i.s.SubscriptionHelper : [CHANNEL:META_CONNECT]: 
> {clientId=p1t17l7111gqk4p6eff60893qeev, advice={reconnect=retry, interval=0, 
> timeout=11}, channel=/meta/connect, id=412, successful=true}
> 2018-09-12 02:54:23.625 DEBUG 1 --- [ent@2362f559-20] 
> o.a.c.c.s.i.s.SubscriptionHelper : Refreshing subscriptions to 1 
> channels on reconnect
> 2018-09-12 02:54:23.626  INFO 1 --- [ent@2362f559-20] 
> o.a.c.c.s.i.s.SubscriptionHelper : Set Replay extension to replay 
> from `-2` for channel `/topic/AccountOwners`
> 2018-09-12 02:54:23.626  INFO 1 --- [ent@2362f559-20] 
> o.a.c.c.s.i.s.SubscriptionHelper : Subscribing to channel 
> /topic/AccountOwners...
> 2018-09-12 02:54:23.693 DEBUG 1 --- [ent@2362f559-21] 
> o.a.c.c.s.i.s.SubscriptionHelper$5   : Received messages 
> [{clientId=p1t17l7111gqk4p6eff60893qeev, channel=/meta/subscribe, id=413, 
> subscription=/topic/AccountOwners, successful=true}]
> 2018-09-12 02:54:23.693 DEBUG 1 --- [ent@2362f559-21] 
> o.a.c.c.s.i.s.SubscriptionHelper : [CHANNEL:META_SUBSCRIBE]: 
> 

[jira] [Created] (CAMEL-12871) Camel-salesforce component drops the streaming topic

2018-10-09 Thread Hemang Ajmera (JIRA)
Hemang Ajmera created CAMEL-12871:
-

 Summary: Camel-salesforce component drops the streaming topic
 Key: CAMEL-12871
 URL: https://issues.apache.org/jira/browse/CAMEL-12871
 Project: Camel
  Issue Type: Bug
  Components: camel-salesforce
Affects Versions: 2.21.1
Reporter: Hemang Ajmera


h1. Summary
Salesforce component tries to reconnect to salesforce, if it gets disconnect. 
Most of the time it is succeeded. However, there is case when re-connect does 
not work. At that time salesforce component drops the topic which is subscribe 
and reconnects back. Everything looks normal again, however, no new streaming 
messages are received, as the component has dropped the topic.

h1. Observation
Here is the logs which show good reconnect. We can see that camel attempts to 
subscribe to topic /topic/AccountOwner

{quote}
2018-09-12 02:54:23.530 DEBUG 1 --- [ent@2362f559-20] 
o.a.c.c.s.i.s.SubscriptionHelper$5   : Received messages 
[{advice={reconnect=handshake, interval=0}, channel=/meta/connect, id=410, 
error=403::Unknown client, successful=false}]
2018-09-12 02:54:23.531 DEBUG 1 --- [ent@2362f559-20] 
o.a.c.c.s.i.s.SubscriptionHelper : [CHANNEL:META_CONNECT]: 
{advice={reconnect=handshake, interval=0}, channel=/meta/connect, id=410, 
error=403::Unknown client, successful=false}
2018-09-12 02:54:23.531  WARN 1 --- [ent@2362f559-20] 
o.a.c.c.s.i.s.SubscriptionHelper : Connect failure: 
{advice={reconnect=handshake, interval=0}, channel=/meta/connect, id=410, 
error=403::Unknown client, successful=false}
2018-09-12 02:54:23.588 DEBUG 1 --- [ent@2362f559-21] 
o.a.c.c.s.i.s.SubscriptionHelper$5   : Received messages 
[{ext={replay=true, payload.format=true}, minimumVersion=1.0, 
clientId=p1t17l7111gqk4p6eff60893qeev, 
supportedConnectionTypes=[Ljava.lang.Object;@471ebac8, channel=/meta/handshake, 
id=411, version=1.0, successful=true}]
2018-09-12 02:54:23.589 DEBUG 1 --- [ent@2362f559-21] 
o.a.c.c.s.i.s.SubscriptionHelper : [CHANNEL:META_HANDSHAKE]: 
{ext={replay=true, payload.format=true}, minimumVersion=1.0, 
clientId=p1t17l7111gqk4p6eff60893qeev, 
supportedConnectionTypes=[Ljava.lang.Object;@471ebac8, channel=/meta/handshake, 
id=411, version=1.0, successful=true}
2018-09-12 02:54:23.625 DEBUG 1 --- [ent@2362f559-20] 
o.a.c.c.s.i.s.SubscriptionHelper$5   : Received messages 
[{clientId=p1t17l7111gqk4p6eff60893qeev, advice={reconnect=retry, interval=0, 
timeout=11}, channel=/meta/connect, id=412, successful=true}]
2018-09-12 02:54:23.625 DEBUG 1 --- [ent@2362f559-20] 
o.a.c.c.s.i.s.SubscriptionHelper : [CHANNEL:META_CONNECT]: 
{clientId=p1t17l7111gqk4p6eff60893qeev, advice={reconnect=retry, interval=0, 
timeout=11}, channel=/meta/connect, id=412, successful=true}
2018-09-12 02:54:23.625 DEBUG 1 --- [ent@2362f559-20] 
o.a.c.c.s.i.s.SubscriptionHelper : Refreshing subscriptions to 1 
channels on reconnect
2018-09-12 02:54:23.626  INFO 1 --- [ent@2362f559-20] 
o.a.c.c.s.i.s.SubscriptionHelper : Set Replay extension to replay from 
`-2` for channel `/topic/AccountOwners`
2018-09-12 02:54:23.626  INFO 1 --- [ent@2362f559-20] 
o.a.c.c.s.i.s.SubscriptionHelper : Subscribing to channel 
/topic/AccountOwners...
2018-09-12 02:54:23.693 DEBUG 1 --- [ent@2362f559-21] 
o.a.c.c.s.i.s.SubscriptionHelper$5   : Received messages 
[{clientId=p1t17l7111gqk4p6eff60893qeev, channel=/meta/subscribe, id=413, 
subscription=/topic/AccountOwners, successful=true}]
2018-09-12 02:54:23.693 DEBUG 1 --- [ent@2362f559-21] 
o.a.c.c.s.i.s.SubscriptionHelper : [CHANNEL:META_SUBSCRIBE]: 
{clientId=p1t17l7111gqk4p6eff60893qeev, channel=/meta/subscribe, id=413, 
subscription=/topic/AccountOwners, successful=true}
2018-09-12 02:54:23.693  INFO 1 --- [ent@2362f559-21] 
o.a.c.c.s.i.s.SubscriptionHelper : Subscribed to channel 
/topic/AccountOwners
2018-09-12 02:54:25.453 DEBUG 1 --- [ent@2362f559-20] 
o.a.c.c.s.i.s.SubscriptionHelper$5   : Received messages 
{quote}


Here is the logs which shows connection fails. Camel tries to reconnect, but 
fails. Then camel reconnects after dropping the topic. After this incident, no 
new messages are received. 
{quote}
2018-09-22 05:26:17.121  WARN 1 --- [ent@2362f559-23] 
o.a.c.c.s.i.s.SubscriptionHelper : Connect failure: 
{advice={reconnect=handshake, interval=0}, channel=/meta/connect, id=8770, 
error=403::Unknown client, successful=false}
2018-09-22 05:26:18.738 DEBUG 1 --- [ent@2362f559-24] 
o.a.c.c.s.i.s.SubscriptionHelper$5   : Received messages 
[{ext={replay=true, payload.format=true}, minimumVersion=1.0, 
clientId=5vgmiblu8etx0q3typo6d5tgn, 
supportedConnectionTypes=[Ljava.lang.Object;@5814852c, channel=/meta/handshake, 
id=8771, version=1.0, successful=true}]
2018-09-22 05:26:18.738 DEBUG 1 --- [ent@2362f559-24] 
o.a.c.c.s.i.s.SubscriptionHelper : 

[jira] [Commented] (CAMEL-12484) Camel-salesforce component does not try to reconnect on specific error

2018-09-14 Thread Hemang Ajmera (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12484?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16614659#comment-16614659
 ] 

Hemang Ajmera commented on CAMEL-12484:
---

After adding below line in applications.properties, we have not faced the issue 
so far. 

camel.component.salesforce.httpClientProperties.idleTimeout=5000

It seems setting idleTimeout resolves the issue. 

>From my end the issue is resolved, and if issue resurface, I will create 
>another ticket.

However, before we close this ticket, we should set default value for this and 
add this information in the documentation.


> Camel-salesforce component does not try to reconnect on specific error
> --
>
> Key: CAMEL-12484
> URL: https://issues.apache.org/jira/browse/CAMEL-12484
> Project: Camel
>  Issue Type: Bug
>  Components: camel-salesforce
>Affects Versions: 2.21.0
>Reporter: Hemang Ajmera
>Assignee: Zoran Regvart
>Priority: Major
> Attachments: logs.zip
>
>
> The issue is very much identical to CAMEL-10238 where camel component does 
> not try to reconnect. It was resolved for that particular case, however there 
> is additional scenario where we are facing exactly similar problem.
> Here is the key log message after which component stops retrying
> {{2018-05-03 17:19:50.257 WARN 7636 — [nt@911561694-23] 
> o.a.c.c.s.i.s.SubscriptionHelper : Connect failure: 
> {clientId=3qi3g4psrtqrntt15ockewu0a59q, advice=
> {reconnect=none, interval=0}
> , channel=/meta/connect, id=154, error=403::Unknown client, 
> successful=false}}}
> Please note that we are getting Connect failure multiple times but it is able 
> to reconnect where there is exception or when the advice is to do handshake 
> again. Here are those sample which works...
>  * The one with exceptions
> {quote}2018-05-03 17:19:17.965  WARN 7636 — [nt@911561694-23] 
> o.a.c.c.s.i.s.SubscriptionHelper : Connect failure: {failure=
> Unknown macro: \{exception=java.io.EOFException}
> ],recv=HttpReceiverOverHTTP@144e8ebb(rsp=IDLE,failure=null)[HttpParser
> Unknown macro: \{s=CLOSED,0 of -1}
> ]]<-DecryptedEndPoint@245db684
> Unknown macro: \{telia-fi--dev.cs88.my.salesforce.com/85.222.137.144}
> ->HttpConnectionOverHTTP@69f41507(l:/0:0:0:0:0:0:0:1:60369 <-> 
> r:telia-fi--dev.cs88.my.salesforce.com/85.222.137.144:443,closed=false)=>HttpChannelOverHTTP@3109c579(exchange=HttpExchange@76b96e24
>  req=TERMINATED/null@null 
> res=PENDING/null@null)[send=HttpSenderOverHTTP@5d6efa04(req=QUEUED,snd=COMPLETED,failure=null)[HttpGenerator@43ac2f18
> Unknown macro: \{s=START}
> ],recv=HttpReceiverOverHTTP@144e8ebb(rsp=IDLE,failure=null)[HttpParser
> ]]->SocketChannelEndPoint@6b93b346
> Unknown macro: \{telia-fi--dev.cs88.my.salesforce.com/85.222.137.144}
> Unknown macro: \{io=0/0,kio=0,kro=1}
>  
> ->SslConnection@53bc7193\{NEED_WRAP,eio=-1/-1,di=-1}=>HttpConnectionOverHTTP@69f41507(l:/0:0:0:0:0:0:0:1:60369
>  <-> 
> r:telia-fi--dev.cs88.my.salesforce.com/85.222.137.144:443,closed=false)=>HttpChannelOverHTTP@3109c579(exchange=HttpExchange@76b96e24
>  req=TERMINATED/null@null 
> res=PENDING/null@null)[send=HttpSenderOverHTTP@5d6efa04(req=QUEUED,snd=COMPLETED,failure=null)[HttpGenerator@43ac2f18
> Unknown macro: \{s=START}
> ],recv=HttpReceiverOverHTTP@144e8ebb(rsp=IDLE,failure=null)[HttpParser
> Unknown macro: \{s=CLOSED,0 of -1}
> ]], message=\{clientId=3qi3g4psrtqrntt15ockewu0a59q, channel=/meta/connect, 
> id=153, connectionType=long-polling}, connectionType=long-polling}, 
> channel=/meta/connect, id=153, successful=false}
> {quote}
>  
>  * The one with advice for new handshake
> {quote}2018-05-03 16:31:08.970  WARN 7636 — [nt@911561694-21] 
> o.a.c.c.s.i.s.SubscriptionHelper : Connect failure:
> Unknown macro: \{advice=Unknown macro}
> , channel=/meta/connect, id=83, error=403::Unknown client, successful=false}
> {quote}
>  
> One more thing, this log is coming from line 168 {{LOG.warn("Connect failure: 
> {}", message);}} of the 
> [https://github.com/apache/camel/blob/master/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/streaming/SubscriptionHelper.java#L168].
>  I see that there is no attempt to reconnect. If this information helps move 
> things faster...
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Comment Edited] (CAMEL-12484) Camel-salesforce component does not try to reconnect on specific error

2018-09-14 Thread Hemang Ajmera (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12484?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16614659#comment-16614659
 ] 

Hemang Ajmera edited comment on CAMEL-12484 at 9/14/18 10:52 AM:
-

After adding below line in applications.properties, we have not faced the issue 
so far. 

{{camel.component.salesforce.httpClientProperties.idleTimeout=5000}}

It seems setting idleTimeout resolves the issue. 

>From my end the issue is resolved, and if issue resurface, I will create 
>another ticket.

However, before we close this ticket, we should set default value for this and 
add this information in the documentation.



was (Author: hemangajmera):
After adding below line in applications.properties, we have not faced the issue 
so far. 

camel.component.salesforce.httpClientProperties.idleTimeout=5000

It seems setting idleTimeout resolves the issue. 

>From my end the issue is resolved, and if issue resurface, I will create 
>another ticket.

However, before we close this ticket, we should set default value for this and 
add this information in the documentation.


> Camel-salesforce component does not try to reconnect on specific error
> --
>
> Key: CAMEL-12484
> URL: https://issues.apache.org/jira/browse/CAMEL-12484
> Project: Camel
>  Issue Type: Bug
>  Components: camel-salesforce
>Affects Versions: 2.21.0
>Reporter: Hemang Ajmera
>Assignee: Zoran Regvart
>Priority: Major
> Attachments: logs.zip
>
>
> The issue is very much identical to CAMEL-10238 where camel component does 
> not try to reconnect. It was resolved for that particular case, however there 
> is additional scenario where we are facing exactly similar problem.
> Here is the key log message after which component stops retrying
> {{2018-05-03 17:19:50.257 WARN 7636 — [nt@911561694-23] 
> o.a.c.c.s.i.s.SubscriptionHelper : Connect failure: 
> {clientId=3qi3g4psrtqrntt15ockewu0a59q, advice=
> {reconnect=none, interval=0}
> , channel=/meta/connect, id=154, error=403::Unknown client, 
> successful=false}}}
> Please note that we are getting Connect failure multiple times but it is able 
> to reconnect where there is exception or when the advice is to do handshake 
> again. Here are those sample which works...
>  * The one with exceptions
> {quote}2018-05-03 17:19:17.965  WARN 7636 — [nt@911561694-23] 
> o.a.c.c.s.i.s.SubscriptionHelper : Connect failure: {failure=
> Unknown macro: \{exception=java.io.EOFException}
> ],recv=HttpReceiverOverHTTP@144e8ebb(rsp=IDLE,failure=null)[HttpParser
> Unknown macro: \{s=CLOSED,0 of -1}
> ]]<-DecryptedEndPoint@245db684
> Unknown macro: \{telia-fi--dev.cs88.my.salesforce.com/85.222.137.144}
> ->HttpConnectionOverHTTP@69f41507(l:/0:0:0:0:0:0:0:1:60369 <-> 
> r:telia-fi--dev.cs88.my.salesforce.com/85.222.137.144:443,closed=false)=>HttpChannelOverHTTP@3109c579(exchange=HttpExchange@76b96e24
>  req=TERMINATED/null@null 
> res=PENDING/null@null)[send=HttpSenderOverHTTP@5d6efa04(req=QUEUED,snd=COMPLETED,failure=null)[HttpGenerator@43ac2f18
> Unknown macro: \{s=START}
> ],recv=HttpReceiverOverHTTP@144e8ebb(rsp=IDLE,failure=null)[HttpParser
> ]]->SocketChannelEndPoint@6b93b346
> Unknown macro: \{telia-fi--dev.cs88.my.salesforce.com/85.222.137.144}
> Unknown macro: \{io=0/0,kio=0,kro=1}
>  
> ->SslConnection@53bc7193\{NEED_WRAP,eio=-1/-1,di=-1}=>HttpConnectionOverHTTP@69f41507(l:/0:0:0:0:0:0:0:1:60369
>  <-> 
> r:telia-fi--dev.cs88.my.salesforce.com/85.222.137.144:443,closed=false)=>HttpChannelOverHTTP@3109c579(exchange=HttpExchange@76b96e24
>  req=TERMINATED/null@null 
> res=PENDING/null@null)[send=HttpSenderOverHTTP@5d6efa04(req=QUEUED,snd=COMPLETED,failure=null)[HttpGenerator@43ac2f18
> Unknown macro: \{s=START}
> ],recv=HttpReceiverOverHTTP@144e8ebb(rsp=IDLE,failure=null)[HttpParser
> Unknown macro: \{s=CLOSED,0 of -1}
> ]], message=\{clientId=3qi3g4psrtqrntt15ockewu0a59q, channel=/meta/connect, 
> id=153, connectionType=long-polling}, connectionType=long-polling}, 
> channel=/meta/connect, id=153, successful=false}
> {quote}
>  
>  * The one with advice for new handshake
> {quote}2018-05-03 16:31:08.970  WARN 7636 — [nt@911561694-21] 
> o.a.c.c.s.i.s.SubscriptionHelper : Connect failure:
> Unknown macro: \{advice=Unknown macro}
> , channel=/meta/connect, id=83, error=403::Unknown client, successful=false}
> {quote}
>  
> One more thing, this log is coming from line 168 {{LOG.warn("Connect failure: 
> {}", message);}} of the 
> [https://github.com/apache/camel/blob/master/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/streaming/SubscriptionHelper.java#L168].
>  I see that there is no attempt to reconnect. If this information helps move 
> things faster...
>  



--

[jira] [Commented] (CAMEL-12484) Camel-salesforce component does not try to reconnect on specific error

2018-08-20 Thread Hemang Ajmera (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12484?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16585753#comment-16585753
 ] 

Hemang Ajmera commented on CAMEL-12484:
---

Also the first exception (line number 1530) after the last time it was able to 
receive message(line number 1282) is bit different

 
{code:java}
2018-08-06 05:03:18.822  INFO 9 --- [ent@710f4dc7-25] 
o.eclipse.jetty.client.ResponseNotifier  : Exception while notifying listener 
org.cometd.client.transport.LongPollingTransport$2@53962c22 
java.lang.NullPointerException: null     at 
java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:936) 
~[na:1.8.0_151]     at 
org.cometd.common.AbstractClientSession.getReleasableChannel(AbstractClientSession.java:320)
 ~[cometd-java-common-3.1.2.jar!/:na]     at 
org.cometd.common.AbstractClientSession.receive(AbstractClientSession.java:240) 
~[cometd-java-common-3.1.2.jar!/:na]     at 
org.cometd.client.BayeuxClient.processMessage(BayeuxClient.java:822) 
~[cometd-java-client-3.1.2.jar!/:na]     at 
org.cometd.client.BayeuxClient.processMessages(BayeuxClient.java:618) 
~[cometd-java-client-3.1.2.jar!/:na]     at 
org.cometd.client.BayeuxClient.access$3100(BayeuxClient.java:100) 
~[cometd-java-client-3.1.2.jar!/:na]     at 
org.cometd.client.BayeuxClient$MessageTransportListener.onMessages(BayeuxClient.java:1189)
 ~[cometd-java-client-3.1.2.jar!/:na]     at 
org.cometd.client.transport.LongPollingTransport$2.onComplete(LongPollingTransport.java:236)
 ~[cometd-java-client-3.1.2.jar!/:na]     at 
org.eclipse.jetty.client.ResponseNotifier.notifyComplete(ResponseNotifier.java:193)
 [jetty-client-9.4.9.v20180320.jar!/:9.4.9.v20180320]     at 
org.eclipse.jetty.client.ResponseNotifier.notifyComplete(ResponseNotifier.java:185)
 [jetty-client-9.4.9.v20180320.jar!/:9.4.9.v20180320]     at 
org.eclipse.jetty.client.HttpReceiver.terminateResponse(HttpReceiver.java:464) 
[jetty-client-9.4.9.v20180320.jar!/:9.4.9.v20180320]     at 
org.eclipse.jetty.client.HttpReceiver.responseSuccess(HttpReceiver.java:410) 
[jetty-client-9.4.9.v20180320.jar!/:9.4.9.v20180320]     at 
org.eclipse.jetty.client.http.HttpReceiverOverHTTP.messageComplete(HttpReceiverOverHTTP.java:301)
 [jetty-client-9.4.9.v20180320.jar!/:9.4.9.v20180320]     at 
org.eclipse.jetty.http.HttpParser.handleContentMessage(HttpParser.java:628) 
[jetty-http-9.4.9.v20180320.jar!/:9.4.9.v20180320]     at 
org.eclipse.jetty.http.HttpParser.parseContent(HttpParser.java:1594) 
[jetty-http-9.4.9.v20180320.jar!/:9.4.9.v20180320]     at 
org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:1442) 
[jetty-http-9.4.9.v20180320.jar!/:9.4.9.v20180320]     at 
org.eclipse.jetty.client.http.HttpReceiverOverHTTP.parse(HttpReceiverOverHTTP.java:173)
 [jetty-client-9.4.9.v20180320.jar!/:9.4.9.v20180320]     at 
org.eclipse.jetty.client.http.HttpReceiverOverHTTP.process(HttpReceiverOverHTTP.java:134)
 [jetty-client-9.4.9.v20180320.jar!/:9.4.9.v20180320]     at 
org.eclipse.jetty.client.http.HttpReceiverOverHTTP.receive(HttpReceiverOverHTTP.java:72)
 [jetty-client-9.4.9.v20180320.jar!/:9.4.9.v20180320]     at 
org.eclipse.jetty.client.http.HttpChannelOverHTTP.receive(HttpChannelOverHTTP.java:133)
 [jetty-client-9.4.9.v20180320.jar!/:9.4.9.v20180320]     at 
org.eclipse.jetty.client.http.HttpConnectionOverHTTP.onFillable(HttpConnectionOverHTTP.java:155)
 [jetty-client-9.4.9.v20180320.jar!/:9.4.9.v20180320]     at 
org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:281)
 [jetty-io-9.4.9.v20180320.jar!/:9.4.9.v20180320]     at 
org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:102) 
[jetty-io-9.4.9.v20180320.jar!/:9.4.9.v20180320]     at 
org.eclipse.jetty.io.ssl.SslConnection.onFillable(SslConnection.java:291) 
[jetty-io-9.4.9.v20180320.jar!/:9.4.9.v20180320]     at 
org.eclipse.jetty.io.ssl.SslConnection$3.succeeded(SslConnection.java:151) 
[jetty-io-9.4.9.v20180320.jar!/:9.4.9.v20180320]     at 
org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:102) 
[jetty-io-9.4.9.v20180320.jar!/:9.4.9.v20180320]     at 
org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:118) 
[jetty-io-9.4.9.v20180320.jar!/:9.4.9.v20180320]     at 
org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:319)
 [jetty-util-9.4.9.v20180320.jar!/:9.4.9.v20180320]     at 
org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:175)
 [jetty-util-9.4.9.v20180320.jar!/:9.4.9.v20180320]     at 
org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:133)
 [jetty-util-9.4.9.v20180320.jar!/:9.4.9.v20180320]     at 
org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366)
 [jetty-util-9.4.9.v20180320.jar!/:9.4.9.v20180320]     at 
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:754)
 

[jira] [Commented] (CAMEL-12484) Camel-salesforce component does not try to reconnect on specific error

2018-08-20 Thread Hemang Ajmera (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12484?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16585750#comment-16585750
 ] 

Hemang Ajmera commented on CAMEL-12484:
---

I am using camel-salesforce-starter with springboot. Can I set the timeout by 
setting application.properties

{{camel.component.salesforce.httpClientProperties.idleTimeout=5000}}

> Camel-salesforce component does not try to reconnect on specific error
> --
>
> Key: CAMEL-12484
> URL: https://issues.apache.org/jira/browse/CAMEL-12484
> Project: Camel
>  Issue Type: Bug
>  Components: camel-salesforce
>Affects Versions: 2.21.0
>Reporter: Hemang Ajmera
>Assignee: Zoran Regvart
>Priority: Major
> Attachments: logs.zip
>
>
> The issue is very much identical to CAMEL-10238 where camel component does 
> not try to reconnect. It was resolved for that particular case, however there 
> is additional scenario where we are facing exactly similar problem.
> Here is the key log message after which component stops retrying
> {{2018-05-03 17:19:50.257 WARN 7636 — [nt@911561694-23] 
> o.a.c.c.s.i.s.SubscriptionHelper : Connect failure: 
> {clientId=3qi3g4psrtqrntt15ockewu0a59q, advice=
> {reconnect=none, interval=0}
> , channel=/meta/connect, id=154, error=403::Unknown client, 
> successful=false}}}
> Please note that we are getting Connect failure multiple times but it is able 
> to reconnect where there is exception or when the advice is to do handshake 
> again. Here are those sample which works...
>  * The one with exceptions
> {quote}2018-05-03 17:19:17.965  WARN 7636 — [nt@911561694-23] 
> o.a.c.c.s.i.s.SubscriptionHelper : Connect failure: {failure=
> Unknown macro: \{exception=java.io.EOFException}
> ],recv=HttpReceiverOverHTTP@144e8ebb(rsp=IDLE,failure=null)[HttpParser
> Unknown macro: \{s=CLOSED,0 of -1}
> ]]<-DecryptedEndPoint@245db684
> Unknown macro: \{telia-fi--dev.cs88.my.salesforce.com/85.222.137.144}
> ->HttpConnectionOverHTTP@69f41507(l:/0:0:0:0:0:0:0:1:60369 <-> 
> r:telia-fi--dev.cs88.my.salesforce.com/85.222.137.144:443,closed=false)=>HttpChannelOverHTTP@3109c579(exchange=HttpExchange@76b96e24
>  req=TERMINATED/null@null 
> res=PENDING/null@null)[send=HttpSenderOverHTTP@5d6efa04(req=QUEUED,snd=COMPLETED,failure=null)[HttpGenerator@43ac2f18
> Unknown macro: \{s=START}
> ],recv=HttpReceiverOverHTTP@144e8ebb(rsp=IDLE,failure=null)[HttpParser
> ]]->SocketChannelEndPoint@6b93b346
> Unknown macro: \{telia-fi--dev.cs88.my.salesforce.com/85.222.137.144}
> Unknown macro: \{io=0/0,kio=0,kro=1}
>  
> ->SslConnection@53bc7193\{NEED_WRAP,eio=-1/-1,di=-1}=>HttpConnectionOverHTTP@69f41507(l:/0:0:0:0:0:0:0:1:60369
>  <-> 
> r:telia-fi--dev.cs88.my.salesforce.com/85.222.137.144:443,closed=false)=>HttpChannelOverHTTP@3109c579(exchange=HttpExchange@76b96e24
>  req=TERMINATED/null@null 
> res=PENDING/null@null)[send=HttpSenderOverHTTP@5d6efa04(req=QUEUED,snd=COMPLETED,failure=null)[HttpGenerator@43ac2f18
> Unknown macro: \{s=START}
> ],recv=HttpReceiverOverHTTP@144e8ebb(rsp=IDLE,failure=null)[HttpParser
> Unknown macro: \{s=CLOSED,0 of -1}
> ]], message=\{clientId=3qi3g4psrtqrntt15ockewu0a59q, channel=/meta/connect, 
> id=153, connectionType=long-polling}, connectionType=long-polling}, 
> channel=/meta/connect, id=153, successful=false}
> {quote}
>  
>  * The one with advice for new handshake
> {quote}2018-05-03 16:31:08.970  WARN 7636 — [nt@911561694-21] 
> o.a.c.c.s.i.s.SubscriptionHelper : Connect failure:
> Unknown macro: \{advice=Unknown macro}
> , channel=/meta/connect, id=83, error=403::Unknown client, successful=false}
> {quote}
>  
> One more thing, this log is coming from line 168 {{LOG.warn("Connect failure: 
> {}", message);}} of the 
> [https://github.com/apache/camel/blob/master/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/streaming/SubscriptionHelper.java#L168].
>  I see that there is no attempt to reconnect. If this information helps move 
> things faster...
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12484) Camel-salesforce component does not try to reconnect on specific error

2018-08-20 Thread Hemang Ajmera (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12484?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16585479#comment-16585479
 ] 

Hemang Ajmera commented on CAMEL-12484:
---

I will try out and let you know

> Camel-salesforce component does not try to reconnect on specific error
> --
>
> Key: CAMEL-12484
> URL: https://issues.apache.org/jira/browse/CAMEL-12484
> Project: Camel
>  Issue Type: Bug
>  Components: camel-salesforce
>Affects Versions: 2.21.0
>Reporter: Hemang Ajmera
>Assignee: Zoran Regvart
>Priority: Major
> Attachments: logs.zip
>
>
> The issue is very much identical to CAMEL-10238 where camel component does 
> not try to reconnect. It was resolved for that particular case, however there 
> is additional scenario where we are facing exactly similar problem.
> Here is the key log message after which component stops retrying
> {{2018-05-03 17:19:50.257 WARN 7636 — [nt@911561694-23] 
> o.a.c.c.s.i.s.SubscriptionHelper : Connect failure: 
> {clientId=3qi3g4psrtqrntt15ockewu0a59q, advice=
> {reconnect=none, interval=0}
> , channel=/meta/connect, id=154, error=403::Unknown client, 
> successful=false}}}
> Please note that we are getting Connect failure multiple times but it is able 
> to reconnect where there is exception or when the advice is to do handshake 
> again. Here are those sample which works...
>  * The one with exceptions
> {quote}2018-05-03 17:19:17.965  WARN 7636 — [nt@911561694-23] 
> o.a.c.c.s.i.s.SubscriptionHelper : Connect failure: {failure=
> Unknown macro: \{exception=java.io.EOFException}
> ],recv=HttpReceiverOverHTTP@144e8ebb(rsp=IDLE,failure=null)[HttpParser
> Unknown macro: \{s=CLOSED,0 of -1}
> ]]<-DecryptedEndPoint@245db684
> Unknown macro: \{telia-fi--dev.cs88.my.salesforce.com/85.222.137.144}
> ->HttpConnectionOverHTTP@69f41507(l:/0:0:0:0:0:0:0:1:60369 <-> 
> r:telia-fi--dev.cs88.my.salesforce.com/85.222.137.144:443,closed=false)=>HttpChannelOverHTTP@3109c579(exchange=HttpExchange@76b96e24
>  req=TERMINATED/null@null 
> res=PENDING/null@null)[send=HttpSenderOverHTTP@5d6efa04(req=QUEUED,snd=COMPLETED,failure=null)[HttpGenerator@43ac2f18
> Unknown macro: \{s=START}
> ],recv=HttpReceiverOverHTTP@144e8ebb(rsp=IDLE,failure=null)[HttpParser
> ]]->SocketChannelEndPoint@6b93b346
> Unknown macro: \{telia-fi--dev.cs88.my.salesforce.com/85.222.137.144}
> Unknown macro: \{io=0/0,kio=0,kro=1}
>  
> ->SslConnection@53bc7193\{NEED_WRAP,eio=-1/-1,di=-1}=>HttpConnectionOverHTTP@69f41507(l:/0:0:0:0:0:0:0:1:60369
>  <-> 
> r:telia-fi--dev.cs88.my.salesforce.com/85.222.137.144:443,closed=false)=>HttpChannelOverHTTP@3109c579(exchange=HttpExchange@76b96e24
>  req=TERMINATED/null@null 
> res=PENDING/null@null)[send=HttpSenderOverHTTP@5d6efa04(req=QUEUED,snd=COMPLETED,failure=null)[HttpGenerator@43ac2f18
> Unknown macro: \{s=START}
> ],recv=HttpReceiverOverHTTP@144e8ebb(rsp=IDLE,failure=null)[HttpParser
> Unknown macro: \{s=CLOSED,0 of -1}
> ]], message=\{clientId=3qi3g4psrtqrntt15ockewu0a59q, channel=/meta/connect, 
> id=153, connectionType=long-polling}, connectionType=long-polling}, 
> channel=/meta/connect, id=153, successful=false}
> {quote}
>  
>  * The one with advice for new handshake
> {quote}2018-05-03 16:31:08.970  WARN 7636 — [nt@911561694-21] 
> o.a.c.c.s.i.s.SubscriptionHelper : Connect failure:
> Unknown macro: \{advice=Unknown macro}
> , channel=/meta/connect, id=83, error=403::Unknown client, successful=false}
> {quote}
>  
> One more thing, this log is coming from line 168 {{LOG.warn("Connect failure: 
> {}", message);}} of the 
> [https://github.com/apache/camel/blob/master/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/streaming/SubscriptionHelper.java#L168].
>  I see that there is no attempt to reconnect. If this information helps move 
> things faster...
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (CAMEL-12484) Camel-salesforce component does not try to reconnect on specific error

2018-08-13 Thread Hemang Ajmera (JIRA)


 [ 
https://issues.apache.org/jira/browse/CAMEL-12484?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Hemang Ajmera updated CAMEL-12484:
--
Attachment: logs.zip

> Camel-salesforce component does not try to reconnect on specific error
> --
>
> Key: CAMEL-12484
> URL: https://issues.apache.org/jira/browse/CAMEL-12484
> Project: Camel
>  Issue Type: Bug
>  Components: camel-salesforce
>Affects Versions: 2.21.0
>Reporter: Hemang Ajmera
>Priority: Major
> Attachments: logs.zip
>
>
> The issue is very much identical to CAMEL-10238 where camel component does 
> not try to reconnect. It was resolved for that particular case, however there 
> is additional scenario where we are facing exactly similar problem.
> Here is the key log message after which component stops retrying
> {{2018-05-03 17:19:50.257 WARN 7636 — [nt@911561694-23] 
> o.a.c.c.s.i.s.SubscriptionHelper : Connect failure: 
> {clientId=3qi3g4psrtqrntt15ockewu0a59q, advice=
> {reconnect=none, interval=0}
> , channel=/meta/connect, id=154, error=403::Unknown client, 
> successful=false}}}
> Please note that we are getting Connect failure multiple times but it is able 
> to reconnect where there is exception or when the advice is to do handshake 
> again. Here are those sample which works...
>  * The one with exceptions
> {quote}2018-05-03 17:19:17.965  WARN 7636 — [nt@911561694-23] 
> o.a.c.c.s.i.s.SubscriptionHelper : Connect failure: {failure=
> Unknown macro: \{exception=java.io.EOFException}
> ],recv=HttpReceiverOverHTTP@144e8ebb(rsp=IDLE,failure=null)[HttpParser
> Unknown macro: \{s=CLOSED,0 of -1}
> ]]<-DecryptedEndPoint@245db684
> Unknown macro: \{telia-fi--dev.cs88.my.salesforce.com/85.222.137.144}
> ->HttpConnectionOverHTTP@69f41507(l:/0:0:0:0:0:0:0:1:60369 <-> 
> r:telia-fi--dev.cs88.my.salesforce.com/85.222.137.144:443,closed=false)=>HttpChannelOverHTTP@3109c579(exchange=HttpExchange@76b96e24
>  req=TERMINATED/null@null 
> res=PENDING/null@null)[send=HttpSenderOverHTTP@5d6efa04(req=QUEUED,snd=COMPLETED,failure=null)[HttpGenerator@43ac2f18
> Unknown macro: \{s=START}
> ],recv=HttpReceiverOverHTTP@144e8ebb(rsp=IDLE,failure=null)[HttpParser
> ]]->SocketChannelEndPoint@6b93b346
> Unknown macro: \{telia-fi--dev.cs88.my.salesforce.com/85.222.137.144}
> Unknown macro: \{io=0/0,kio=0,kro=1}
>  
> ->SslConnection@53bc7193\{NEED_WRAP,eio=-1/-1,di=-1}=>HttpConnectionOverHTTP@69f41507(l:/0:0:0:0:0:0:0:1:60369
>  <-> 
> r:telia-fi--dev.cs88.my.salesforce.com/85.222.137.144:443,closed=false)=>HttpChannelOverHTTP@3109c579(exchange=HttpExchange@76b96e24
>  req=TERMINATED/null@null 
> res=PENDING/null@null)[send=HttpSenderOverHTTP@5d6efa04(req=QUEUED,snd=COMPLETED,failure=null)[HttpGenerator@43ac2f18
> Unknown macro: \{s=START}
> ],recv=HttpReceiverOverHTTP@144e8ebb(rsp=IDLE,failure=null)[HttpParser
> Unknown macro: \{s=CLOSED,0 of -1}
> ]], message=\{clientId=3qi3g4psrtqrntt15ockewu0a59q, channel=/meta/connect, 
> id=153, connectionType=long-polling}, connectionType=long-polling}, 
> channel=/meta/connect, id=153, successful=false}
> {quote}
>  
>  * The one with advice for new handshake
> {quote}2018-05-03 16:31:08.970  WARN 7636 — [nt@911561694-21] 
> o.a.c.c.s.i.s.SubscriptionHelper : Connect failure:
> Unknown macro: \{advice=Unknown macro}
> , channel=/meta/connect, id=83, error=403::Unknown client, successful=false}
> {quote}
>  
> One more thing, this log is coming from line 168 {{LOG.warn("Connect failure: 
> {}", message);}} of the 
> [https://github.com/apache/camel/blob/master/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/streaming/SubscriptionHelper.java#L168].
>  I see that there is no attempt to reconnect. If this information helps move 
> things faster...
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Comment Edited] (CAMEL-12484) Camel-salesforce component does not try to reconnect on specific error

2018-08-13 Thread Hemang Ajmera (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12484?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16578083#comment-16578083
 ] 

Hemang Ajmera edited comment on CAMEL-12484 at 8/13/18 12:06 PM:
-

We have being running this component with debug logging for 
org.apache.camel.component.salesforce.internal.streaming.SubscriptionHelper

I have two logs, one before restart and one after restart...

Here are my observations.
 # In the logs before restart the component is running but not picking up 
message.We can see that after every 110 seconds it is polling message. However 
there are not messages being picked after 2018-08-06 02:01:36.024. Message with 
replayId = 11341 is the last one, after which it has not been able to pick any 
message.
 # Logs after restart where component picks up the messages without any 
changes. Since the component was started after 4 days there are few messages 
which are missing and the first message which it could get is 11485 and we have 
lost all the messages in between.
 # We are using camel springboot starter component for salesforce
 # We are using initial replay is as -2 and we are saving all the replayid to 
avoid duplicates.
 


was (Author: hemangajmera):
We have being running this component with debug logging for 
org.apache.camel.component.salesforce.internal.streaming.SubscriptionHelper

I will be attaching two logs by tomorrow end of the day...


 1. where the component is running but not picking up message.
 2. Logs after restart where component picks up the messages without any 
changes.
  
 I am just doing some cleanup on the logs to remove all internal details.

> Camel-salesforce component does not try to reconnect on specific error
> --
>
> Key: CAMEL-12484
> URL: https://issues.apache.org/jira/browse/CAMEL-12484
> Project: Camel
>  Issue Type: Bug
>  Components: camel-salesforce
>Affects Versions: 2.21.0
>Reporter: Hemang Ajmera
>Priority: Major
> Attachments: logs.zip
>
>
> The issue is very much identical to CAMEL-10238 where camel component does 
> not try to reconnect. It was resolved for that particular case, however there 
> is additional scenario where we are facing exactly similar problem.
> Here is the key log message after which component stops retrying
> {{2018-05-03 17:19:50.257 WARN 7636 — [nt@911561694-23] 
> o.a.c.c.s.i.s.SubscriptionHelper : Connect failure: 
> {clientId=3qi3g4psrtqrntt15ockewu0a59q, advice=
> {reconnect=none, interval=0}
> , channel=/meta/connect, id=154, error=403::Unknown client, 
> successful=false}}}
> Please note that we are getting Connect failure multiple times but it is able 
> to reconnect where there is exception or when the advice is to do handshake 
> again. Here are those sample which works...
>  * The one with exceptions
> {quote}2018-05-03 17:19:17.965  WARN 7636 — [nt@911561694-23] 
> o.a.c.c.s.i.s.SubscriptionHelper : Connect failure: {failure=
> Unknown macro: \{exception=java.io.EOFException}
> ],recv=HttpReceiverOverHTTP@144e8ebb(rsp=IDLE,failure=null)[HttpParser
> Unknown macro: \{s=CLOSED,0 of -1}
> ]]<-DecryptedEndPoint@245db684
> Unknown macro: \{telia-fi--dev.cs88.my.salesforce.com/85.222.137.144}
> ->HttpConnectionOverHTTP@69f41507(l:/0:0:0:0:0:0:0:1:60369 <-> 
> r:telia-fi--dev.cs88.my.salesforce.com/85.222.137.144:443,closed=false)=>HttpChannelOverHTTP@3109c579(exchange=HttpExchange@76b96e24
>  req=TERMINATED/null@null 
> res=PENDING/null@null)[send=HttpSenderOverHTTP@5d6efa04(req=QUEUED,snd=COMPLETED,failure=null)[HttpGenerator@43ac2f18
> Unknown macro: \{s=START}
> ],recv=HttpReceiverOverHTTP@144e8ebb(rsp=IDLE,failure=null)[HttpParser
> ]]->SocketChannelEndPoint@6b93b346
> Unknown macro: \{telia-fi--dev.cs88.my.salesforce.com/85.222.137.144}
> Unknown macro: \{io=0/0,kio=0,kro=1}
>  
> ->SslConnection@53bc7193\{NEED_WRAP,eio=-1/-1,di=-1}=>HttpConnectionOverHTTP@69f41507(l:/0:0:0:0:0:0:0:1:60369
>  <-> 
> r:telia-fi--dev.cs88.my.salesforce.com/85.222.137.144:443,closed=false)=>HttpChannelOverHTTP@3109c579(exchange=HttpExchange@76b96e24
>  req=TERMINATED/null@null 
> res=PENDING/null@null)[send=HttpSenderOverHTTP@5d6efa04(req=QUEUED,snd=COMPLETED,failure=null)[HttpGenerator@43ac2f18
> Unknown macro: \{s=START}
> ],recv=HttpReceiverOverHTTP@144e8ebb(rsp=IDLE,failure=null)[HttpParser
> Unknown macro: \{s=CLOSED,0 of -1}
> ]], message=\{clientId=3qi3g4psrtqrntt15ockewu0a59q, channel=/meta/connect, 
> id=153, connectionType=long-polling}, connectionType=long-polling}, 
> channel=/meta/connect, id=153, successful=false}
> {quote}
>  
>  * The one with advice for new handshake
> {quote}2018-05-03 16:31:08.970  WARN 7636 — [nt@911561694-21] 
> o.a.c.c.s.i.s.SubscriptionHelper : Connect failure:
> Unknown macro: \{advice=Unknown macro}
> 

[jira] [Commented] (CAMEL-12484) Camel-salesforce component does not try to reconnect on specific error

2018-08-13 Thread Hemang Ajmera (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12484?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16578083#comment-16578083
 ] 

Hemang Ajmera commented on CAMEL-12484:
---

We have being running this component with debug logging for 
org.apache.camel.component.salesforce.internal.streaming.SubscriptionHelper

I will be attaching two logs by tomorrow end of the day...


 1. where the component is running but not picking up message.
 2. Logs after restart where component picks up the messages without any 
changes.
  
 I am just doing some cleanup on the logs to remove all internal details.

> Camel-salesforce component does not try to reconnect on specific error
> --
>
> Key: CAMEL-12484
> URL: https://issues.apache.org/jira/browse/CAMEL-12484
> Project: Camel
>  Issue Type: Bug
>  Components: camel-salesforce
>Affects Versions: 2.21.0
>Reporter: Hemang Ajmera
>Priority: Major
>
> The issue is very much identical to CAMEL-10238 where camel component does 
> not try to reconnect. It was resolved for that particular case, however there 
> is additional scenario where we are facing exactly similar problem.
> Here is the key log message after which component stops retrying
> {{2018-05-03 17:19:50.257 WARN 7636 — [nt@911561694-23] 
> o.a.c.c.s.i.s.SubscriptionHelper : Connect failure: 
> {clientId=3qi3g4psrtqrntt15ockewu0a59q, advice=
> {reconnect=none, interval=0}
> , channel=/meta/connect, id=154, error=403::Unknown client, 
> successful=false}}}
> Please note that we are getting Connect failure multiple times but it is able 
> to reconnect where there is exception or when the advice is to do handshake 
> again. Here are those sample which works...
>  * The one with exceptions
> {quote}2018-05-03 17:19:17.965  WARN 7636 — [nt@911561694-23] 
> o.a.c.c.s.i.s.SubscriptionHelper : Connect failure: {failure=
> Unknown macro: \{exception=java.io.EOFException}
> ],recv=HttpReceiverOverHTTP@144e8ebb(rsp=IDLE,failure=null)[HttpParser
> Unknown macro: \{s=CLOSED,0 of -1}
> ]]<-DecryptedEndPoint@245db684
> Unknown macro: \{telia-fi--dev.cs88.my.salesforce.com/85.222.137.144}
> ->HttpConnectionOverHTTP@69f41507(l:/0:0:0:0:0:0:0:1:60369 <-> 
> r:telia-fi--dev.cs88.my.salesforce.com/85.222.137.144:443,closed=false)=>HttpChannelOverHTTP@3109c579(exchange=HttpExchange@76b96e24
>  req=TERMINATED/null@null 
> res=PENDING/null@null)[send=HttpSenderOverHTTP@5d6efa04(req=QUEUED,snd=COMPLETED,failure=null)[HttpGenerator@43ac2f18
> Unknown macro: \{s=START}
> ],recv=HttpReceiverOverHTTP@144e8ebb(rsp=IDLE,failure=null)[HttpParser
> ]]->SocketChannelEndPoint@6b93b346
> Unknown macro: \{telia-fi--dev.cs88.my.salesforce.com/85.222.137.144}
> Unknown macro: \{io=0/0,kio=0,kro=1}
>  
> ->SslConnection@53bc7193\{NEED_WRAP,eio=-1/-1,di=-1}=>HttpConnectionOverHTTP@69f41507(l:/0:0:0:0:0:0:0:1:60369
>  <-> 
> r:telia-fi--dev.cs88.my.salesforce.com/85.222.137.144:443,closed=false)=>HttpChannelOverHTTP@3109c579(exchange=HttpExchange@76b96e24
>  req=TERMINATED/null@null 
> res=PENDING/null@null)[send=HttpSenderOverHTTP@5d6efa04(req=QUEUED,snd=COMPLETED,failure=null)[HttpGenerator@43ac2f18
> Unknown macro: \{s=START}
> ],recv=HttpReceiverOverHTTP@144e8ebb(rsp=IDLE,failure=null)[HttpParser
> Unknown macro: \{s=CLOSED,0 of -1}
> ]], message=\{clientId=3qi3g4psrtqrntt15ockewu0a59q, channel=/meta/connect, 
> id=153, connectionType=long-polling}, connectionType=long-polling}, 
> channel=/meta/connect, id=153, successful=false}
> {quote}
>  
>  * The one with advice for new handshake
> {quote}2018-05-03 16:31:08.970  WARN 7636 — [nt@911561694-21] 
> o.a.c.c.s.i.s.SubscriptionHelper : Connect failure:
> Unknown macro: \{advice=Unknown macro}
> , channel=/meta/connect, id=83, error=403::Unknown client, successful=false}
> {quote}
>  
> One more thing, this log is coming from line 168 {{LOG.warn("Connect failure: 
> {}", message);}} of the 
> [https://github.com/apache/camel/blob/master/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/streaming/SubscriptionHelper.java#L168].
>  I see that there is no attempt to reconnect. If this information helps move 
> things faster...
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12484) Camel-salesforce component does not try to reconnect on specific error

2018-05-09 Thread Hemang Ajmera (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-12484?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16468636#comment-16468636
 ] 

Hemang Ajmera commented on CAMEL-12484:
---

[~dhirajsb], [~zregvart], can you please look into this one.

> Camel-salesforce component does not try to reconnect on specific error
> --
>
> Key: CAMEL-12484
> URL: https://issues.apache.org/jira/browse/CAMEL-12484
> Project: Camel
>  Issue Type: Bug
>  Components: camel-salesforce
>Affects Versions: 2.21.0
>Reporter: Hemang Ajmera
>Priority: Major
>
> The issue is very much identical to CAMEL-10238 where camel component does 
> not try to reconnect. It was resolved for that particular case, however there 
> is additional scenario where we are facing exactly similar problem.
> Here is the key log message after which component stops retrying
> {{2018-05-03 17:19:50.257 WARN 7636 — [nt@911561694-23] 
> o.a.c.c.s.i.s.SubscriptionHelper : Connect failure: 
> {clientId=3qi3g4psrtqrntt15ockewu0a59q, advice=
> {reconnect=none, interval=0}
> , channel=/meta/connect, id=154, error=403::Unknown client, 
> successful=false}}}
> Please note that we are getting Connect failure multiple times but it is able 
> to reconnect where there is exception or when the advice is to do handshake 
> again. Here are those sample which works...
>  * The one with exceptions
> {quote}2018-05-03 17:19:17.965  WARN 7636 — [nt@911561694-23] 
> o.a.c.c.s.i.s.SubscriptionHelper : Connect failure: {failure=
> Unknown macro: \{exception=java.io.EOFException}
> ],recv=HttpReceiverOverHTTP@144e8ebb(rsp=IDLE,failure=null)[HttpParser
> Unknown macro: \{s=CLOSED,0 of -1}
> ]]<-DecryptedEndPoint@245db684
> Unknown macro: \{telia-fi--dev.cs88.my.salesforce.com/85.222.137.144}
> ->HttpConnectionOverHTTP@69f41507(l:/0:0:0:0:0:0:0:1:60369 <-> 
> r:telia-fi--dev.cs88.my.salesforce.com/85.222.137.144:443,closed=false)=>HttpChannelOverHTTP@3109c579(exchange=HttpExchange@76b96e24
>  req=TERMINATED/null@null 
> res=PENDING/null@null)[send=HttpSenderOverHTTP@5d6efa04(req=QUEUED,snd=COMPLETED,failure=null)[HttpGenerator@43ac2f18
> Unknown macro: \{s=START}
> ],recv=HttpReceiverOverHTTP@144e8ebb(rsp=IDLE,failure=null)[HttpParser
> ]]->SocketChannelEndPoint@6b93b346
> Unknown macro: \{telia-fi--dev.cs88.my.salesforce.com/85.222.137.144}
> Unknown macro: \{io=0/0,kio=0,kro=1}
>  
> ->SslConnection@53bc7193\{NEED_WRAP,eio=-1/-1,di=-1}=>HttpConnectionOverHTTP@69f41507(l:/0:0:0:0:0:0:0:1:60369
>  <-> 
> r:telia-fi--dev.cs88.my.salesforce.com/85.222.137.144:443,closed=false)=>HttpChannelOverHTTP@3109c579(exchange=HttpExchange@76b96e24
>  req=TERMINATED/null@null 
> res=PENDING/null@null)[send=HttpSenderOverHTTP@5d6efa04(req=QUEUED,snd=COMPLETED,failure=null)[HttpGenerator@43ac2f18
> Unknown macro: \{s=START}
> ],recv=HttpReceiverOverHTTP@144e8ebb(rsp=IDLE,failure=null)[HttpParser
> Unknown macro: \{s=CLOSED,0 of -1}
> ]], message=\{clientId=3qi3g4psrtqrntt15ockewu0a59q, channel=/meta/connect, 
> id=153, connectionType=long-polling}, connectionType=long-polling}, 
> channel=/meta/connect, id=153, successful=false}
> {quote}
>  
>  * The one with advice for new handshake
> {quote}2018-05-03 16:31:08.970  WARN 7636 — [nt@911561694-21] 
> o.a.c.c.s.i.s.SubscriptionHelper : Connect failure:
> Unknown macro: \{advice=Unknown macro}
> , channel=/meta/connect, id=83, error=403::Unknown client, successful=false}
> {quote}
>  
> One more thing, this log is coming from line 168 {{LOG.warn("Connect failure: 
> {}", message);}} of the 
> [https://github.com/apache/camel/blob/master/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/streaming/SubscriptionHelper.java#L168].
>  I see that there is no attempt to reconnect. If this information helps move 
> things faster...
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12484) Camel-salesforce component does not try to reconnect on specific error

2018-05-04 Thread Hemang Ajmera (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-12484?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16463765#comment-16463765
 ] 

Hemang Ajmera commented on CAMEL-12484:
---

Hi [~dhirajsb] and [~zregvart]

 

Can you please have a look that this ticket if time permits.

 

Thanks

> Camel-salesforce component does not try to reconnect on specific error
> --
>
> Key: CAMEL-12484
> URL: https://issues.apache.org/jira/browse/CAMEL-12484
> Project: Camel
>  Issue Type: Bug
>  Components: camel-salesforce
>Affects Versions: 2.21.0
>Reporter: Hemang Ajmera
>Priority: Major
>
> The issue is very much identical to CAMEL-10238 where camel component does 
> not try to reconnect. It was resolved for that particular case, however there 
> is additional scenario where we are facing exactly similar problem.
> Here is the key log message after which component stops retrying
> {{2018-05-03 17:19:50.257 WARN 7636 — [nt@911561694-23] 
> o.a.c.c.s.i.s.SubscriptionHelper : Connect failure: 
> {clientId=3qi3g4psrtqrntt15ockewu0a59q, advice=
> {reconnect=none, interval=0}
> , channel=/meta/connect, id=154, error=403::Unknown client, 
> successful=false}}}
> Please note that we are getting Connect failure multiple times but it is able 
> to reconnect where there is exception or when the advice is to do handshake 
> again. Here are those sample which works...
>  * The one with exceptions
> {quote}2018-05-03 17:19:17.965  WARN 7636 — [nt@911561694-23] 
> o.a.c.c.s.i.s.SubscriptionHelper : Connect failure: {failure=
> Unknown macro: \{exception=java.io.EOFException}
> ],recv=HttpReceiverOverHTTP@144e8ebb(rsp=IDLE,failure=null)[HttpParser
> Unknown macro: \{s=CLOSED,0 of -1}
> ]]<-DecryptedEndPoint@245db684
> Unknown macro: \{telia-fi--dev.cs88.my.salesforce.com/85.222.137.144}
> ->HttpConnectionOverHTTP@69f41507(l:/0:0:0:0:0:0:0:1:60369 <-> 
> r:telia-fi--dev.cs88.my.salesforce.com/85.222.137.144:443,closed=false)=>HttpChannelOverHTTP@3109c579(exchange=HttpExchange@76b96e24
>  req=TERMINATED/null@null 
> res=PENDING/null@null)[send=HttpSenderOverHTTP@5d6efa04(req=QUEUED,snd=COMPLETED,failure=null)[HttpGenerator@43ac2f18
> Unknown macro: \{s=START}
> ],recv=HttpReceiverOverHTTP@144e8ebb(rsp=IDLE,failure=null)[HttpParser
> ]]->SocketChannelEndPoint@6b93b346
> Unknown macro: \{telia-fi--dev.cs88.my.salesforce.com/85.222.137.144}
> Unknown macro: \{io=0/0,kio=0,kro=1}
>  
> ->SslConnection@53bc7193\{NEED_WRAP,eio=-1/-1,di=-1}=>HttpConnectionOverHTTP@69f41507(l:/0:0:0:0:0:0:0:1:60369
>  <-> 
> r:telia-fi--dev.cs88.my.salesforce.com/85.222.137.144:443,closed=false)=>HttpChannelOverHTTP@3109c579(exchange=HttpExchange@76b96e24
>  req=TERMINATED/null@null 
> res=PENDING/null@null)[send=HttpSenderOverHTTP@5d6efa04(req=QUEUED,snd=COMPLETED,failure=null)[HttpGenerator@43ac2f18
> Unknown macro: \{s=START}
> ],recv=HttpReceiverOverHTTP@144e8ebb(rsp=IDLE,failure=null)[HttpParser
> Unknown macro: \{s=CLOSED,0 of -1}
> ]], message=\{clientId=3qi3g4psrtqrntt15ockewu0a59q, channel=/meta/connect, 
> id=153, connectionType=long-polling}, connectionType=long-polling}, 
> channel=/meta/connect, id=153, successful=false}
> {quote}
>  
>  * The one with advice for new handshake
> {quote}2018-05-03 16:31:08.970  WARN 7636 — [nt@911561694-21] 
> o.a.c.c.s.i.s.SubscriptionHelper : Connect failure:
> Unknown macro: \{advice=Unknown macro}
> , channel=/meta/connect, id=83, error=403::Unknown client, successful=false}
> {quote}
>  
> One more thing, this log is coming from line 168 {{LOG.warn("Connect failure: 
> {}", message);}} of the 
> [https://github.com/apache/camel/blob/master/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/streaming/SubscriptionHelper.java#L168].
>  I see that there is no attempt to reconnect. If this information helps move 
> things faster...
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (CAMEL-12484) Camel-salesforce component does not try to reconnect on specific error

2018-05-04 Thread Hemang Ajmera (JIRA)
Hemang Ajmera created CAMEL-12484:
-

 Summary: Camel-salesforce component does not try to reconnect on 
specific error
 Key: CAMEL-12484
 URL: https://issues.apache.org/jira/browse/CAMEL-12484
 Project: Camel
  Issue Type: Bug
  Components: camel-salesforce
Affects Versions: 2.21.0
Reporter: Hemang Ajmera


The issue is very much identical to CAMEL-10238 where camel component does not 
try to reconnect. It was resolved for that particular case, however there is 
additional scenario where we are facing exactly similar problem.

Here is the key log message after which component stops retrying

{{2018-05-03 17:19:50.257 WARN 7636 — [nt@911561694-23] 
o.a.c.c.s.i.s.SubscriptionHelper : Connect failure: 
{clientId=3qi3g4psrtqrntt15ockewu0a59q, advice=

{reconnect=none, interval=0}

, channel=/meta/connect, id=154, error=403::Unknown client, successful=false}}}

Please note that we are getting Connect failure multiple times but it is able 
to reconnect where there is exception or when the advice is to do handshake 
again. Here are those sample which works...
 * The one with exceptions

{quote}2018-05-03 17:19:17.965  WARN 7636 — [nt@911561694-23] 
o.a.c.c.s.i.s.SubscriptionHelper : Connect failure: {failure=
Unknown macro: \{exception=java.io.EOFException}
],recv=HttpReceiverOverHTTP@144e8ebb(rsp=IDLE,failure=null)[HttpParser
Unknown macro: \{s=CLOSED,0 of -1}
]]<-DecryptedEndPoint@245db684
Unknown macro: \{telia-fi--dev.cs88.my.salesforce.com/85.222.137.144}
->HttpConnectionOverHTTP@69f41507(l:/0:0:0:0:0:0:0:1:60369 <-> 
r:telia-fi--dev.cs88.my.salesforce.com/85.222.137.144:443,closed=false)=>HttpChannelOverHTTP@3109c579(exchange=HttpExchange@76b96e24
 req=TERMINATED/null@null 
res=PENDING/null@null)[send=HttpSenderOverHTTP@5d6efa04(req=QUEUED,snd=COMPLETED,failure=null)[HttpGenerator@43ac2f18
Unknown macro: \{s=START}
],recv=HttpReceiverOverHTTP@144e8ebb(rsp=IDLE,failure=null)[HttpParser

]]->SocketChannelEndPoint@6b93b346
Unknown macro: \{telia-fi--dev.cs88.my.salesforce.com/85.222.137.144}
Unknown macro: \{io=0/0,kio=0,kro=1}
 
->SslConnection@53bc7193\{NEED_WRAP,eio=-1/-1,di=-1}=>HttpConnectionOverHTTP@69f41507(l:/0:0:0:0:0:0:0:1:60369
 <-> 
r:telia-fi--dev.cs88.my.salesforce.com/85.222.137.144:443,closed=false)=>HttpChannelOverHTTP@3109c579(exchange=HttpExchange@76b96e24
 req=TERMINATED/null@null 
res=PENDING/null@null)[send=HttpSenderOverHTTP@5d6efa04(req=QUEUED,snd=COMPLETED,failure=null)[HttpGenerator@43ac2f18
Unknown macro: \{s=START}
],recv=HttpReceiverOverHTTP@144e8ebb(rsp=IDLE,failure=null)[HttpParser
Unknown macro: \{s=CLOSED,0 of -1}
]], message=\{clientId=3qi3g4psrtqrntt15ockewu0a59q, channel=/meta/connect, 
id=153, connectionType=long-polling}, connectionType=long-polling}, 
channel=/meta/connect, id=153, successful=false}
{quote}
 
 * The one with advice for new handshake

{quote}2018-05-03 16:31:08.970  WARN 7636 — [nt@911561694-21] 
o.a.c.c.s.i.s.SubscriptionHelper : Connect failure:
Unknown macro: \{advice=Unknown macro}
, channel=/meta/connect, id=83, error=403::Unknown client, successful=false}
{quote}
 

One more thing, this log is coming from line 168 {{LOG.warn("Connect failure: 
{}", message);}} of the 
[https://github.com/apache/camel/blob/master/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/streaming/SubscriptionHelper.java#L168].
 I see that there is no attempt to reconnect. If this information helps move 
things faster...

 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12350) Camel Salesforce Component Test fails

2018-03-20 Thread Hemang Ajmera (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-12350?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16405913#comment-16405913
 ] 

Hemang Ajmera commented on CAMEL-12350:
---

JSONAssert is good alternative. Thanks. Happened to look at 
https://github.com/skyscreamer/JSONassert/issues/99. Please have a look at 
related issues. I am not sure if that would have any side effect to overall 
camel project.

> Camel Salesforce Component Test fails
> -
>
> Key: CAMEL-12350
> URL: https://issues.apache.org/jira/browse/CAMEL-12350
> Project: Camel
>  Issue Type: Test
>  Components: camel-salesforce
>Affects Versions: 2.20.2
>Reporter: Hemang Ajmera
>Assignee: Zoran Regvart
>Priority: Minor
>
> Current code fails when we run {code}mvn install{code}.
> Here is the error which it give.
> {code}
> Tests run: 3, Failures: 3, Errors: 0, Skipped: 0, Time elapsed: 0.212 s <<< 
> FAILURE! - in 
> org.apache.camel.component.salesforce.api.dto.composite.SObjectCompositeTest
> shouldSerializeToJson(org.apache.camel.component.salesforce.api.dto.composite.SObjectCompositeTest)
>   Time elapsed: 0.078 s  <<< FAILURE!
> org.junit.ComparisonFailure: 
> [Should serialize as expected by Salesforce] expected:<"{[
>   "allOrNone" : true,
>   "compositeRequest" : [ {
> "method" : "PATCH",
> "url" : "/services/data/v38.0/sobjects/Account/001xx03DIpcAAG",
> "referenceId" : "UpdatedAccount",
> "body" : {
>   "Name" : "Salesforce",
>   "BillingStreet" : "Landmark @ 1 Market Street",
>   "BillingCity" : "San Francisco",
>   "BillingState" : "California",
>   "Industry" : "Technology"
> }
>   }, {
> "method" : "POST",
> "url" : "/services/data/v38.0/sobjects/Contact/",
> "referenceId" : "NewContact",
> "body" : {
>   "LastName" : "John Doe",
>   "Phone" : "1234567890"
> }
>   }, {
> "method" : "POST",
> "url" : "/services/data/v38.0/sobjects/null/",
> "referenceId" : "JunctionRecord",
> "body" : {
>   "account__c" : "001xx03DIpcAAG",
>   "contactId__c" : "@{NewContact.id}"
> }
>   } ]]
> }"> but was:<"{[
>   "allOrNone" : true,
>   "compositeRequest" : [ {
> "method" : "PATCH",
> "url" : "/services/data/v38.0/sobjects/Account/001xx03DIpcAAG",
> "referenceId" : "UpdatedAccount",
> "body" : {
>   "Name" : "Salesforce",
>   "BillingStreet" : "Landmark @ 1 Market Street",
>   "BillingCity" : "San Francisco",
>   "BillingState" : "California",
>   "Industry" : "Technology"
> }
>   }, {
> "method" : "POST",
> "url" : "/services/data/v38.0/sobjects/Contact/",
> "referenceId" : "NewContact",
> "body" : {
>   "LastName" : "John Doe",
>   "Phone" : "1234567890"
> }
>   }, {
> "method" : "POST",
> "url" : "/services/data/v38.0/sobjects/null/",
> "referenceId" : "JunctionRecord",
> "body" : {
>   "account__c" : "001xx03DIpcAAG",
>   "contactId__c" : "@{NewContact.id}"
> }
>   } ]
> ]
> }">
>   at 
> org.apache.camel.component.salesforce.api.dto.composite.SObjectCompositeTest.shouldSerializeToJson(SObjectCompositeTest.java:117)
> shouldSerializeToJson(org.apache.camel.component.salesforce.api.dto.composite.SObjectCompositeTest)
>   Time elapsed: 0.082 s  <<< FAILURE!
> org.junit.ComparisonFailure: 
> [Should serialize as expected by Salesforce] expected:<"{[
>   "allOrNone" : true,
>   "compositeRequest" : [ {
> "method" : "PATCH",
> "url" : "/services/data/v38.0/sobjects/Account/001xx03DIpcAAG",
> "referenceId" : "UpdatedAccount",
> "body" : {
>   "Name" : "Salesforce",
>   "BillingStreet" : "Landmark @ 1 Market Street",
>   "BillingCity" : "San Francisco",
>   "BillingState" : "California",
>   "Industry" : "Technology"
> }
>   }, {
> "method" : "POST",
> "url" : "/services/data/v38.0/sobjects/Contact/",
> "referenceId" : "NewContact",
> "body" : {
>   "LastName" : "John Doe",
>   "Phone" : "1234567890"
> }
>   }, {
> "method" : "POST",
> "url" : "/services/data/v38.0/sobjects/null/",
> "referenceId" : "JunctionRecord",
> "body" : {
>   "account__c" : "001xx03DIpcAAG",
>   "contactId__c" : "@{NewContact.id}"
> }
>   } ]]
> }"> but was:<"{[
>   "allOrNone" : true,
>   "compositeRequest" : [ {
> "method" : "PATCH",
> "url" : "/services/data/v38.0/sobjects/Account/001xx03DIpcAAG",
> "referenceId" : "UpdatedAccount",
> "body" : {
>   "Name" : "Salesforce",
>   "BillingStreet" : "Landmark @ 1 Market Street",
>   "BillingCity" : "San Francisco",
>   "BillingState" : "California",
>   "Industry" : "Technology"
> }
>   }, {
> "method" : "POST",
> "url" : "/services/data/v38.0/sobjects/Contact/",
> 

[jira] [Updated] (CAMEL-12334) Salesforce DTO does not use correct datatype for "date" and "time" field

2018-03-15 Thread Hemang Ajmera (JIRA)

 [ 
https://issues.apache.org/jira/browse/CAMEL-12334?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Hemang Ajmera updated CAMEL-12334:
--
Issue Type: Bug  (was: Improvement)

> Salesforce DTO does not use correct datatype for "date" and "time" field
> 
>
> Key: CAMEL-12334
> URL: https://issues.apache.org/jira/browse/CAMEL-12334
> Project: Camel
>  Issue Type: Bug
>  Components: camel-salesforce
>Affects Versions: 2.20.2
>Reporter: Hemang Ajmera
>Priority: Major
>  Labels: maven
>
> The DTO classes generated by the Maven plugin uses ZonedDateTime for all three
>  * datetime
>  * date
>  * time
> The generation works fine, but is is not able to marshal/unmarshal correctly.
> The DTO should use different kind of field. My suggestion is to use
>  * ZonedDateTime for datetime
>  * LocalDate for date
>  * LocalTime for time
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-7413) camel-salesforce-maven-plugin should allow to use a custom login URL

2018-03-14 Thread Hemang Ajmera (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-7413?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16398643#comment-16398643
 ] 

Hemang Ajmera commented on CAMEL-7413:
--

The camelSalesforce.loginUrl is working in version 2.20.2. Should this be 
resolved?

> camel-salesforce-maven-plugin should allow to use a custom login URL
> 
>
> Key: CAMEL-7413
> URL: https://issues.apache.org/jira/browse/CAMEL-7413
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-salesforce
>Reporter: Jean-Baptiste Onofré
>Priority: Minor
> Fix For: Future
>
> Attachments: camel-salesforce-patches-Aug8_2014.txt
>
>
> Right now, the maven-camel-salesforce-plugin is only able to use the default 
> Salesforce login URL defined in the SalesforceLoginConfig class.
> When using test platform, it would be great to be able to provide a "custom" 
> login URL.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12350) Camel Salesforce Component Test fails

2018-03-14 Thread Hemang Ajmera (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-12350?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16398290#comment-16398290
 ] 

Hemang Ajmera commented on CAMEL-12350:
---

If I comment out that particular test 
(org.apache.camel.component.salesforce.api.dto.composite.SObjectCompositeTest.shouldSerializeToJson(org.apache.camel.component.salesforce.api.dto.composite.SObjectCompositeTest))
 in code base and then, I am able to run mvn install without any issues.



> Camel Salesforce Component Test fails
> -
>
> Key: CAMEL-12350
> URL: https://issues.apache.org/jira/browse/CAMEL-12350
> Project: Camel
>  Issue Type: Test
>  Components: camel-salesforce
>Affects Versions: 2.20.2
>Reporter: Hemang Ajmera
>Priority: Minor
>
> Current code fails when we run {code}mvn install{code}.
> Here is the error which it give.
> {code}
> Tests run: 3, Failures: 3, Errors: 0, Skipped: 0, Time elapsed: 0.212 s <<< 
> FAILURE! - in 
> org.apache.camel.component.salesforce.api.dto.composite.SObjectCompositeTest
> shouldSerializeToJson(org.apache.camel.component.salesforce.api.dto.composite.SObjectCompositeTest)
>   Time elapsed: 0.078 s  <<< FAILURE!
> org.junit.ComparisonFailure: 
> [Should serialize as expected by Salesforce] expected:<"{[
>   "allOrNone" : true,
>   "compositeRequest" : [ {
> "method" : "PATCH",
> "url" : "/services/data/v38.0/sobjects/Account/001xx03DIpcAAG",
> "referenceId" : "UpdatedAccount",
> "body" : {
>   "Name" : "Salesforce",
>   "BillingStreet" : "Landmark @ 1 Market Street",
>   "BillingCity" : "San Francisco",
>   "BillingState" : "California",
>   "Industry" : "Technology"
> }
>   }, {
> "method" : "POST",
> "url" : "/services/data/v38.0/sobjects/Contact/",
> "referenceId" : "NewContact",
> "body" : {
>   "LastName" : "John Doe",
>   "Phone" : "1234567890"
> }
>   }, {
> "method" : "POST",
> "url" : "/services/data/v38.0/sobjects/null/",
> "referenceId" : "JunctionRecord",
> "body" : {
>   "account__c" : "001xx03DIpcAAG",
>   "contactId__c" : "@{NewContact.id}"
> }
>   } ]]
> }"> but was:<"{[
>   "allOrNone" : true,
>   "compositeRequest" : [ {
> "method" : "PATCH",
> "url" : "/services/data/v38.0/sobjects/Account/001xx03DIpcAAG",
> "referenceId" : "UpdatedAccount",
> "body" : {
>   "Name" : "Salesforce",
>   "BillingStreet" : "Landmark @ 1 Market Street",
>   "BillingCity" : "San Francisco",
>   "BillingState" : "California",
>   "Industry" : "Technology"
> }
>   }, {
> "method" : "POST",
> "url" : "/services/data/v38.0/sobjects/Contact/",
> "referenceId" : "NewContact",
> "body" : {
>   "LastName" : "John Doe",
>   "Phone" : "1234567890"
> }
>   }, {
> "method" : "POST",
> "url" : "/services/data/v38.0/sobjects/null/",
> "referenceId" : "JunctionRecord",
> "body" : {
>   "account__c" : "001xx03DIpcAAG",
>   "contactId__c" : "@{NewContact.id}"
> }
>   } ]
> ]
> }">
>   at 
> org.apache.camel.component.salesforce.api.dto.composite.SObjectCompositeTest.shouldSerializeToJson(SObjectCompositeTest.java:117)
> shouldSerializeToJson(org.apache.camel.component.salesforce.api.dto.composite.SObjectCompositeTest)
>   Time elapsed: 0.082 s  <<< FAILURE!
> org.junit.ComparisonFailure: 
> [Should serialize as expected by Salesforce] expected:<"{[
>   "allOrNone" : true,
>   "compositeRequest" : [ {
> "method" : "PATCH",
> "url" : "/services/data/v38.0/sobjects/Account/001xx03DIpcAAG",
> "referenceId" : "UpdatedAccount",
> "body" : {
>   "Name" : "Salesforce",
>   "BillingStreet" : "Landmark @ 1 Market Street",
>   "BillingCity" : "San Francisco",
>   "BillingState" : "California",
>   "Industry" : "Technology"
> }
>   }, {
> "method" : "POST",
> "url" : "/services/data/v38.0/sobjects/Contact/",
> "referenceId" : "NewContact",
> "body" : {
>   "LastName" : "John Doe",
>   "Phone" : "1234567890"
> }
>   }, {
> "method" : "POST",
> "url" : "/services/data/v38.0/sobjects/null/",
> "referenceId" : "JunctionRecord",
> "body" : {
>   "account__c" : "001xx03DIpcAAG",
>   "contactId__c" : "@{NewContact.id}"
> }
>   } ]]
> }"> but was:<"{[
>   "allOrNone" : true,
>   "compositeRequest" : [ {
> "method" : "PATCH",
> "url" : "/services/data/v38.0/sobjects/Account/001xx03DIpcAAG",
> "referenceId" : "UpdatedAccount",
> "body" : {
>   "Name" : "Salesforce",
>   "BillingStreet" : "Landmark @ 1 Market Street",
>   "BillingCity" : "San Francisco",
>   "BillingState" : "California",
>   "Industry" : "Technology"
> }
>   }, {
> "method" : "POST",
> "url" : 

[jira] [Created] (CAMEL-12350) Camel Salesforce Component Test fails

2018-03-14 Thread Hemang Ajmera (JIRA)
Hemang Ajmera created CAMEL-12350:
-

 Summary: Camel Salesforce Component Test fails
 Key: CAMEL-12350
 URL: https://issues.apache.org/jira/browse/CAMEL-12350
 Project: Camel
  Issue Type: Test
  Components: camel-salesforce
Affects Versions: 2.20.2
Reporter: Hemang Ajmera


Current code fails when we run {code}mvn install{code}.

Here is the error which it give.

{code}
Tests run: 3, Failures: 3, Errors: 0, Skipped: 0, Time elapsed: 0.212 s <<< 
FAILURE! - in 
org.apache.camel.component.salesforce.api.dto.composite.SObjectCompositeTest
shouldSerializeToJson(org.apache.camel.component.salesforce.api.dto.composite.SObjectCompositeTest)
  Time elapsed: 0.078 s  <<< FAILURE!
org.junit.ComparisonFailure: 
[Should serialize as expected by Salesforce] expected:<"{[
  "allOrNone" : true,
  "compositeRequest" : [ {
"method" : "PATCH",
"url" : "/services/data/v38.0/sobjects/Account/001xx03DIpcAAG",
"referenceId" : "UpdatedAccount",
"body" : {
  "Name" : "Salesforce",
  "BillingStreet" : "Landmark @ 1 Market Street",
  "BillingCity" : "San Francisco",
  "BillingState" : "California",
  "Industry" : "Technology"
}
  }, {
"method" : "POST",
"url" : "/services/data/v38.0/sobjects/Contact/",
"referenceId" : "NewContact",
"body" : {
  "LastName" : "John Doe",
  "Phone" : "1234567890"
}
  }, {
"method" : "POST",
"url" : "/services/data/v38.0/sobjects/null/",
"referenceId" : "JunctionRecord",
"body" : {
  "account__c" : "001xx03DIpcAAG",
  "contactId__c" : "@{NewContact.id}"
}
  } ]]
}"> but was:<"{[
  "allOrNone" : true,
  "compositeRequest" : [ {
"method" : "PATCH",
"url" : "/services/data/v38.0/sobjects/Account/001xx03DIpcAAG",
"referenceId" : "UpdatedAccount",
"body" : {
  "Name" : "Salesforce",
  "BillingStreet" : "Landmark @ 1 Market Street",
  "BillingCity" : "San Francisco",
  "BillingState" : "California",
  "Industry" : "Technology"
}
  }, {
"method" : "POST",
"url" : "/services/data/v38.0/sobjects/Contact/",
"referenceId" : "NewContact",
"body" : {
  "LastName" : "John Doe",
  "Phone" : "1234567890"
}
  }, {
"method" : "POST",
"url" : "/services/data/v38.0/sobjects/null/",
"referenceId" : "JunctionRecord",
"body" : {
  "account__c" : "001xx03DIpcAAG",
  "contactId__c" : "@{NewContact.id}"
}
  } ]
]
}">
at 
org.apache.camel.component.salesforce.api.dto.composite.SObjectCompositeTest.shouldSerializeToJson(SObjectCompositeTest.java:117)

shouldSerializeToJson(org.apache.camel.component.salesforce.api.dto.composite.SObjectCompositeTest)
  Time elapsed: 0.082 s  <<< FAILURE!
org.junit.ComparisonFailure: 
[Should serialize as expected by Salesforce] expected:<"{[
  "allOrNone" : true,
  "compositeRequest" : [ {
"method" : "PATCH",
"url" : "/services/data/v38.0/sobjects/Account/001xx03DIpcAAG",
"referenceId" : "UpdatedAccount",
"body" : {
  "Name" : "Salesforce",
  "BillingStreet" : "Landmark @ 1 Market Street",
  "BillingCity" : "San Francisco",
  "BillingState" : "California",
  "Industry" : "Technology"
}
  }, {
"method" : "POST",
"url" : "/services/data/v38.0/sobjects/Contact/",
"referenceId" : "NewContact",
"body" : {
  "LastName" : "John Doe",
  "Phone" : "1234567890"
}
  }, {
"method" : "POST",
"url" : "/services/data/v38.0/sobjects/null/",
"referenceId" : "JunctionRecord",
"body" : {
  "account__c" : "001xx03DIpcAAG",
  "contactId__c" : "@{NewContact.id}"
}
  } ]]
}"> but was:<"{[
  "allOrNone" : true,
  "compositeRequest" : [ {
"method" : "PATCH",
"url" : "/services/data/v38.0/sobjects/Account/001xx03DIpcAAG",
"referenceId" : "UpdatedAccount",
"body" : {
  "Name" : "Salesforce",
  "BillingStreet" : "Landmark @ 1 Market Street",
  "BillingCity" : "San Francisco",
  "BillingState" : "California",
  "Industry" : "Technology"
}
  }, {
"method" : "POST",
"url" : "/services/data/v38.0/sobjects/Contact/",
"referenceId" : "NewContact",
"body" : {
  "LastName" : "John Doe",
  "Phone" : "1234567890"
}
  }, {
"method" : "POST",
"url" : "/services/data/v38.0/sobjects/null/",
"referenceId" : "JunctionRecord",
"body" : {
  "account__c" : "001xx03DIpcAAG",
  "contactId__c" : "@{NewContact.id}"
}
  } ]
]
}">
at 
org.apache.camel.component.salesforce.api.dto.composite.SObjectCompositeTest.shouldSerializeToJson(SObjectCompositeTest.java:117)

shouldSerializeToJson(org.apache.camel.component.salesforce.api.dto.composite.SObjectCompositeTest)
  Time elapsed: 0.038 s  <<< FAILURE!
org.junit.ComparisonFailure: 
[Should serialize as expected by Salesforce] expected:<"{[
  "allOrNone" : 

[jira] [Commented] (CAMEL-12334) Salesforce DTO does not use correct datatype for "date" and "time" field

2018-03-14 Thread Hemang Ajmera (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-12334?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16398278#comment-16398278
 ] 

Hemang Ajmera commented on CAMEL-12334:
---

Please change this to bug. With camel version 2.20.2, if there is date or time 
in datamodel, we get error. Here is the below error stack which I am getting

 
{code}
2018-03-14 14:15:58.867 ERROR 4920 --- [t@1270383967-22] 
o.a.camel.processor.DefaultErrorHandler  : Failed delivery for (MessageId: 
ID-INL-3HWR6C2-1521016907071-0-2 on ExchangeId: 
ID-INL-3HWR6C2-1521016907071-0-1). Exhausted after delivery attempt: 1 caught: 
org.apache.camel.component.salesforce.api.SalesforceException: Error parsing 
XML response: Error reading ZonedDateTime from value 2017-03-14: Text 
'2017-03-14' could not be parsed at index 10
 Debugging information 
message : Error reading ZonedDateTime from value 2017-03-14: Text 
'2017-03-14' could not be parsed at index 10
cause-exception : java.time.format.DateTimeParseException
cause-message   : Text '2017-03-14' could not be parsed at index 10
class   : java.time.ZonedDateTime
required-type   : java.time.ZonedDateTime
converter-type  : 
org.apache.camel.component.salesforce.api.utils.DateTimeConverter
line number : 1
class[1]: org.apache.camel.salesforce.dto.Contact
converter-type[1]   : 
com.thoughtworks.xstream.converters.reflection.ReflectionConverter
version : 1.4.10
---

Message History
---
RouteId  ProcessorId  Processor 
   Elapsed (ms)
[route1] [route1] 
[salesforce://ContactUpdates?apiVersion=41.0=-2   
] [  6402]
[route1] [log1  ] [log  
 ] [16]
[route1] [toD1  ] [ 
 ] [  6379]

Stacktrace
---

org.apache.camel.component.salesforce.api.SalesforceException: Error parsing 
XML response: Error reading ZonedDateTime from value 2017-03-14: Text 
'2017-03-14' could not be parsed at index 10
 Debugging information 
message : Error reading ZonedDateTime from value 2017-03-14: Text 
'2017-03-14' could not be parsed at index 10
cause-exception : java.time.format.DateTimeParseException
cause-message   : Text '2017-03-14' could not be parsed at index 10
class   : java.time.ZonedDateTime
required-type   : java.time.ZonedDateTime
converter-type  : 
org.apache.camel.component.salesforce.api.utils.DateTimeConverter
line number : 1
class[1]: org.apache.camel.salesforce.dto.Contact
converter-type[1]   : 
com.thoughtworks.xstream.converters.reflection.ReflectionConverter
version : 1.4.10
---
at 
org.apache.camel.component.salesforce.internal.processor.XmlRestProcessor.processResponse(XmlRestProcessor.java:267)
 ~[camel-salesforce-2.20.2.jar:2.20.2]
at 
org.apache.camel.component.salesforce.internal.processor.AbstractRestProcessor$6.onResponse(AbstractRestProcessor.java:381)
 ~[camel-salesforce-2.20.2.jar:2.20.2]
at 
org.apache.camel.component.salesforce.internal.client.DefaultRestClient$DelegatingClientCallback.onResponse(DefaultRestClient.java:503)
 ~[camel-salesforce-2.20.2.jar:2.20.2]
at 
org.apache.camel.component.salesforce.internal.client.AbstractClientBase$1.onComplete(AbstractClientBase.java:218)
 ~[camel-salesforce-2.20.2.jar:2.20.2]
at 
org.eclipse.jetty.client.ResponseNotifier.notifyComplete(ResponseNotifier.java:193)
 ~[jetty-client-9.4.8.v20171121.jar:9.4.8.v20171121]
at 
org.eclipse.jetty.client.ResponseNotifier.notifyComplete(ResponseNotifier.java:185)
 ~[jetty-client-9.4.8.v20171121.jar:9.4.8.v20171121]
at 
org.eclipse.jetty.client.HttpReceiver.terminateResponse(HttpReceiver.java:459) 
~[jetty-client-9.4.8.v20171121.jar:9.4.8.v20171121]
at 
org.eclipse.jetty.client.HttpReceiver.responseSuccess(HttpReceiver.java:405) 
~[jetty-client-9.4.8.v20171121.jar:9.4.8.v20171121]
at 
org.eclipse.jetty.client.http.HttpReceiverOverHTTP.messageComplete(HttpReceiverOverHTTP.java:298)
 ~[jetty-client-9.4.8.v20171121.jar:9.4.8.v20171121]
at org.eclipse.jetty.http.HttpParser.parseFields(HttpParser.java:1068) 
~[jetty-http-9.4.8.v20171121.jar:9.4.8.v20171121]
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:1390) 

[jira] [Created] (CAMEL-12334) Salesforce DTO does not use correct datatype for "date" and "time" field

2018-03-07 Thread Hemang Ajmera (JIRA)
Hemang Ajmera created CAMEL-12334:
-

 Summary: Salesforce DTO does not use correct datatype for "date" 
and "time" field
 Key: CAMEL-12334
 URL: https://issues.apache.org/jira/browse/CAMEL-12334
 Project: Camel
  Issue Type: Bug
  Components: camel-salesforce
Affects Versions: 2.20.2
Reporter: Hemang Ajmera


The DTO classes generated by the Maven plugin uses ZonedDateTime for all three
 * datetime
 * date
 * time

The generation works fine, but is is not able to marshal/unmarshal correctly.

The DTO should use different kind of field. My suggestion is to use
 * ZonedDateTime for datetime
 * LocalDate for date
 * LocalTime for time

 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)