[jira] [Comment Edited] (CAMEL-12331) camel-sql - JdbcMessageIdRepository should have a background task to delete old entries

2018-03-14 Thread Neo Xu (JIRA)

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

Neo Xu edited comment on CAMEL-12331 at 3/15/18 2:10 AM:
-

Can it compare Unix time? for example 

 
{code:java}

SELECT UNIX_TIMESTAMP(cdate) AS unixDate, * FROM mytable where unixDate < 
9008xx

{code}
 


was (Author: neoxu999):
Can it compare Unix time? for example 

{{{code}}}

{{SELECT UNIX_TIMESTAMP(cdate) AS unixDate, * FROM mytable where unixDate < 
9008xx}}

{{{code}}}

> camel-sql - JdbcMessageIdRepository should have a background task to delete 
> old entries
> ---
>
> Key: CAMEL-12331
> URL: https://issues.apache.org/jira/browse/CAMEL-12331
> Project: Camel
>  Issue Type: New Feature
>  Components: camel-sql
>Reporter: Claus Ibsen
>Priority: Major
> Fix For: 2.22.0
>
>
> You may want to cleanup the database table automatically by Camel so it does 
> not contain old data of previous processed files.
> For example to say that entries that are > 24h can be deleted etc. 
> This works under the notion that you only use the idempoten check for 
> clustering where they may race for processing the same files, or that files 
> tomorrow are okay to process with the same name as yesterday etc.



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


[jira] [Commented] (CAMEL-12331) camel-sql - JdbcMessageIdRepository should have a background task to delete old entries

2018-03-14 Thread Neo Xu (JIRA)

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

Neo Xu commented on CAMEL-12331:


Can it compare Unix time? for example 

{{{code}}}

{{SELECT UNIX_TIMESTAMP(cdate) AS unixDate, * FROM mytable where unixDate < 
9008xx}}

{{{code}}}

> camel-sql - JdbcMessageIdRepository should have a background task to delete 
> old entries
> ---
>
> Key: CAMEL-12331
> URL: https://issues.apache.org/jira/browse/CAMEL-12331
> Project: Camel
>  Issue Type: New Feature
>  Components: camel-sql
>Reporter: Claus Ibsen
>Priority: Major
> Fix For: 2.22.0
>
>
> You may want to cleanup the database table automatically by Camel so it does 
> not contain old data of previous processed files.
> For example to say that entries that are > 24h can be deleted etc. 
> This works under the notion that you only use the idempoten check for 
> clustering where they may race for processing the same files, or that files 
> tomorrow are okay to process with the same name as yesterday etc.



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


[jira] [Comment Edited] (CAMEL-12345) LinkedIn component throws IllegalArgumentException on API requests

2018-03-14 Thread Neo Xu (JIRA)

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

Neo Xu edited comment on CAMEL-12345 at 3/15/18 1:56 AM:
-

[~jamesnetherton]

 

Can you please attach your testing project?  It works for me.

{code}

INFO] 
[INFO] Camel :: LinkedIn :: Parent  SUCCESS [ 2.923 s]
[INFO] Camel :: LinkedIn :: API ... SUCCESS [ 13.740 s]
[INFO] Camel :: LinkedIn :: Component . SUCCESS [ 6.515 s]
[INFO] 
[INFO] BUILD SUCCESS
[INFO] 
[INFO] Total time: 23.659 s
[INFO] Finished at: 2018-03-15T12:55:03+11:00
[INFO] Final Memory: 46M/153M

{code}


was (Author: neoxu999):
[~jamesnetherton] Can you please attach the testing project? I'd like to try to 
make a PR.

> LinkedIn component throws IllegalArgumentException on API requests
> --
>
> Key: CAMEL-12345
> URL: https://issues.apache.org/jira/browse/CAMEL-12345
> Project: Camel
>  Issue Type: Bug
>Affects Versions: 2.21.0
>Reporter: James Netherton
>Priority: Major
> Fix For: 2.21.1, 2.22.0
>
>
> Almost all of the camel-linkedin integration tests are failing on master and 
> for the 2.21.0 tag. The error is pretty much the same for all of them. For 
> example SearchResourceIntegrationTest.testSearchCompanies:
>  
> {code:java}
> Caused by: org.apache.camel.RuntimeCamelException: Error invoking 
> searchCompanies with {keywords=linkedin, fields=}: Value for fields is not 
> specified
> at 
> org.apache.camel.util.component.ApiMethodHelper.invokeMethod(ApiMethodHelper.java:514)
> at 
> org.apache.camel.util.component.AbstractApiProducer.doInvokeMethod(AbstractApiProducer.java:120)
> at 
> org.apache.camel.component.linkedin.LinkedInProducer.doInvokeMethod(LinkedInProducer.java:43)
> at 
> org.apache.camel.util.component.AbstractApiProducer$1.run(AbstractApiProducer.java:86)
> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
> at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> at java.lang.Thread.run(Thread.java:748)
> Caused by: java.lang.IllegalArgumentException: Value for fields is not 
> specified
> at 
> org.apache.cxf.jaxrs.client.AbstractClient.convertParamValue(AbstractClient.java:824)
> at 
> org.apache.cxf.jaxrs.client.ClientProxyImpl.getPathParamValues(ClientProxyImpl.java:452)
> at 
> org.apache.cxf.jaxrs.client.ClientProxyImpl.invoke(ClientProxyImpl.java:179)
> at com.sun.proxy.$Proxy54.searchCompanies(Unknown Source)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at 
> org.apache.camel.util.component.ApiMethodHelper.invokeMethod(ApiMethodHelper.java:506)
> ... 10 more{code}
>  
> I tried setting the CamelLinkedIn.fields header, but this leads to further 
> errors. The CXF 3.2.2 upgrade may be the culprit here. The tests run fine on 
> Camel 2.20.x with CXF 3.2.1.



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


[jira] [Commented] (CAMEL-12345) LinkedIn component throws IllegalArgumentException on API requests

2018-03-14 Thread Neo Xu (JIRA)

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

Neo Xu commented on CAMEL-12345:


[~jamesnetherton] Can you please attach the testing project? I'd like to try to 
make a PR.

> LinkedIn component throws IllegalArgumentException on API requests
> --
>
> Key: CAMEL-12345
> URL: https://issues.apache.org/jira/browse/CAMEL-12345
> Project: Camel
>  Issue Type: Bug
>Affects Versions: 2.21.0
>Reporter: James Netherton
>Priority: Major
> Fix For: 2.21.1, 2.22.0
>
>
> Almost all of the camel-linkedin integration tests are failing on master and 
> for the 2.21.0 tag. The error is pretty much the same for all of them. For 
> example SearchResourceIntegrationTest.testSearchCompanies:
>  
> {code:java}
> Caused by: org.apache.camel.RuntimeCamelException: Error invoking 
> searchCompanies with {keywords=linkedin, fields=}: Value for fields is not 
> specified
> at 
> org.apache.camel.util.component.ApiMethodHelper.invokeMethod(ApiMethodHelper.java:514)
> at 
> org.apache.camel.util.component.AbstractApiProducer.doInvokeMethod(AbstractApiProducer.java:120)
> at 
> org.apache.camel.component.linkedin.LinkedInProducer.doInvokeMethod(LinkedInProducer.java:43)
> at 
> org.apache.camel.util.component.AbstractApiProducer$1.run(AbstractApiProducer.java:86)
> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
> at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> at java.lang.Thread.run(Thread.java:748)
> Caused by: java.lang.IllegalArgumentException: Value for fields is not 
> specified
> at 
> org.apache.cxf.jaxrs.client.AbstractClient.convertParamValue(AbstractClient.java:824)
> at 
> org.apache.cxf.jaxrs.client.ClientProxyImpl.getPathParamValues(ClientProxyImpl.java:452)
> at 
> org.apache.cxf.jaxrs.client.ClientProxyImpl.invoke(ClientProxyImpl.java:179)
> at com.sun.proxy.$Proxy54.searchCompanies(Unknown Source)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at 
> org.apache.camel.util.component.ApiMethodHelper.invokeMethod(ApiMethodHelper.java:506)
> ... 10 more{code}
>  
> I tried setting the CamelLinkedIn.fields header, but this leads to further 
> errors. The CXF 3.2.2 upgrade may be the culprit here. The tests run fine on 
> Camel 2.20.x with CXF 3.2.1.



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


[jira] [Created] (CAMEL-12352) simple - Lookup env var should be case-insensitive

2018-03-14 Thread Claus Ibsen (JIRA)
Claus Ibsen created CAMEL-12352:
---

 Summary: simple - Lookup env var should be case-insensitive
 Key: CAMEL-12352
 URL: https://issues.apache.org/jira/browse/CAMEL-12352
 Project: Camel
  Issue Type: Improvement
  Components: camel-core
Reporter: Claus Ibsen
 Fix For: 2.22.0


We should upper-case env var text before looking it up in System.getenv as ENV 
vars are upper-case.

Today you have to do

.setBody().simple("${sysenv.FALLBACK}")

But you may type

.setBody().simple("${sysenv.fallback}")

To lookup an ENV with key FALLBACK

 

This can be implemented in the 
org.apache.camel.builder.ExpressionBuilder#systemEnvironmentExpression(java.lang.String,
 java.lang.String)

Contributions is welcome



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


[jira] [Closed] (CAMEL-12351) Camel-Kubernetes: Port Kubernetes resources support to Openshift too

2018-03-14 Thread Andrea Cosentino (JIRA)

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

Andrea Cosentino closed CAMEL-12351.

Resolution: Fixed

In this case we don't need this, since the kubernetes resources will be managed 
on openshift too. What we need is to add support for specific OS resources.

> Camel-Kubernetes: Port Kubernetes resources support to Openshift too
> 
>
> Key: CAMEL-12351
> URL: https://issues.apache.org/jira/browse/CAMEL-12351
> Project: Camel
>  Issue Type: Task
>  Components: camel-kubernetes
>Reporter: Andrea Cosentino
>Assignee: Andrea Cosentino
>Priority: Minor
> Fix For: 2.22.0
>
>
> Currently we are supporting a lot of Kubernetes resources. Maybe we need to 
> duplicate these components for Openshift too, and have component like 
> "kubernetes-pods" and "openshift-pods", to divide the concepts a bit.



--
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-12351) Camel-Kubernetes: Port Kubernetes resources support to Openshift too

2018-03-14 Thread Andrea Cosentino (JIRA)

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

Andrea Cosentino commented on CAMEL-12351:
--

Probably it will be enough to add an option openshiftPlatform to adapt the 
client in case we are using Openshift.

> Camel-Kubernetes: Port Kubernetes resources support to Openshift too
> 
>
> Key: CAMEL-12351
> URL: https://issues.apache.org/jira/browse/CAMEL-12351
> Project: Camel
>  Issue Type: Task
>  Components: camel-kubernetes
>Reporter: Andrea Cosentino
>Assignee: Andrea Cosentino
>Priority: Minor
> Fix For: 2.22.0
>
>
> Currently we are supporting a lot of Kubernetes resources. Maybe we need to 
> duplicate these components for Openshift too, and have component like 
> "kubernetes-pods" and "openshift-pods", to divide the concepts a bit.



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


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

2018-03-14 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CAMEL-12334:


hemangajmera commented on issue #2254: CAMEL-12334: Mapped date to LocalDate 
and time to LocalTime
URL: https://github.com/apache/camel/pull/2254#issuecomment-373007729
 
 
   @zregvart Thanks for your feedback..
   
   We are using ZonedDateTime, so DateTime is not an issue.
   
   Time can be converted to OffsetTime, so that conversion to localTime can be 
handled properly.
   
   Regarding Date, I think it should be still LocalTime, since most of the 
Business UseCases which I have seen, date should be date only. Common example 
of dates are BirthDate, etc, where time is not significant, or should not be 
considered. Let me know your thought,


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> 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: Improvement
>  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] [Created] (CAMEL-12351) Camel-Kubernetes: Port Kubernetes resources support to Openshift too

2018-03-14 Thread Andrea Cosentino (JIRA)
Andrea Cosentino created CAMEL-12351:


 Summary: Camel-Kubernetes: Port Kubernetes resources support to 
Openshift too
 Key: CAMEL-12351
 URL: https://issues.apache.org/jira/browse/CAMEL-12351
 Project: Camel
  Issue Type: Task
  Components: camel-kubernetes
Reporter: Andrea Cosentino
Assignee: Andrea Cosentino
 Fix For: 2.22.0


Currently we are supporting a lot of Kubernetes resources. Maybe we need to 
duplicate these components for Openshift too, and have component like 
"kubernetes-pods" and "openshift-pods", to divide the concepts a bit.



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


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

2018-03-14 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CAMEL-12334:


zregvart commented on issue #2254: CAMEL-12334: Mapped date to LocalDate and 
time to LocalTime
URL: https://github.com/apache/camel/pull/2254#issuecomment-372996229
 
 
   @hemangajmera thank you for clarifying this, I think we should address this 
issue so we can parse given dates properly. What do you think, given that 
Salesforce documentation specifies that `date` and `dateTime` primitive data 
types will be returned in UTC timezone, should we make sure that when parsing 
those they are converted to the proper local timezone when mapped to LocalDate 
and LocalDateTime?


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> 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: Improvement
>  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-12334) Salesforce DTO does not use correct datatype for "date" and "time" field

2018-03-14 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CAMEL-12334:


hemangajmera commented on issue #2254: CAMEL-12334: Mapped date to LocalDate 
and time to LocalTime
URL: https://github.com/apache/camel/pull/2254#issuecomment-372987157
 
 
   I am not seasoned java developer. I copied the existing code for DateTime to 
make is work for Date and Time since I got error. So please excuse me if some 
of my comment doesnt make full sense, since I am not used to most of the 
libraries and framework used.
   
   1. Regarding use of Jackson Modules. I think that will be better and it may 
clean up lot of unwanted code which is written. But for XStream, do we still 
need to have our custom code.
   
   2. Salesforce returns only date without timezone, for eg. "2017-02-17". 
While receiving data from salesforce and sending it back to salesforce we need 
to use only date and time in UTC timezone 
(https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/primitive_data_types.htm)
   Also there was no suitable class for Date with timezone in java.time 
package, hence I used LocalDate and LocalTime. I could have use OffsetTime, but 
kept it identical.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> 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: Improvement
>  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-12334) Salesforce DTO does not use correct datatype for "date" and "time" field

2018-03-14 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CAMEL-12334:


zregvart commented on issue #2254: CAMEL-12334: Mapped date to LocalDate and 
time to LocalTime
URL: https://github.com/apache/camel/pull/2254#issuecomment-372975538
 
 
   Thanks for your contribution :100:
   
   I wonder if it would make more sense to use 
https://github.com/FasterXML/jackson-modules-java8 module instead of custom 
converters for `java.time` types.
   
   I also wonder if we want to encourage the use of date/time without timezone 
information, could lead to subtle bugs.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> 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: Improvement
>  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-10328) Enhance Slack component to support attachments in webhooks

2018-03-14 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CAMEL-10328:


oscerd commented on issue #1178: CAMEL-10328 : Support for attachments in Slack 
incoming web hooks
URL: https://github.com/apache/camel/pull/1178#issuecomment-372975157
 
 
   The original commit is this one 
https://github.com/apache/camel/commit/67386c9b31f8f7f865f3dd1e640ee0026010b3e1


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Enhance Slack component to support attachments in webhooks
> --
>
> Key: CAMEL-10328
> URL: https://issues.apache.org/jira/browse/CAMEL-10328
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-slack
>Affects Versions: 2.18.0
>Reporter: Siddharth Sharma
>Assignee: Claus Ibsen
>Priority: Minor
> Fix For: 2.18.0
>
>
> Current camel-slack component http://camel.apache.org/slack.html doesn't 
> support attachments in incoming webhooks
> Slack API : 
> https://api.slack.com/docs/message-attachments
> Added support for attachments to be sent as part of incoming web hooks to 
> Slack



--
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] [Commented] (CAMEL-12334) Salesforce DTO does not use correct datatype for "date" and "time" field

2018-03-14 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CAMEL-12334:


hemangajmera opened a new pull request #2254: CAMEL-12334: Mapped date to 
LocalDate and time to LocalTime
URL: https://github.com/apache/camel/pull/2254
 
 
   All the changed needed are included.
   
   Please review it carefully as it is my first commit  and PR to camel source.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> 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: Improvement
>  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-12334) Salesforce DTO does not use correct datatype for "date" and "time" field

2018-03-14 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CAMEL-12334:


GitHub user hemangajmera opened a pull request:

https://github.com/apache/camel/pull/2254

CAMEL-12334: Mapped date to LocalDate and time to LocalTime

All the changed needed are included.

Please review it carefully as it is my first commit  and PR to camel source.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/hemangajmera/camel 
CAMEL-12334-Salesforce-DTO-date-and-time

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/camel/pull/2254.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #2254


commit 63980701f821f9530bc2c446bd75ae29b09551bb
Author: Ajmera, Hemang /External 
Date:   2018-03-14T07:25:32Z

CAMEL-12334: Mapped date to LocalDate and time to LocalTime




> 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: Improvement
>  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)