[jira] [Resolved] (CAMEL-12226) Change HAPI version from 2.2 to 2.3

2018-02-02 Thread Quinn Stevenson (JIRA)

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

Quinn Stevenson resolved CAMEL-12226.
-
   Resolution: Fixed
Fix Version/s: 2.21.0

Update parent POM in commit cdcaa6a7bd17e6b4384c6846c5315a8be6a6ba2f

> Change HAPI version from 2.2 to 2.3
> ---
>
> Key: CAMEL-12226
> URL: https://issues.apache.org/jira/browse/CAMEL-12226
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-hl7
>Reporter: Quinn Stevenson
>Assignee: Quinn Stevenson
>Priority: Minor
> Fix For: 2.21.0
>
>




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


[jira] [Work started] (CAMEL-12226) Change HAPI version from 2.2 to 2.3

2018-02-02 Thread Quinn Stevenson (JIRA)

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

Work on CAMEL-12226 started by Quinn Stevenson.
---
> Change HAPI version from 2.2 to 2.3
> ---
>
> Key: CAMEL-12226
> URL: https://issues.apache.org/jira/browse/CAMEL-12226
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-hl7
>Reporter: Quinn Stevenson
>Assignee: Quinn Stevenson
>Priority: Minor
>




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


[jira] [Created] (CAMEL-12226) Change HAPI version from 2.2 to 2.3

2018-02-02 Thread Quinn Stevenson (JIRA)
Quinn Stevenson created CAMEL-12226:
---

 Summary: Change HAPI version from 2.2 to 2.3
 Key: CAMEL-12226
 URL: https://issues.apache.org/jira/browse/CAMEL-12226
 Project: Camel
  Issue Type: Improvement
  Components: camel-hl7
Reporter: Quinn Stevenson
Assignee: Quinn Stevenson






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


[jira] [Resolved] (CAMEL-12225) Documentation - Should include a link id in top of file

2018-02-02 Thread Claus Ibsen (JIRA)

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

Claus Ibsen resolved CAMEL-12225.
-
Resolution: Fixed

> Documentation - Should include a link id in top of file
> ---
>
> Key: CAMEL-12225
> URL: https://issues.apache.org/jira/browse/CAMEL-12225
> Project: Camel
>  Issue Type: Task
>  Components: documentation
>Reporter: Claus Ibsen
>Assignee: Claus Ibsen
>Priority: Major
> Fix For: 2.21.0
>
>
> All our adoc files should include a link in the top of the file, then we can 
> build a TOC and have it link to each page.
>  
> The link should be the component id/dataformat id, etc. Which is also what we 
> use in the filename, eg ftp-component, ahc-component, jaxb-dataformat etc.



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


[jira] [Commented] (CAMEL-12176) Camel-Dropbox /search and /get are not working

2018-02-02 Thread Claus Ibsen (JIRA)

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

Claus Ibsen commented on CAMEL-12176:
-

Kamil, ah thanks.

If  you want to try you are welcome to provide this code in a github PR

[http://camel.apache.org/contributing]

If not then we can also fix it ourselves, but its a good way to learn how to  
contribute to Apache Camel if you want to try.

> Camel-Dropbox /search and /get are not working
> --
>
> Key: CAMEL-12176
> URL: https://issues.apache.org/jira/browse/CAMEL-12176
> Project: Camel
>  Issue Type: Bug
>  Components: camel-dropbox
>Affects Versions: 2.20.1
>Reporter: Kamil
>Assignee: Claus Ibsen
>Priority: Major
> Fix For: 2.20.3, 2.21.0
>
>
> First of all, 
> [documentation|https://github.com/apache/camel/blob/master/components/camel-dropbox/src/main/docs/dropbox-component.adoc]
>  states that "query" property in "search" operation is not mandatory, but:
> {code:java}
> from("direct:dropboxSearch").to("dropbox://search?remotePath=/={{dropbox.key}}"){code}
> throws:
> {code:java}
> java.lang.IllegalArgumentException: Required value for 'query' is null
>  at com.dropbox.core.v2.files.SearchArg.(SearchArg.java:59) 
> ~[dropbox-core-sdk-3.0.4.jar:na]
>  at com.dropbox.core.v2.files.SearchArg.(SearchArg.java:93) 
> ~[dropbox-core-sdk-3.0.4.jar:na]
>  at 
> com.dropbox.core.v2.files.DbxUserFilesRequests.search(DbxUserFilesRequests.java:2416)
>  ~[dropbox-core-sdk-3.0.4.jar:na]
>  at 
> org.apache.camel.component.dropbox.core.DropboxAPIFacade.search(DropboxAPIFacade.java:270)
>  ~[camel-dropbox-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.component.dropbox.integration.producer.DropboxSearchProducer.process(DropboxSearchProducer.java:43)
>  ~[camel-dropbox-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
>  ~[camel-core-2.20.1.jar:2.20.1]
>  at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:148) 
> ~[camel-core-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:548)
>  ~[camel-core-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201)
>  [camel-core-2.20.1.jar:2.20.1]
>  at org.apache.camel.processor.Pipeline.process(Pipeline.java:138) 
> [camel-core-2.20.1.jar:2.20.1]
>  at org.apache.camel.processor.Pipeline.process(Pipeline.java:101) 
> [camel-core-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201)
>  [camel-core-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.component.direct.DirectProducer.process(DirectProducer.java:62)
>  [camel-core-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.processor.SharedCamelInternalProcessor.process(SharedCamelInternalProcessor.java:186)
>  [camel-core-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.processor.SharedCamelInternalProcessor.process(SharedCamelInternalProcessor.java:86)
>  [camel-core-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.impl.ProducerCache$1.doInProducer(ProducerCache.java:541) 
> [camel-core-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.impl.ProducerCache$1.doInProducer(ProducerCache.java:506) 
> [camel-core-2.20.1.jar:2.20.1]
>  at org.apache.camel.impl.ProducerCache.doInProducer(ProducerCache.java:369) 
> [camel-core-2.20.1.jar:2.20.1]
>  at org.apache.camel.impl.ProducerCache.sendExchange(ProducerCache.java:506) 
> [camel-core-2.20.1.jar:2.20.1]
>  at org.apache.camel.impl.ProducerCache.send(ProducerCache.java:229) 
> [camel-core-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.impl.DefaultProducerTemplate.send(DefaultProducerTemplate.java:144)
>  [camel-core-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.impl.DefaultProducerTemplate.sendBody(DefaultProducerTemplate.java:161)
>  [camel-core-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.impl.DefaultProducerTemplate.sendBody(DefaultProducerTemplate.java:370)
>  [camel-core-2.20.1.jar:2.20.1]{code}
> On the other hand, when I put query=* like this:
> {code:java}
> from("direct:dropboxSearch").to("dropbox://search?remotePath=/=*={{dropbox.key}}"){code}
> it throws:
> {code:java}
> org.apache.camel.component.dropbox.util.DropboxException: / does not exist or 
> can't obtain metadata
>  at 
> org.apache.camel.component.dropbox.core.DropboxAPIFacade.search(DropboxAPIFacade.java:283)
>  ~[camel-dropbox-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.component.dropbox.integration.producer.DropboxSearchProducer.process(DropboxSearchProducer.java:43)
>  ~[camel-dropbox-2.20.1.jar:2.20.1]
>  at 
> 

[jira] [Commented] (CAMEL-12221) Let's create a camel-fhir component

2018-02-02 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CAMEL-12221:


johnpoth commented on a change in pull request #2206: [CAMEL-12221] Let's 
create a camel-fhir component
URL: https://github.com/apache/camel/pull/2206#discussion_r165656785
 
 

 ##
 File path: 
components/camel-fhir/src/test/java/org/apache/camel/component/fhir/FhirXmlDataFormatURITest.java
 ##
 @@ -0,0 +1,94 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.fhir;
+
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import ca.uhn.fhir.context.FhirContext;
+import org.apache.camel.Exchange;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.test.junit4.CamelTestSupport;
+import org.hl7.fhir.dstu3.model.Address;
+import org.hl7.fhir.dstu3.model.Base;
+import org.hl7.fhir.dstu3.model.HumanName;
+import org.hl7.fhir.dstu3.model.Patient;
+import org.hl7.fhir.instance.model.api.IBaseResource;
+import org.junit.Before;
+import org.junit.Test;
+
+public class FhirXmlDataFormatURITest extends CamelTestSupport {
+
+private static final String PATIENT =
+"http://hl7.org/fhir\;>"
++ ""
++ ""
+  + "";
+private MockEndpoint mockEndpoint;
+
+@Override
+@Before
+public void setUp() throws Exception {
+super.setUp();
+mockEndpoint = resolveMandatoryEndpoint("mock:result", 
MockEndpoint.class);
+}
+
+@Test
+public void unmarshal() throws Exception {
+template.sendBody("direct:unmarshal", PATIENT);
+mockEndpoint.expectedMessageCount(1);
+Exchange exchange = mockEndpoint.getExchanges().get(0);
+Patient patient = (Patient) exchange.getIn().getBody();
+assertTrue("Patients should be equal!", 
patient.equalsDeep(getPatient()));
+}
+
+@Test
+public void marshal() throws Exception {
+Patient patient = getPatient();
+mockEndpoint.expectedMessageCount(1);
+template.sendBody("direct:marshal", patient);
+mockEndpoint.expectedMessageCount(1);
+Exchange exchange = mockEndpoint.getExchanges().get(0);
+InputStream inputStream = exchange.getIn().getBody(InputStream.class);
+final IBaseResource iBaseResource = 
FhirContext.forDstu3().newXmlParser().parseResource(new 
InputStreamReader(inputStream));
+assertTrue("Patients should be equal!", patient.equalsDeep((Base) 
iBaseResource));
+}
+
+private Patient getPatient() {
+Patient patient = new Patient();
+patient.addName(new 
HumanName().addGiven("Sherlock").setFamily("Holmes")).addAddress(new 
Address().addLine("221b Baker St, Marylebone, London NW1 6XE, UK"));
+return patient;
+}
+
+protected RouteBuilder createRouteBuilder() {
+return new RouteBuilder() {
+public void configure() {
+FhirContext fhirContext = FhirContext.forDstu3();
+
+from("direct:marshal")
+.setProperty(FhirConstants.FHIR_CONTEXT, 
constant(fhirContext))
 
 Review comment:
   Both options are available. You can set the context on the data formats 
itself.
   
   I added this because the ```Context``` was needed for the 
```FhirTypeConverter```. But since we are removing it I can remove this as well.


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


> Let's create a camel-fhir component
> ---
>
> Key: CAMEL-12221
> URL: https://issues.apache.org/jira/browse/CAMEL-12221
> Project: Camel
>  Issue Type: New Feature
>Reporter: John Poth
>Priority: Major
>
> Let's create a 

[jira] [Commented] (CAMEL-12221) Let's create a camel-fhir component

2018-02-02 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CAMEL-12221:


johnpoth commented on a change in pull request #2206: [CAMEL-12221] Let's 
create a camel-fhir component
URL: https://github.com/apache/camel/pull/2206#discussion_r165656082
 
 

 ##
 File path: 
components/camel-fhir/src/main/java/org/apache/camel/component/fhir/FhirEndpoint.java
 ##
 @@ -0,0 +1,46 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.fhir;
+
+import org.apache.camel.Consumer;
+import org.apache.camel.Processor;
+import org.apache.camel.Producer;
+import org.apache.camel.impl.DefaultEndpoint;
+import org.apache.camel.spi.UriEndpoint;
+
+/**
+ * Represents a fhir endpoint.
+ */
+@UriEndpoint(scheme = "fhir", title = "FHIR", syntax = "fhir://", label = 
"fhir", producerOnly = true)
 
 Review comment:
   The FHIR endpoint doesn't have any path or options. It will only execute the 
provided 
[IClientExecutable](https://github.com/jamesagnew/hapi-fhir/blob/0352d487204bf2f5eb0f87e204e77e225d47420b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IClientExecutable.java#L64)
 contained in the message body and do some error handling.
   
   @davsclaus The reasoning is that HAPI-FHIR comes with a nice 
[RestfulClient](https://github.com/jamesagnew/hapi-fhir/blob/0352d487204bf2f5eb0f87e204e77e225d47420b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/api/IRestfulClient.java#L31)
 that is instantiated with the server URL and is able to construct every 
request depending on what FHIR version the server is running. I don't see 
anything else to add for the moment.
   
   If this feels weird I can remove the Endpoint and have the user execute the 
request in a processing step.
   
   Let me know what you think


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


> Let's create a camel-fhir component
> ---
>
> Key: CAMEL-12221
> URL: https://issues.apache.org/jira/browse/CAMEL-12221
> Project: Camel
>  Issue Type: New Feature
>Reporter: John Poth
>Priority: Major
>
> Let's create a camel-fhir component based on [HAPI-FHIR|http://hapifhir.io]
> I can take care of the PR. 



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


[jira] [Commented] (CAMEL-12209) StringHelperTest.testHumanReadableBytes() is not repeatable

2018-02-02 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CAMEL-12209:


oscerd commented on issue #2198: CAMEL-12209: Proposal to fix by adding an 
overload
URL: https://github.com/apache/camel/pull/2198#issuecomment-362594164
 
 
   np :+1: glad to help!


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


> StringHelperTest.testHumanReadableBytes() is not repeatable
> ---
>
> Key: CAMEL-12209
> URL: https://issues.apache.org/jira/browse/CAMEL-12209
> Project: Camel
>  Issue Type: Test
>Reporter: Alex Dettinger
>Assignee: Alex Dettinger
>Priority: Minor
> Fix For: 2.21.0
>
>
> This test expects a byte number (e.g. 1024) to be formatted into a string 
> (e.g. 1.0 KB).
> The implementation is dependent upon the default locale, so this test fails, 
> for instance on a french machine:
> {code:java}
> [ERROR]   Run 1: StringHelperTest.testHumanReadableBytes:262 expected:<1[.]0 
> KB> but was:<1[,]0 KB>
> [ERROR]   Run 2: StringHelperTest.testHumanReadableBytes:262 expected:<1[.]0 
> KB> but was:<1[,]0 KB>
> [ERROR]   Run 3: StringHelperTest.testHumanReadableBytes:262 expected:<1[.]0 
> KB> but was:<1[,]0 KB>{code}
>  
> I will setup a PR to discuss this.



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


[jira] [Commented] (CAMEL-12209) StringHelperTest.testHumanReadableBytes() is not repeatable

2018-02-02 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CAMEL-12209:


aldettinger commented on issue #2198: CAMEL-12209: Proposal to fix by adding an 
overload
URL: https://github.com/apache/camel/pull/2198#issuecomment-362592773
 
 
   Oops, I've totally missed this one. @oscerd, thanks for closing  


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


> StringHelperTest.testHumanReadableBytes() is not repeatable
> ---
>
> Key: CAMEL-12209
> URL: https://issues.apache.org/jira/browse/CAMEL-12209
> Project: Camel
>  Issue Type: Test
>Reporter: Alex Dettinger
>Assignee: Alex Dettinger
>Priority: Minor
> Fix For: 2.21.0
>
>
> This test expects a byte number (e.g. 1024) to be formatted into a string 
> (e.g. 1.0 KB).
> The implementation is dependent upon the default locale, so this test fails, 
> for instance on a french machine:
> {code:java}
> [ERROR]   Run 1: StringHelperTest.testHumanReadableBytes:262 expected:<1[.]0 
> KB> but was:<1[,]0 KB>
> [ERROR]   Run 2: StringHelperTest.testHumanReadableBytes:262 expected:<1[.]0 
> KB> but was:<1[,]0 KB>
> [ERROR]   Run 3: StringHelperTest.testHumanReadableBytes:262 expected:<1[.]0 
> KB> but was:<1[,]0 KB>{code}
>  
> I will setup a PR to discuss this.



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


[jira] [Commented] (CAMEL-12221) Let's create a camel-fhir component

2018-02-02 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CAMEL-12221:


johnpoth commented on a change in pull request #2206: [CAMEL-12221] Let's 
create a camel-fhir component
URL: https://github.com/apache/camel/pull/2206#discussion_r165648742
 
 

 ##
 File path: 
components/camel-fhir/src/main/java/org/apache/camel/component/fhir/FhirTypeConverter.java
 ##
 @@ -0,0 +1,55 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.fhir;
+
+import ca.uhn.fhir.context.FhirContext;
+import ca.uhn.fhir.rest.api.MethodOutcome;
+import org.apache.camel.Converter;
+import org.apache.camel.Exchange;
+import org.hl7.fhir.instance.model.api.IBaseResource;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@Converter
+public final class FhirTypeConverter {
+
+private static final Logger LOGGER = 
LoggerFactory.getLogger(FhirTypeConverter.class.getName());
+
+private FhirTypeConverter() {
+// Helper class
+}
+
+@Converter
+public static String resourceToString(IBaseResource iBaseResource, 
Exchange exchange) {
 
 Review comment:
   Ah ok I'll remove it. I liked to use it for logging e.g: .log("Executing 
${body}") - but this can be done in an application bean or something


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


> Let's create a camel-fhir component
> ---
>
> Key: CAMEL-12221
> URL: https://issues.apache.org/jira/browse/CAMEL-12221
> Project: Camel
>  Issue Type: New Feature
>Reporter: John Poth
>Priority: Major
>
> Let's create a camel-fhir component based on [HAPI-FHIR|http://hapifhir.io]
> I can take care of the PR. 



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


[jira] [Commented] (CAMEL-12221) Let's create a camel-fhir component

2018-02-02 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CAMEL-12221:


johnpoth commented on a change in pull request #2206: [CAMEL-12221] Let's 
create a camel-fhir component
URL: https://github.com/apache/camel/pull/2206#discussion_r165647750
 
 

 ##
 File path: 
components/camel-fhir/src/main/java/org/apache/camel/component/fhir/FhirProducer.java
 ##
 @@ -0,0 +1,51 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.fhir;
+
+import java.util.List;
+import ca.uhn.fhir.model.base.resource.BaseOperationOutcome;
+import ca.uhn.fhir.rest.gclient.IClientExecutable;
+import org.apache.camel.Exchange;
+import org.apache.camel.impl.DefaultProducer;
+
+/**
+ * The fhir producer. It simply retrieves a {@link IClientExecutable}, 
executes it and sets the result in the Camel exchange body.
+ */
+public class FhirProducer extends DefaultProducer {
+
+public FhirProducer(FhirEndpoint endpoint) {
+super(endpoint);
+}
+
+public void process(Exchange exchange) throws Exception {
+IClientExecutable clientExecutable = (IClientExecutable) 
exchange.getIn().getHeaders().get(FhirConstants.FHIR_REQUEST);
+if (clientExecutable == null) {
+throw new UnsupportedOperationException("client executable must be 
set");
+}
+Object result = clientExecutable.execute();
+if (result instanceof BaseOperationOutcome) {
+List issues = 
((BaseOperationOutcome) result).getIssue();
+if (!issues.isEmpty()) {
+exchange.getOut().setFault(true);
 
 Review comment:
   Will set the exception on the exchange instead


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


> Let's create a camel-fhir component
> ---
>
> Key: CAMEL-12221
> URL: https://issues.apache.org/jira/browse/CAMEL-12221
> Project: Camel
>  Issue Type: New Feature
>Reporter: John Poth
>Priority: Major
>
> Let's create a camel-fhir component based on [HAPI-FHIR|http://hapifhir.io]
> I can take care of the PR. 



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


[jira] [Commented] (CAMEL-12176) Camel-Dropbox /search and /get are not working

2018-02-02 Thread Kamil (JIRA)

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

Kamil commented on CAMEL-12176:
---

[~davsclaus], what I learnt from using pure dropbox API is that indeed, you can 
not use "/", but you can access "root" using empty string "".

Therefore I'm using this simple method just before I pass path to Dropbox:
{code:java}
private String cleanPath(final String path) {
   return "/".equals(path) ? StringUtils.EMPTY : path; //dropbox workaround
}
{code}
I think it would be much better to use this approach instead of force users to 
wonder "how the heck I can access root folder"

> Camel-Dropbox /search and /get are not working
> --
>
> Key: CAMEL-12176
> URL: https://issues.apache.org/jira/browse/CAMEL-12176
> Project: Camel
>  Issue Type: Bug
>  Components: camel-dropbox
>Affects Versions: 2.20.1
>Reporter: Kamil
>Assignee: Claus Ibsen
>Priority: Major
> Fix For: 2.20.3, 2.21.0
>
>
> First of all, 
> [documentation|https://github.com/apache/camel/blob/master/components/camel-dropbox/src/main/docs/dropbox-component.adoc]
>  states that "query" property in "search" operation is not mandatory, but:
> {code:java}
> from("direct:dropboxSearch").to("dropbox://search?remotePath=/={{dropbox.key}}"){code}
> throws:
> {code:java}
> java.lang.IllegalArgumentException: Required value for 'query' is null
>  at com.dropbox.core.v2.files.SearchArg.(SearchArg.java:59) 
> ~[dropbox-core-sdk-3.0.4.jar:na]
>  at com.dropbox.core.v2.files.SearchArg.(SearchArg.java:93) 
> ~[dropbox-core-sdk-3.0.4.jar:na]
>  at 
> com.dropbox.core.v2.files.DbxUserFilesRequests.search(DbxUserFilesRequests.java:2416)
>  ~[dropbox-core-sdk-3.0.4.jar:na]
>  at 
> org.apache.camel.component.dropbox.core.DropboxAPIFacade.search(DropboxAPIFacade.java:270)
>  ~[camel-dropbox-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.component.dropbox.integration.producer.DropboxSearchProducer.process(DropboxSearchProducer.java:43)
>  ~[camel-dropbox-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
>  ~[camel-core-2.20.1.jar:2.20.1]
>  at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:148) 
> ~[camel-core-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:548)
>  ~[camel-core-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201)
>  [camel-core-2.20.1.jar:2.20.1]
>  at org.apache.camel.processor.Pipeline.process(Pipeline.java:138) 
> [camel-core-2.20.1.jar:2.20.1]
>  at org.apache.camel.processor.Pipeline.process(Pipeline.java:101) 
> [camel-core-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201)
>  [camel-core-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.component.direct.DirectProducer.process(DirectProducer.java:62)
>  [camel-core-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.processor.SharedCamelInternalProcessor.process(SharedCamelInternalProcessor.java:186)
>  [camel-core-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.processor.SharedCamelInternalProcessor.process(SharedCamelInternalProcessor.java:86)
>  [camel-core-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.impl.ProducerCache$1.doInProducer(ProducerCache.java:541) 
> [camel-core-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.impl.ProducerCache$1.doInProducer(ProducerCache.java:506) 
> [camel-core-2.20.1.jar:2.20.1]
>  at org.apache.camel.impl.ProducerCache.doInProducer(ProducerCache.java:369) 
> [camel-core-2.20.1.jar:2.20.1]
>  at org.apache.camel.impl.ProducerCache.sendExchange(ProducerCache.java:506) 
> [camel-core-2.20.1.jar:2.20.1]
>  at org.apache.camel.impl.ProducerCache.send(ProducerCache.java:229) 
> [camel-core-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.impl.DefaultProducerTemplate.send(DefaultProducerTemplate.java:144)
>  [camel-core-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.impl.DefaultProducerTemplate.sendBody(DefaultProducerTemplate.java:161)
>  [camel-core-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.impl.DefaultProducerTemplate.sendBody(DefaultProducerTemplate.java:370)
>  [camel-core-2.20.1.jar:2.20.1]{code}
> On the other hand, when I put query=* like this:
> {code:java}
> from("direct:dropboxSearch").to("dropbox://search?remotePath=/=*={{dropbox.key}}"){code}
> it throws:
> {code:java}
> org.apache.camel.component.dropbox.util.DropboxException: / does not exist or 
> can't obtain metadata
>  at 
> org.apache.camel.component.dropbox.core.DropboxAPIFacade.search(DropboxAPIFacade.java:283)
>  ~[camel-dropbox-2.20.1.jar:2.20.1]
>  at 
> 

[jira] [Commented] (CAMEL-12221) Let's create a camel-fhir component

2018-02-02 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CAMEL-12221:


johnpoth commented on a change in pull request #2206: [CAMEL-12221] Let's 
create a camel-fhir component
URL: https://github.com/apache/camel/pull/2206#discussion_r165645387
 
 

 ##
 File path: 
components/camel-fhir/src/main/java/org/apache/camel/component/fhir/FhirProducer.java
 ##
 @@ -0,0 +1,51 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.fhir;
+
+import java.util.List;
+import ca.uhn.fhir.model.base.resource.BaseOperationOutcome;
+import ca.uhn.fhir.rest.gclient.IClientExecutable;
+import org.apache.camel.Exchange;
+import org.apache.camel.impl.DefaultProducer;
+
+/**
+ * The fhir producer. It simply retrieves a {@link IClientExecutable}, 
executes it and sets the result in the Camel exchange body.
+ */
+public class FhirProducer extends DefaultProducer {
+
+public FhirProducer(FhirEndpoint endpoint) {
+super(endpoint);
+}
+
+public void process(Exchange exchange) throws Exception {
+IClientExecutable clientExecutable = (IClientExecutable) 
exchange.getIn().getHeaders().get(FhirConstants.FHIR_REQUEST);
 
 Review comment:
   I'll move this in the message body


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


> Let's create a camel-fhir component
> ---
>
> Key: CAMEL-12221
> URL: https://issues.apache.org/jira/browse/CAMEL-12221
> Project: Camel
>  Issue Type: New Feature
>Reporter: John Poth
>Priority: Major
>
> Let's create a camel-fhir component based on [HAPI-FHIR|http://hapifhir.io]
> I can take care of the PR. 



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


[jira] [Commented] (CAMEL-12221) Let's create a camel-fhir component

2018-02-02 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CAMEL-12221:


johnpoth commented on a change in pull request #2206: [CAMEL-12221] Let's 
create a camel-fhir component
URL: https://github.com/apache/camel/pull/2206#discussion_r165645213
 
 

 ##
 File path: 
components/camel-fhir/src/main/resources/META-INF/services/org/apache/camel/component/fhir
 ##
 @@ -0,0 +1 @@
+class=org.apache.camel.component.fhir.FhirComponent
 
 Review comment:
   Done


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


> Let's create a camel-fhir component
> ---
>
> Key: CAMEL-12221
> URL: https://issues.apache.org/jira/browse/CAMEL-12221
> Project: Camel
>  Issue Type: New Feature
>Reporter: John Poth
>Priority: Major
>
> Let's create a camel-fhir component based on [HAPI-FHIR|http://hapifhir.io]
> I can take care of the PR. 



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


[jira] [Created] (CAMEL-12225) Documentation - Should include a link id in top of file

2018-02-02 Thread Claus Ibsen (JIRA)
Claus Ibsen created CAMEL-12225:
---

 Summary: Documentation - Should include a link id in top of file
 Key: CAMEL-12225
 URL: https://issues.apache.org/jira/browse/CAMEL-12225
 Project: Camel
  Issue Type: Task
  Components: documentation
Reporter: Claus Ibsen
Assignee: Claus Ibsen
 Fix For: 2.21.0


All our adoc files should include a link in the top of the file, then we can 
build a TOC and have it link to each page.

 

The link should be the component id/dataformat id, etc. Which is also what we 
use in the filename, eg ftp-component, ahc-component, jaxb-dataformat etc.



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


[jira] [Commented] (CAMEL-12221) Let's create a camel-fhir component

2018-02-02 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CAMEL-12221:


johnpoth opened a new pull request #2206: [CAMEL-12221] Let's create a 
camel-fhir component
URL: https://github.com/apache/camel/pull/2206
 
 
   https://issues.apache.org/jira/browse/CAMEL-12221
   
   Let's create a camel-fhir component based on 
[HAPI-FHIR](http://hapifhir.io/) and in particular it’s RESTful 
[client](http://hapifhir.io/doc_rest_client.html) and [Data 
Model](http://hapifhir.io/doc_fhirobjects.html). It also adds two new Camel 
data formats to parse FHIR objects to/from XML/JSON based on  HAPI-FHIR’s 
[XML](https://github.com/jamesagnew/hapi-fhir/blob/master/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/XmlParser.java)
 and 
[JSON](https://github.com/jamesagnew/hapi-fhir/blob/master/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/JsonParser.java)
 parser. A Karaf feature is in the works.
   
   Thanks!


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


> Let's create a camel-fhir component
> ---
>
> Key: CAMEL-12221
> URL: https://issues.apache.org/jira/browse/CAMEL-12221
> Project: Camel
>  Issue Type: New Feature
>Reporter: John Poth
>Priority: Major
>
> Let's create a camel-fhir component based on [HAPI-FHIR|http://hapifhir.io]
> I can take care of the PR. 



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


[jira] [Commented] (CAMEL-12221) Let's create a camel-fhir component

2018-02-02 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CAMEL-12221:


GitHub user johnpoth opened a pull request:

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

[CAMEL-12221] Let's create a camel-fhir component

https://issues.apache.org/jira/browse/CAMEL-12221

Let's create a camel-fhir component based on 
[HAPI-FHIR](http://hapifhir.io/) and in particular it’s RESTful 
[client](http://hapifhir.io/doc_rest_client.html) and [Data 
Model](http://hapifhir.io/doc_fhirobjects.html). It also adds two new Camel 
data formats to parse FHIR objects to/from XML/JSON based on  HAPI-FHIR’s 
[XML](https://github.com/jamesagnew/hapi-fhir/blob/master/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/XmlParser.java)
 and 
[JSON](https://github.com/jamesagnew/hapi-fhir/blob/master/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/JsonParser.java)
 parser. A Karaf feature is in the works.

Thanks!

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

$ git pull https://github.com/johnpoth/camel CAMEL-12221

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

https://github.com/apache/camel/pull/2206.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 #2206


commit 45c4c9f334facf2fb8ebd155819b9d5cd90dc8ed
Author: jpoth 
Date:   2018-02-01T19:14:42Z

[CAMEL-12221] Let's create a camel-fhir component




> Let's create a camel-fhir component
> ---
>
> Key: CAMEL-12221
> URL: https://issues.apache.org/jira/browse/CAMEL-12221
> Project: Camel
>  Issue Type: New Feature
>Reporter: John Poth
>Priority: Major
>
> Let's create a camel-fhir component based on [HAPI-FHIR|http://hapifhir.io]
> I can take care of the PR. 



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


[jira] [Commented] (CAMEL-11731) Servlet Component isn't really async

2018-02-02 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CAMEL-11731:


davsclaus commented on issue #2188: CAMEL-11731 - add asynccallback and sync 
camel and servlet async APIs
URL: https://github.com/apache/camel/pull/2188#issuecomment-362555789
 
 
   Its more tricky than that, the Camel routing engine can process sync and 
async depending on what happens in the Camel routes / components in use etc. 
And that complete method must be called regardless at the right time, and only 
when all the data is done being written in the reply. So ordering matter, and 
also it maybe must be called even if Camel routing engine was not kicked as 
something failed beforehand.
   
   


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


> Servlet Component isn't really async
> 
>
> Key: CAMEL-11731
> URL: https://issues.apache.org/jira/browse/CAMEL-11731
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-servlet
>Affects Versions: 2.18.4, 2.19.2
> Environment: All
>Reporter: Nick Houghton
>Assignee: Önder Sezgin
>Priority: Major
> Fix For: Future
>
>
> So my assumption reading the servlet component doco is that with 2.18+ and a 
> Servlet 3+ container, the component supports async, which it kind of does 
> with the async=true init config, and there is even a method in CamelServlet 
> called "doServiceAsync" but from what i can tell it doesn't really do it in a 
> asynchronous manner, where there are no blocked threads while a request is 
> awaiting an async operation (like an AHC call for example).
> Looking at:
> https://github.com/apache/camel/blob/master/components/camel-http-common/src/main/java/org/apache/camel/http/common/CamelServlet.java
> While processing a request, we check if we are in async mode and call 
> doServiceAsync..
> {code:java}
>  @Override
> protected final void service(HttpServletRequest req, HttpServletResponse 
> resp) throws ServletException, IOException {
> if (isAsync()) {
> final AsyncContext context = req.startAsync();
> //run async
> context.start(() -> doServiceAsync(context));
> } else {
> doService(req, resp);
> }
> }
> {code}
> then in doServiceAsync() we call doService().. and then we call 
> getProcessor().process(exchange), not process(exchange, asyncCallback) which 
> is the proper async method..
> {code:java}
> try {
> if (log.isTraceEnabled()) {
> log.trace("Processing request for exchangeId: {}", 
> exchange.getExchangeId());
> }
> // process the exchange
> consumer.getProcessor().process(exchange);
> } catch (Exception e) {
> exchange.setException(e);
> }
> {code}
> So the actual behaviour is an inbound request in async mode that ends up just 
> blocking waiting for the request to complete, in a totally sync manner. I 
> presume this is not the desired behaviour?
> It seems the fix would be to move the doService() logic to doServiceAsync() 
> and have doService() call it and use the AsyncProcessorConverterHelper. Or 
> the other alternative would be to update the documentation to explicitly note 
> that it is actually not async at all.
> I can probably PR it in, just wanted to get thoughts on the actual intention.



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


[jira] [Commented] (CAMEL-12221) Let's create a camel-fhir component

2018-02-02 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CAMEL-12221:


davsclaus commented on issue #2206: [CAMEL-12221] Let's create a camel-fhir 
component
URL: https://github.com/apache/camel/pull/2206#issuecomment-362554585
 
 
   A good start, but I think this needs a bit more "ease of use" and to work a 
bit more like the other camel data formats does. Keep up the work @johnpoth.


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


> Let's create a camel-fhir component
> ---
>
> Key: CAMEL-12221
> URL: https://issues.apache.org/jira/browse/CAMEL-12221
> Project: Camel
>  Issue Type: New Feature
>Reporter: John Poth
>Priority: Major
>
> Let's create a camel-fhir component based on [HAPI-FHIR|http://hapifhir.io]
> I can take care of the PR. 



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


[jira] [Commented] (CAMEL-12221) Let's create a camel-fhir component

2018-02-02 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CAMEL-12221:


davsclaus commented on a change in pull request #2206: [CAMEL-12221] Let's 
create a camel-fhir component
URL: https://github.com/apache/camel/pull/2206#discussion_r165613523
 
 

 ##
 File path: 
components/camel-fhir/src/main/java/org/apache/camel/component/fhir/FhirEndpoint.java
 ##
 @@ -0,0 +1,46 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.fhir;
+
+import org.apache.camel.Consumer;
+import org.apache.camel.Processor;
+import org.apache.camel.Producer;
+import org.apache.camel.impl.DefaultEndpoint;
+import org.apache.camel.spi.UriEndpoint;
+
+/**
+ * Represents a fhir endpoint.
+ */
+@UriEndpoint(scheme = "fhir", title = "FHIR", syntax = "fhir://", label = 
"fhir", producerOnly = true)
 
 Review comment:
   This syntax is wrong, you need to use `fhir:xxx` where xxx is required 
`@UriPath` options 


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


> Let's create a camel-fhir component
> ---
>
> Key: CAMEL-12221
> URL: https://issues.apache.org/jira/browse/CAMEL-12221
> Project: Camel
>  Issue Type: New Feature
>Reporter: John Poth
>Priority: Major
>
> Let's create a camel-fhir component based on [HAPI-FHIR|http://hapifhir.io]
> I can take care of the PR. 



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


[jira] [Commented] (CAMEL-12221) Let's create a camel-fhir component

2018-02-02 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CAMEL-12221:


davsclaus commented on a change in pull request #2206: [CAMEL-12221] Let's 
create a camel-fhir component
URL: https://github.com/apache/camel/pull/2206#discussion_r165614680
 
 

 ##
 File path: 
components/camel-fhir/src/main/resources/META-INF/services/org/apache/camel/component/fhir
 ##
 @@ -0,0 +1 @@
+class=org.apache.camel.component.fhir.FhirComponent
 
 Review comment:
   Need license header


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


> Let's create a camel-fhir component
> ---
>
> Key: CAMEL-12221
> URL: https://issues.apache.org/jira/browse/CAMEL-12221
> Project: Camel
>  Issue Type: New Feature
>Reporter: John Poth
>Priority: Major
>
> Let's create a camel-fhir component based on [HAPI-FHIR|http://hapifhir.io]
> I can take care of the PR. 



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


[jira] [Commented] (CAMEL-12221) Let's create a camel-fhir component

2018-02-02 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CAMEL-12221:


davsclaus commented on a change in pull request #2206: [CAMEL-12221] Let's 
create a camel-fhir component
URL: https://github.com/apache/camel/pull/2206#discussion_r165614505
 
 

 ##
 File path: 
components/camel-fhir/src/main/java/org/apache/camel/component/fhir/FhirTypeConverter.java
 ##
 @@ -0,0 +1,55 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.fhir;
+
+import ca.uhn.fhir.context.FhirContext;
+import ca.uhn.fhir.rest.api.MethodOutcome;
+import org.apache.camel.Converter;
+import org.apache.camel.Exchange;
+import org.hl7.fhir.instance.model.api.IBaseResource;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@Converter
+public final class FhirTypeConverter {
+
+private static final Logger LOGGER = 
LoggerFactory.getLogger(FhirTypeConverter.class.getName());
+
+private FhirTypeConverter() {
+// Helper class
+}
+
+@Converter
+public static String resourceToString(IBaseResource iBaseResource, 
Exchange exchange) {
 
 Review comment:
   Hmm maybe such a type converter is not so idea when you require those stuff 
to be on the exchange property. Sometimes a type converter is not the best 
thing to add, they should really ideally just be for basic type conversions. 
Consider removing this if possible.


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


> Let's create a camel-fhir component
> ---
>
> Key: CAMEL-12221
> URL: https://issues.apache.org/jira/browse/CAMEL-12221
> Project: Camel
>  Issue Type: New Feature
>Reporter: John Poth
>Priority: Major
>
> Let's create a camel-fhir component based on [HAPI-FHIR|http://hapifhir.io]
> I can take care of the PR. 



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


[jira] [Commented] (CAMEL-12221) Let's create a camel-fhir component

2018-02-02 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CAMEL-12221:


davsclaus commented on a change in pull request #2206: [CAMEL-12221] Let's 
create a camel-fhir component
URL: https://github.com/apache/camel/pull/2206#discussion_r165613930
 
 

 ##
 File path: 
components/camel-fhir/src/main/java/org/apache/camel/component/fhir/FhirProducer.java
 ##
 @@ -0,0 +1,51 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.fhir;
+
+import java.util.List;
+import ca.uhn.fhir.model.base.resource.BaseOperationOutcome;
+import ca.uhn.fhir.rest.gclient.IClientExecutable;
+import org.apache.camel.Exchange;
+import org.apache.camel.impl.DefaultProducer;
+
+/**
+ * The fhir producer. It simply retrieves a {@link IClientExecutable}, 
executes it and sets the result in the Camel exchange body.
+ */
+public class FhirProducer extends DefaultProducer {
+
+public FhirProducer(FhirEndpoint endpoint) {
+super(endpoint);
+}
+
+public void process(Exchange exchange) throws Exception {
+IClientExecutable clientExecutable = (IClientExecutable) 
exchange.getIn().getHeaders().get(FhirConstants.FHIR_REQUEST);
+if (clientExecutable == null) {
+throw new UnsupportedOperationException("client executable must be 
set");
+}
+Object result = clientExecutable.execute();
+if (result instanceof BaseOperationOutcome) {
+List issues = 
((BaseOperationOutcome) result).getIssue();
+if (!issues.isEmpty()) {
+exchange.getOut().setFault(true);
 
 Review comment:
   Please do not use fault messages, this is really only for SOAP/JBI stuff and 
it should become deprcated and removed in the future (eg 3.0)


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


> Let's create a camel-fhir component
> ---
>
> Key: CAMEL-12221
> URL: https://issues.apache.org/jira/browse/CAMEL-12221
> Project: Camel
>  Issue Type: New Feature
>Reporter: John Poth
>Priority: Major
>
> Let's create a camel-fhir component based on [HAPI-FHIR|http://hapifhir.io]
> I can take care of the PR. 



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


[jira] [Commented] (CAMEL-11731) Servlet Component isn't really async

2018-02-02 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CAMEL-11731:


onderson commented on issue #2188: CAMEL-11731 - add asynccallback and sync 
camel and servlet async APIs
URL: https://github.com/apache/camel/pull/2188#issuecomment-362565907
 
 
   in doServiceAsync method, all the exceptions must be handled and in finally 
block `asyncCallback.done(false)` must be called so that ,after proper error 
message provided in HttpServletResponse ,context should be completed as a 
result of it. I think i understand what you mean by the importance of ordering, 
maybe in callback handler's implementation, 
   instead of 
   
   > public void done(boolean doneSync) {
   >if (!doneSync) {
   >context.complete();
   >}
   >}
   
   it should be 
   
   > public void done(boolean doneSync) {
   > context.complete();
   >   }
   
   and in here, context should not be completed before camel's async processing 
is completed.
   
   So, i am wondering in such case would it be simpler not having camel's async 
processing may not be needed if Camel Servlet is already asynchronous.
   
   So would it make the current behaviour close to correct handling?
   or it will be more complicated to syncronize both async behaviours somewhere 
else.


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


> Servlet Component isn't really async
> 
>
> Key: CAMEL-11731
> URL: https://issues.apache.org/jira/browse/CAMEL-11731
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-servlet
>Affects Versions: 2.18.4, 2.19.2
> Environment: All
>Reporter: Nick Houghton
>Assignee: Önder Sezgin
>Priority: Major
> Fix For: Future
>
>
> So my assumption reading the servlet component doco is that with 2.18+ and a 
> Servlet 3+ container, the component supports async, which it kind of does 
> with the async=true init config, and there is even a method in CamelServlet 
> called "doServiceAsync" but from what i can tell it doesn't really do it in a 
> asynchronous manner, where there are no blocked threads while a request is 
> awaiting an async operation (like an AHC call for example).
> Looking at:
> https://github.com/apache/camel/blob/master/components/camel-http-common/src/main/java/org/apache/camel/http/common/CamelServlet.java
> While processing a request, we check if we are in async mode and call 
> doServiceAsync..
> {code:java}
>  @Override
> protected final void service(HttpServletRequest req, HttpServletResponse 
> resp) throws ServletException, IOException {
> if (isAsync()) {
> final AsyncContext context = req.startAsync();
> //run async
> context.start(() -> doServiceAsync(context));
> } else {
> doService(req, resp);
> }
> }
> {code}
> then in doServiceAsync() we call doService().. and then we call 
> getProcessor().process(exchange), not process(exchange, asyncCallback) which 
> is the proper async method..
> {code:java}
> try {
> if (log.isTraceEnabled()) {
> log.trace("Processing request for exchangeId: {}", 
> exchange.getExchangeId());
> }
> // process the exchange
> consumer.getProcessor().process(exchange);
> } catch (Exception e) {
> exchange.setException(e);
> }
> {code}
> So the actual behaviour is an inbound request in async mode that ends up just 
> blocking waiting for the request to complete, in a totally sync manner. I 
> presume this is not the desired behaviour?
> It seems the fix would be to move the doService() logic to doServiceAsync() 
> and have doService() call it and use the AsyncProcessorConverterHelper. Or 
> the other alternative would be to update the documentation to explicitly note 
> that it is actually not async at all.
> I can probably PR it in, just wanted to get thoughts on the actual intention.



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


[jira] [Commented] (CAMEL-12221) Let's create a camel-fhir component

2018-02-02 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CAMEL-12221:


davsclaus commented on a change in pull request #2206: [CAMEL-12221] Let's 
create a camel-fhir component
URL: https://github.com/apache/camel/pull/2206#discussion_r165614160
 
 

 ##
 File path: 
components/camel-fhir/src/main/java/org/apache/camel/component/fhir/FhirProducer.java
 ##
 @@ -0,0 +1,51 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.fhir;
+
+import java.util.List;
+import ca.uhn.fhir.model.base.resource.BaseOperationOutcome;
+import ca.uhn.fhir.rest.gclient.IClientExecutable;
+import org.apache.camel.Exchange;
+import org.apache.camel.impl.DefaultProducer;
+
+/**
+ * The fhir producer. It simply retrieves a {@link IClientExecutable}, 
executes it and sets the result in the Camel exchange body.
+ */
+public class FhirProducer extends DefaultProducer {
+
+public FhirProducer(FhirEndpoint endpoint) {
+super(endpoint);
+}
+
+public void process(Exchange exchange) throws Exception {
+IClientExecutable clientExecutable = (IClientExecutable) 
exchange.getIn().getHeaders().get(FhirConstants.FHIR_REQUEST);
 
 Review comment:
   This seems a bit odd to use a header for such a thing. How will this header 
to be configured? Headers should be part of the message contract, and not 
"misused" for client stuff


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


> Let's create a camel-fhir component
> ---
>
> Key: CAMEL-12221
> URL: https://issues.apache.org/jira/browse/CAMEL-12221
> Project: Camel
>  Issue Type: New Feature
>Reporter: John Poth
>Priority: Major
>
> Let's create a camel-fhir component based on [HAPI-FHIR|http://hapifhir.io]
> I can take care of the PR. 



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


[jira] [Commented] (CAMEL-12221) Let's create a camel-fhir component

2018-02-02 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CAMEL-12221:


davsclaus commented on a change in pull request #2206: [CAMEL-12221] Let's 
create a camel-fhir component
URL: https://github.com/apache/camel/pull/2206#discussion_r165615028
 
 

 ##
 File path: 
components/camel-fhir/src/test/java/org/apache/camel/component/fhir/FhirXmlDataFormatURITest.java
 ##
 @@ -0,0 +1,94 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.fhir;
+
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import ca.uhn.fhir.context.FhirContext;
+import org.apache.camel.Exchange;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.test.junit4.CamelTestSupport;
+import org.hl7.fhir.dstu3.model.Address;
+import org.hl7.fhir.dstu3.model.Base;
+import org.hl7.fhir.dstu3.model.HumanName;
+import org.hl7.fhir.dstu3.model.Patient;
+import org.hl7.fhir.instance.model.api.IBaseResource;
+import org.junit.Before;
+import org.junit.Test;
+
+public class FhirXmlDataFormatURITest extends CamelTestSupport {
+
+private static final String PATIENT =
+"http://hl7.org/fhir\;>"
++ ""
++ ""
+  + "";
+private MockEndpoint mockEndpoint;
+
+@Override
+@Before
+public void setUp() throws Exception {
+super.setUp();
+mockEndpoint = resolveMandatoryEndpoint("mock:result", 
MockEndpoint.class);
+}
+
+@Test
+public void unmarshal() throws Exception {
+template.sendBody("direct:unmarshal", PATIENT);
+mockEndpoint.expectedMessageCount(1);
+Exchange exchange = mockEndpoint.getExchanges().get(0);
+Patient patient = (Patient) exchange.getIn().getBody();
+assertTrue("Patients should be equal!", 
patient.equalsDeep(getPatient()));
+}
+
+@Test
+public void marshal() throws Exception {
+Patient patient = getPatient();
+mockEndpoint.expectedMessageCount(1);
+template.sendBody("direct:marshal", patient);
+mockEndpoint.expectedMessageCount(1);
+Exchange exchange = mockEndpoint.getExchanges().get(0);
+InputStream inputStream = exchange.getIn().getBody(InputStream.class);
+final IBaseResource iBaseResource = 
FhirContext.forDstu3().newXmlParser().parseResource(new 
InputStreamReader(inputStream));
+assertTrue("Patients should be equal!", patient.equalsDeep((Base) 
iBaseResource));
+}
+
+private Patient getPatient() {
+Patient patient = new Patient();
+patient.addName(new 
HumanName().addGiven("Sherlock").setFamily("Holmes")).addAddress(new 
Address().addLine("221b Baker St, Marylebone, London NW1 6XE, UK"));
+return patient;
+}
+
+protected RouteBuilder createRouteBuilder() {
+return new RouteBuilder() {
+public void configure() {
+FhirContext fhirContext = FhirContext.forDstu3();
+
+from("direct:marshal")
+.setProperty(FhirConstants.FHIR_CONTEXT, 
constant(fhirContext))
 
 Review comment:
   This smells, can this context not be set on the data format itself, its bad 
that end users have to setup this themselves. All the other data formats dont 
do this kind


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


> Let's create a camel-fhir component
> ---
>
> Key: CAMEL-12221
> URL: https://issues.apache.org/jira/browse/CAMEL-12221
> Project: Camel
>  Issue Type: New Feature
>Reporter: John Poth
>Priority: Major
>
> Let's create a camel-fhir component based on [HAPI-FHIR|http://hapifhir.io]
> 

[jira] [Commented] (CAMEL-12221) Let's create a camel-fhir component

2018-02-02 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CAMEL-12221:


davsclaus commented on a change in pull request #2206: [CAMEL-12221] Let's 
create a camel-fhir component
URL: https://github.com/apache/camel/pull/2206#discussion_r165613614
 
 

 ##
 File path: 
components/camel-fhir/src/main/java/org/apache/camel/component/fhir/FhirEndpoint.java
 ##
 @@ -0,0 +1,46 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.fhir;
+
+import org.apache.camel.Consumer;
+import org.apache.camel.Processor;
+import org.apache.camel.Producer;
+import org.apache.camel.impl.DefaultEndpoint;
+import org.apache.camel.spi.UriEndpoint;
+
+/**
+ * Represents a fhir endpoint.
 
 Review comment:
   Update this javadoc to give a short summary what this does as we grab this 
for the component overview documentation


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


> Let's create a camel-fhir component
> ---
>
> Key: CAMEL-12221
> URL: https://issues.apache.org/jira/browse/CAMEL-12221
> Project: Camel
>  Issue Type: New Feature
>Reporter: John Poth
>Priority: Major
>
> Let's create a camel-fhir component based on [HAPI-FHIR|http://hapifhir.io]
> I can take care of the PR. 



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


[jira] [Commented] (CAMEL-11731) Servlet Component isn't really async

2018-02-02 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CAMEL-11731:


onderson commented on issue #2188: CAMEL-11731 - add asynccallback and sync 
camel and servlet async APIs
URL: https://github.com/apache/camel/pull/2188#issuecomment-362565907
 
 
   in doServiceAsync method, all the exceptions must be handled and in finally 
block `asyncCallback.done(false)` must be called so that ,after proper error 
message provided in HttpServletResponse ,context should be completed as a 
result of it. I think i understand what you mean by the importance of ordering, 
maybe in callback handler's implementation, 
   instead of 
   
   `public void done(boolean doneSync) {
   if (!doneSync) {
   context.complete();
   }
   }`
   
   it should be 
   
   `public void done(boolean doneSync) {
   context.complete();
   }`
   
   and in here, context should not be completed before camel's async processing 
is completed.
   
   So, i am wondering in such case would it be simpler not having camel's async 
processing may not be needed if Camel Servlet is already asynchronous.


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


> Servlet Component isn't really async
> 
>
> Key: CAMEL-11731
> URL: https://issues.apache.org/jira/browse/CAMEL-11731
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-servlet
>Affects Versions: 2.18.4, 2.19.2
> Environment: All
>Reporter: Nick Houghton
>Assignee: Önder Sezgin
>Priority: Major
> Fix For: Future
>
>
> So my assumption reading the servlet component doco is that with 2.18+ and a 
> Servlet 3+ container, the component supports async, which it kind of does 
> with the async=true init config, and there is even a method in CamelServlet 
> called "doServiceAsync" but from what i can tell it doesn't really do it in a 
> asynchronous manner, where there are no blocked threads while a request is 
> awaiting an async operation (like an AHC call for example).
> Looking at:
> https://github.com/apache/camel/blob/master/components/camel-http-common/src/main/java/org/apache/camel/http/common/CamelServlet.java
> While processing a request, we check if we are in async mode and call 
> doServiceAsync..
> {code:java}
>  @Override
> protected final void service(HttpServletRequest req, HttpServletResponse 
> resp) throws ServletException, IOException {
> if (isAsync()) {
> final AsyncContext context = req.startAsync();
> //run async
> context.start(() -> doServiceAsync(context));
> } else {
> doService(req, resp);
> }
> }
> {code}
> then in doServiceAsync() we call doService().. and then we call 
> getProcessor().process(exchange), not process(exchange, asyncCallback) which 
> is the proper async method..
> {code:java}
> try {
> if (log.isTraceEnabled()) {
> log.trace("Processing request for exchangeId: {}", 
> exchange.getExchangeId());
> }
> // process the exchange
> consumer.getProcessor().process(exchange);
> } catch (Exception e) {
> exchange.setException(e);
> }
> {code}
> So the actual behaviour is an inbound request in async mode that ends up just 
> blocking waiting for the request to complete, in a totally sync manner. I 
> presume this is not the desired behaviour?
> It seems the fix would be to move the doService() logic to doServiceAsync() 
> and have doService() call it and use the AsyncProcessorConverterHelper. Or 
> the other alternative would be to update the documentation to explicitly note 
> that it is actually not async at all.
> I can probably PR it in, just wanted to get thoughts on the actual intention.



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


[jira] [Commented] (CAMEL-12221) Let's create a camel-fhir component

2018-02-02 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CAMEL-12221:


johnpoth commented on issue #2206: [CAMEL-12221] Let's create a camel-fhir 
component
URL: https://github.com/apache/camel/pull/2206#issuecomment-362549908
 
 
   Thanks for reviewing @oscerd, I knew I missed something :) PR updated


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


> Let's create a camel-fhir component
> ---
>
> Key: CAMEL-12221
> URL: https://issues.apache.org/jira/browse/CAMEL-12221
> Project: Camel
>  Issue Type: New Feature
>Reporter: John Poth
>Priority: Major
>
> Let's create a camel-fhir component based on [HAPI-FHIR|http://hapifhir.io]
> I can take care of the PR. 



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


[jira] [Commented] (CAMEL-12221) Let's create a camel-fhir component

2018-02-02 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CAMEL-12221:


oscerd commented on issue #2206: [CAMEL-12221] Let's create a camel-fhir 
component
URL: https://github.com/apache/camel/pull/2206#issuecomment-362550322
 
 
   Oh but, wait, you can merge yourself :-) Go for it @johnpoth :-D


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


> Let's create a camel-fhir component
> ---
>
> Key: CAMEL-12221
> URL: https://issues.apache.org/jira/browse/CAMEL-12221
> Project: Camel
>  Issue Type: New Feature
>Reporter: John Poth
>Priority: Major
>
> Let's create a camel-fhir component based on [HAPI-FHIR|http://hapifhir.io]
> I can take care of the PR. 



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


[jira] [Commented] (CAMEL-12221) Let's create a camel-fhir component

2018-02-02 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CAMEL-12221:


oscerd commented on issue #2206: [CAMEL-12221] Let's create a camel-fhir 
component
URL: https://github.com/apache/camel/pull/2206#issuecomment-362550026
 
 
   I'll take a look at the build an then merge.


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


> Let's create a camel-fhir component
> ---
>
> Key: CAMEL-12221
> URL: https://issues.apache.org/jira/browse/CAMEL-12221
> Project: Camel
>  Issue Type: New Feature
>Reporter: John Poth
>Priority: Major
>
> Let's create a camel-fhir component based on [HAPI-FHIR|http://hapifhir.io]
> I can take care of the PR. 



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


[jira] [Commented] (CAMEL-12221) Let's create a camel-fhir component

2018-02-02 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CAMEL-12221:


oscerd commented on issue #2206: [CAMEL-12221] Let's create a camel-fhir 
component
URL: https://github.com/apache/camel/pull/2206#issuecomment-362549987
 
 
   Great :-)


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


> Let's create a camel-fhir component
> ---
>
> Key: CAMEL-12221
> URL: https://issues.apache.org/jira/browse/CAMEL-12221
> Project: Camel
>  Issue Type: New Feature
>Reporter: John Poth
>Priority: Major
>
> Let's create a camel-fhir component based on [HAPI-FHIR|http://hapifhir.io]
> I can take care of the PR. 



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


[jira] [Commented] (CAMEL-12221) Let's create a camel-fhir component

2018-02-02 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CAMEL-12221:


johnpoth commented on issue #2206: [CAMEL-12221] Let's create a camel-fhir 
component
URL: https://github.com/apache/camel/pull/2206#issuecomment-362557552
 
 
   Thanks @davsclaus  for your comments! Will have a look


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


> Let's create a camel-fhir component
> ---
>
> Key: CAMEL-12221
> URL: https://issues.apache.org/jira/browse/CAMEL-12221
> Project: Camel
>  Issue Type: New Feature
>Reporter: John Poth
>Priority: Major
>
> Let's create a camel-fhir component based on [HAPI-FHIR|http://hapifhir.io]
> I can take care of the PR. 



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


[jira] [Commented] (CAMEL-12176) Camel-Dropbox /search and /get are not working

2018-02-02 Thread Claus Ibsen (JIRA)

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

Claus Ibsen commented on CAMEL-12176:
-

Maybe you cannot use the root path for remotePath. I have added the caused 
exception in the stacktrace in the future so you can see the error from dropbox 
itself.

The doc has been fixed also.

> Camel-Dropbox /search and /get are not working
> --
>
> Key: CAMEL-12176
> URL: https://issues.apache.org/jira/browse/CAMEL-12176
> Project: Camel
>  Issue Type: Bug
>  Components: camel-dropbox
>Affects Versions: 2.20.1
>Reporter: Kamil
>Priority: Major
> Fix For: 2.20.3, 2.21.0
>
>
> First of all, 
> [documentation|https://github.com/apache/camel/blob/master/components/camel-dropbox/src/main/docs/dropbox-component.adoc]
>  states that "query" property in "search" operation is not mandatory, but:
> {code:java}
> from("direct:dropboxSearch").to("dropbox://search?remotePath=/={{dropbox.key}}"){code}
> throws:
> {code:java}
> java.lang.IllegalArgumentException: Required value for 'query' is null
>  at com.dropbox.core.v2.files.SearchArg.(SearchArg.java:59) 
> ~[dropbox-core-sdk-3.0.4.jar:na]
>  at com.dropbox.core.v2.files.SearchArg.(SearchArg.java:93) 
> ~[dropbox-core-sdk-3.0.4.jar:na]
>  at 
> com.dropbox.core.v2.files.DbxUserFilesRequests.search(DbxUserFilesRequests.java:2416)
>  ~[dropbox-core-sdk-3.0.4.jar:na]
>  at 
> org.apache.camel.component.dropbox.core.DropboxAPIFacade.search(DropboxAPIFacade.java:270)
>  ~[camel-dropbox-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.component.dropbox.integration.producer.DropboxSearchProducer.process(DropboxSearchProducer.java:43)
>  ~[camel-dropbox-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
>  ~[camel-core-2.20.1.jar:2.20.1]
>  at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:148) 
> ~[camel-core-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:548)
>  ~[camel-core-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201)
>  [camel-core-2.20.1.jar:2.20.1]
>  at org.apache.camel.processor.Pipeline.process(Pipeline.java:138) 
> [camel-core-2.20.1.jar:2.20.1]
>  at org.apache.camel.processor.Pipeline.process(Pipeline.java:101) 
> [camel-core-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201)
>  [camel-core-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.component.direct.DirectProducer.process(DirectProducer.java:62)
>  [camel-core-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.processor.SharedCamelInternalProcessor.process(SharedCamelInternalProcessor.java:186)
>  [camel-core-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.processor.SharedCamelInternalProcessor.process(SharedCamelInternalProcessor.java:86)
>  [camel-core-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.impl.ProducerCache$1.doInProducer(ProducerCache.java:541) 
> [camel-core-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.impl.ProducerCache$1.doInProducer(ProducerCache.java:506) 
> [camel-core-2.20.1.jar:2.20.1]
>  at org.apache.camel.impl.ProducerCache.doInProducer(ProducerCache.java:369) 
> [camel-core-2.20.1.jar:2.20.1]
>  at org.apache.camel.impl.ProducerCache.sendExchange(ProducerCache.java:506) 
> [camel-core-2.20.1.jar:2.20.1]
>  at org.apache.camel.impl.ProducerCache.send(ProducerCache.java:229) 
> [camel-core-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.impl.DefaultProducerTemplate.send(DefaultProducerTemplate.java:144)
>  [camel-core-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.impl.DefaultProducerTemplate.sendBody(DefaultProducerTemplate.java:161)
>  [camel-core-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.impl.DefaultProducerTemplate.sendBody(DefaultProducerTemplate.java:370)
>  [camel-core-2.20.1.jar:2.20.1]{code}
> On the other hand, when I put query=* like this:
> {code:java}
> from("direct:dropboxSearch").to("dropbox://search?remotePath=/=*={{dropbox.key}}"){code}
> it throws:
> {code:java}
> org.apache.camel.component.dropbox.util.DropboxException: / does not exist or 
> can't obtain metadata
>  at 
> org.apache.camel.component.dropbox.core.DropboxAPIFacade.search(DropboxAPIFacade.java:283)
>  ~[camel-dropbox-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.component.dropbox.integration.producer.DropboxSearchProducer.process(DropboxSearchProducer.java:43)
>  ~[camel-dropbox-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
>  ~[camel-core-2.20.1.jar:2.20.1]
>  at 

[jira] [Assigned] (CAMEL-12176) Camel-Dropbox /search and /get are not working

2018-02-02 Thread Claus Ibsen (JIRA)

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

Claus Ibsen reassigned CAMEL-12176:
---

Assignee: Claus Ibsen

> Camel-Dropbox /search and /get are not working
> --
>
> Key: CAMEL-12176
> URL: https://issues.apache.org/jira/browse/CAMEL-12176
> Project: Camel
>  Issue Type: Bug
>  Components: camel-dropbox
>Affects Versions: 2.20.1
>Reporter: Kamil
>Assignee: Claus Ibsen
>Priority: Major
> Fix For: 2.20.3, 2.21.0
>
>
> First of all, 
> [documentation|https://github.com/apache/camel/blob/master/components/camel-dropbox/src/main/docs/dropbox-component.adoc]
>  states that "query" property in "search" operation is not mandatory, but:
> {code:java}
> from("direct:dropboxSearch").to("dropbox://search?remotePath=/={{dropbox.key}}"){code}
> throws:
> {code:java}
> java.lang.IllegalArgumentException: Required value for 'query' is null
>  at com.dropbox.core.v2.files.SearchArg.(SearchArg.java:59) 
> ~[dropbox-core-sdk-3.0.4.jar:na]
>  at com.dropbox.core.v2.files.SearchArg.(SearchArg.java:93) 
> ~[dropbox-core-sdk-3.0.4.jar:na]
>  at 
> com.dropbox.core.v2.files.DbxUserFilesRequests.search(DbxUserFilesRequests.java:2416)
>  ~[dropbox-core-sdk-3.0.4.jar:na]
>  at 
> org.apache.camel.component.dropbox.core.DropboxAPIFacade.search(DropboxAPIFacade.java:270)
>  ~[camel-dropbox-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.component.dropbox.integration.producer.DropboxSearchProducer.process(DropboxSearchProducer.java:43)
>  ~[camel-dropbox-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
>  ~[camel-core-2.20.1.jar:2.20.1]
>  at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:148) 
> ~[camel-core-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:548)
>  ~[camel-core-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201)
>  [camel-core-2.20.1.jar:2.20.1]
>  at org.apache.camel.processor.Pipeline.process(Pipeline.java:138) 
> [camel-core-2.20.1.jar:2.20.1]
>  at org.apache.camel.processor.Pipeline.process(Pipeline.java:101) 
> [camel-core-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201)
>  [camel-core-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.component.direct.DirectProducer.process(DirectProducer.java:62)
>  [camel-core-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.processor.SharedCamelInternalProcessor.process(SharedCamelInternalProcessor.java:186)
>  [camel-core-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.processor.SharedCamelInternalProcessor.process(SharedCamelInternalProcessor.java:86)
>  [camel-core-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.impl.ProducerCache$1.doInProducer(ProducerCache.java:541) 
> [camel-core-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.impl.ProducerCache$1.doInProducer(ProducerCache.java:506) 
> [camel-core-2.20.1.jar:2.20.1]
>  at org.apache.camel.impl.ProducerCache.doInProducer(ProducerCache.java:369) 
> [camel-core-2.20.1.jar:2.20.1]
>  at org.apache.camel.impl.ProducerCache.sendExchange(ProducerCache.java:506) 
> [camel-core-2.20.1.jar:2.20.1]
>  at org.apache.camel.impl.ProducerCache.send(ProducerCache.java:229) 
> [camel-core-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.impl.DefaultProducerTemplate.send(DefaultProducerTemplate.java:144)
>  [camel-core-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.impl.DefaultProducerTemplate.sendBody(DefaultProducerTemplate.java:161)
>  [camel-core-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.impl.DefaultProducerTemplate.sendBody(DefaultProducerTemplate.java:370)
>  [camel-core-2.20.1.jar:2.20.1]{code}
> On the other hand, when I put query=* like this:
> {code:java}
> from("direct:dropboxSearch").to("dropbox://search?remotePath=/=*={{dropbox.key}}"){code}
> it throws:
> {code:java}
> org.apache.camel.component.dropbox.util.DropboxException: / does not exist or 
> can't obtain metadata
>  at 
> org.apache.camel.component.dropbox.core.DropboxAPIFacade.search(DropboxAPIFacade.java:283)
>  ~[camel-dropbox-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.component.dropbox.integration.producer.DropboxSearchProducer.process(DropboxSearchProducer.java:43)
>  ~[camel-dropbox-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
>  ~[camel-core-2.20.1.jar:2.20.1]
>  at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:148) 
> ~[camel-core-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:548)

[jira] [Resolved] (CAMEL-12176) Camel-Dropbox /search and /get are not working

2018-02-02 Thread Claus Ibsen (JIRA)

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

Claus Ibsen resolved CAMEL-12176.
-
Resolution: Fixed

> Camel-Dropbox /search and /get are not working
> --
>
> Key: CAMEL-12176
> URL: https://issues.apache.org/jira/browse/CAMEL-12176
> Project: Camel
>  Issue Type: Bug
>  Components: camel-dropbox
>Affects Versions: 2.20.1
>Reporter: Kamil
>Priority: Major
> Fix For: 2.20.3, 2.21.0
>
>
> First of all, 
> [documentation|https://github.com/apache/camel/blob/master/components/camel-dropbox/src/main/docs/dropbox-component.adoc]
>  states that "query" property in "search" operation is not mandatory, but:
> {code:java}
> from("direct:dropboxSearch").to("dropbox://search?remotePath=/={{dropbox.key}}"){code}
> throws:
> {code:java}
> java.lang.IllegalArgumentException: Required value for 'query' is null
>  at com.dropbox.core.v2.files.SearchArg.(SearchArg.java:59) 
> ~[dropbox-core-sdk-3.0.4.jar:na]
>  at com.dropbox.core.v2.files.SearchArg.(SearchArg.java:93) 
> ~[dropbox-core-sdk-3.0.4.jar:na]
>  at 
> com.dropbox.core.v2.files.DbxUserFilesRequests.search(DbxUserFilesRequests.java:2416)
>  ~[dropbox-core-sdk-3.0.4.jar:na]
>  at 
> org.apache.camel.component.dropbox.core.DropboxAPIFacade.search(DropboxAPIFacade.java:270)
>  ~[camel-dropbox-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.component.dropbox.integration.producer.DropboxSearchProducer.process(DropboxSearchProducer.java:43)
>  ~[camel-dropbox-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
>  ~[camel-core-2.20.1.jar:2.20.1]
>  at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:148) 
> ~[camel-core-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:548)
>  ~[camel-core-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201)
>  [camel-core-2.20.1.jar:2.20.1]
>  at org.apache.camel.processor.Pipeline.process(Pipeline.java:138) 
> [camel-core-2.20.1.jar:2.20.1]
>  at org.apache.camel.processor.Pipeline.process(Pipeline.java:101) 
> [camel-core-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201)
>  [camel-core-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.component.direct.DirectProducer.process(DirectProducer.java:62)
>  [camel-core-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.processor.SharedCamelInternalProcessor.process(SharedCamelInternalProcessor.java:186)
>  [camel-core-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.processor.SharedCamelInternalProcessor.process(SharedCamelInternalProcessor.java:86)
>  [camel-core-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.impl.ProducerCache$1.doInProducer(ProducerCache.java:541) 
> [camel-core-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.impl.ProducerCache$1.doInProducer(ProducerCache.java:506) 
> [camel-core-2.20.1.jar:2.20.1]
>  at org.apache.camel.impl.ProducerCache.doInProducer(ProducerCache.java:369) 
> [camel-core-2.20.1.jar:2.20.1]
>  at org.apache.camel.impl.ProducerCache.sendExchange(ProducerCache.java:506) 
> [camel-core-2.20.1.jar:2.20.1]
>  at org.apache.camel.impl.ProducerCache.send(ProducerCache.java:229) 
> [camel-core-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.impl.DefaultProducerTemplate.send(DefaultProducerTemplate.java:144)
>  [camel-core-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.impl.DefaultProducerTemplate.sendBody(DefaultProducerTemplate.java:161)
>  [camel-core-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.impl.DefaultProducerTemplate.sendBody(DefaultProducerTemplate.java:370)
>  [camel-core-2.20.1.jar:2.20.1]{code}
> On the other hand, when I put query=* like this:
> {code:java}
> from("direct:dropboxSearch").to("dropbox://search?remotePath=/=*={{dropbox.key}}"){code}
> it throws:
> {code:java}
> org.apache.camel.component.dropbox.util.DropboxException: / does not exist or 
> can't obtain metadata
>  at 
> org.apache.camel.component.dropbox.core.DropboxAPIFacade.search(DropboxAPIFacade.java:283)
>  ~[camel-dropbox-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.component.dropbox.integration.producer.DropboxSearchProducer.process(DropboxSearchProducer.java:43)
>  ~[camel-dropbox-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
>  ~[camel-core-2.20.1.jar:2.20.1]
>  at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:148) 
> ~[camel-core-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:548)
>  ~[camel-core-2.20.1.jar:2.20.1]
>  at 
> 

[jira] [Commented] (CAMEL-12180) camel-braintree - Downgrade to version without org.json

2018-02-02 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CAMEL-12180:


oscerd commented on issue #2205: CAMEL-12180 - upgrade Braintree Java SDK to 
version 2.75.0
URL: https://github.com/apache/camel/pull/2205#issuecomment-362535627
 
 
   Yeah, thanks. We just need the bundle now :-)


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


> camel-braintree - Downgrade to version without org.json
> ---
>
> Key: CAMEL-12180
> URL: https://issues.apache.org/jira/browse/CAMEL-12180
> Project: Camel
>  Issue Type: Task
>  Components: camel-braintree
>Affects Versions: 2.21.0
>Reporter: Claus Ibsen
>Assignee: Claus Ibsen
>Priority: Major
> Fix For: 2.21.0
>
>
> We cannot use newer version as it uses org.json JAR. 



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


[jira] [Commented] (CAMEL-12180) camel-braintree - Downgrade to version without org.json

2018-02-02 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CAMEL-12180:


nofuss commented on issue #2205: CAMEL-12180 - upgrade Braintree Java SDK to 
version 2.75.0
URL: https://github.com/apache/camel/pull/2205#issuecomment-362535410
 
 
   thanks to you - I was able to run the integration tests locally, and I think 
we're good to go


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


> camel-braintree - Downgrade to version without org.json
> ---
>
> Key: CAMEL-12180
> URL: https://issues.apache.org/jira/browse/CAMEL-12180
> Project: Camel
>  Issue Type: Task
>  Components: camel-braintree
>Affects Versions: 2.21.0
>Reporter: Claus Ibsen
>Assignee: Claus Ibsen
>Priority: Major
> Fix For: 2.21.0
>
>
> We cannot use newer version as it uses org.json JAR. 



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


[jira] [Commented] (CAMEL-12180) camel-braintree - Downgrade to version without org.json

2018-02-02 Thread Andrea Cosentino (JIRA)

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

Andrea Cosentino commented on CAMEL-12180:
--

We are on 2.75.0 now, lets wait for the bundle and we can close this JIRA

> camel-braintree - Downgrade to version without org.json
> ---
>
> Key: CAMEL-12180
> URL: https://issues.apache.org/jira/browse/CAMEL-12180
> Project: Camel
>  Issue Type: Task
>  Components: camel-braintree
>Affects Versions: 2.21.0
>Reporter: Claus Ibsen
>Assignee: Claus Ibsen
>Priority: Major
> Fix For: 2.21.0
>
>
> We cannot use newer version as it uses org.json JAR. 



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


[jira] [Commented] (CAMEL-12180) camel-braintree - Downgrade to version without org.json

2018-02-02 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CAMEL-12180:


Github user oscerd closed the pull request at:

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


> camel-braintree - Downgrade to version without org.json
> ---
>
> Key: CAMEL-12180
> URL: https://issues.apache.org/jira/browse/CAMEL-12180
> Project: Camel
>  Issue Type: Task
>  Components: camel-braintree
>Affects Versions: 2.21.0
>Reporter: Claus Ibsen
>Assignee: Claus Ibsen
>Priority: Major
> Fix For: 2.21.0
>
>
> We cannot use newer version as it uses org.json JAR. 



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


[jira] [Commented] (CAMEL-12180) camel-braintree - Downgrade to version without org.json

2018-02-02 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CAMEL-12180:


oscerd commented on issue #2205: CAMEL-12180 - upgrade Braintree Java SDK to 
version 2.75.0
URL: https://github.com/apache/camel/pull/2205#issuecomment-362534833
 
 
   Thanks for the PR, it has been merged.


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


> camel-braintree - Downgrade to version without org.json
> ---
>
> Key: CAMEL-12180
> URL: https://issues.apache.org/jira/browse/CAMEL-12180
> Project: Camel
>  Issue Type: Task
>  Components: camel-braintree
>Affects Versions: 2.21.0
>Reporter: Claus Ibsen
>Assignee: Claus Ibsen
>Priority: Major
> Fix For: 2.21.0
>
>
> We cannot use newer version as it uses org.json JAR. 



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


[jira] [Commented] (CAMEL-12180) camel-braintree - Downgrade to version without org.json

2018-02-02 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CAMEL-12180:


oscerd closed pull request #2205: CAMEL-12180 - upgrade Braintree Java SDK to 
version 2.75.0
URL: https://github.com/apache/camel/pull/2205
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/parent/pom.xml b/parent/pom.xml
index 83c397af136..cc03fe277e5 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -97,8 +97,7 @@
 1.57
 3.2.1
 2.10.0
-
-2.72.1
+2.75.0
 4.13.4
 1.10
 0.9.5.2


 


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


> camel-braintree - Downgrade to version without org.json
> ---
>
> Key: CAMEL-12180
> URL: https://issues.apache.org/jira/browse/CAMEL-12180
> Project: Camel
>  Issue Type: Task
>  Components: camel-braintree
>Affects Versions: 2.21.0
>Reporter: Claus Ibsen
>Assignee: Claus Ibsen
>Priority: Major
> Fix For: 2.21.0
>
>
> We cannot use newer version as it uses org.json JAR. 



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


[jira] [Commented] (CAMEL-12180) camel-braintree - Downgrade to version without org.json

2018-02-02 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CAMEL-12180:


GitHub user nofuss opened a pull request:

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

CAMEL-12180 - upgrade Braintree Java SDK to version 2.75.0

Upgrade Braintree Java SDK to version 2.75.0. Previous versions used the 
org.json library, whose license has been deemed x-category by the ASF, and 
cannot be used at all.

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

$ git pull https://github.com/nofuss/camel CAMEL-12180

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

https://github.com/apache/camel/pull/2205.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 #2205


commit 18d1ca3902b235c66bbcbb3c3b630a3ff84f6d66
Author: Russ Johnson 
Date:   2018-02-02T09:29:59Z

CAMEL-12180 - upgrade Braintree Java SDK to version 2.75.0




> camel-braintree - Downgrade to version without org.json
> ---
>
> Key: CAMEL-12180
> URL: https://issues.apache.org/jira/browse/CAMEL-12180
> Project: Camel
>  Issue Type: Task
>  Components: camel-braintree
>Affects Versions: 2.21.0
>Reporter: Claus Ibsen
>Assignee: Claus Ibsen
>Priority: Major
> Fix For: 2.21.0
>
>
> We cannot use newer version as it uses org.json JAR. 



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


[jira] [Commented] (CAMEL-12180) camel-braintree - Downgrade to version without org.json

2018-02-02 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CAMEL-12180:


nofuss opened a new pull request #2205: CAMEL-12180 - upgrade Braintree Java 
SDK to version 2.75.0
URL: https://github.com/apache/camel/pull/2205
 
 
   Upgrade Braintree Java SDK to version 2.75.0. Previous versions used the 
org.json library, whose license has been deemed x-category by the ASF, and 
cannot be used at all.


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


> camel-braintree - Downgrade to version without org.json
> ---
>
> Key: CAMEL-12180
> URL: https://issues.apache.org/jira/browse/CAMEL-12180
> Project: Camel
>  Issue Type: Task
>  Components: camel-braintree
>Affects Versions: 2.21.0
>Reporter: Claus Ibsen
>Assignee: Claus Ibsen
>Priority: Major
> Fix For: 2.21.0
>
>
> We cannot use newer version as it uses org.json JAR. 



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


[jira] [Updated] (CAMEL-12224) Camel-Elasticsearch5-rest: deprecate camel-elasticsearch5 in favor of this component, rename it and upgrade it to support ES 6.x

2018-02-02 Thread Andrea Cosentino (JIRA)

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

Andrea Cosentino updated CAMEL-12224:
-
Component/s: camel-elasticsearch5-rest
 camel-elasticsearch5

> Camel-Elasticsearch5-rest: deprecate camel-elasticsearch5 in favor of this 
> component, rename it and upgrade it to support ES 6.x
> 
>
> Key: CAMEL-12224
> URL: https://issues.apache.org/jira/browse/CAMEL-12224
> Project: Camel
>  Issue Type: Task
>  Components: camel-elasticsearch5, camel-elasticsearch5-rest
>Reporter: Andrea Cosentino
>Assignee: Andrea Cosentino
>Priority: Major
> Fix For: 2.21.0
>
>




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


[jira] [Created] (CAMEL-12224) Camel-Elasticsearch5-rest: deprecate camel-elasticsearch5 in favor of this component, rename it and upgrade it to support ES 6.x

2018-02-02 Thread Andrea Cosentino (JIRA)
Andrea Cosentino created CAMEL-12224:


 Summary: Camel-Elasticsearch5-rest: deprecate camel-elasticsearch5 
in favor of this component, rename it and upgrade it to support ES 6.x
 Key: CAMEL-12224
 URL: https://issues.apache.org/jira/browse/CAMEL-12224
 Project: Camel
  Issue Type: Task
Reporter: Andrea Cosentino
Assignee: Andrea Cosentino
 Fix For: 2.21.0






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


[jira] [Commented] (CAMEL-12034) camel-elasticsearch5 - Search Operation: If Map or String is used in Message Body, "size" and "from" parameters are always ignored

2018-02-02 Thread Andrea Cosentino (JIRA)

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

Andrea Cosentino commented on CAMEL-12034:
--

I'm raising a new Jira for this.

> camel-elasticsearch5 - Search Operation: If Map or String is used in Message 
> Body, "size" and "from" parameters are always ignored
> --
>
> Key: CAMEL-12034
> URL: https://issues.apache.org/jira/browse/CAMEL-12034
> Project: Camel
>  Issue Type: Bug
>  Components: camel-elasticsearch5
>Affects Versions: 2.20.1
>Reporter: Radoslav Cincala
>Assignee: Andrea Cosentino
>Priority: Minor
> Fix For: 2.20.3, 2.21.0
>
>
> Hi,
> I am using camel-elasticsearch5 component of Camel 2.20.1.
> I have found and issue. The description follows.
> *If you use Map or String in message body for SEARCH operation, "size" and 
> "from" parameters are always ignored hence you always get just default 10 
> results.*
> For example - if your map contains query like this: 
> (in terms of simplicity - following is String representation of the map):
> {code}
> {size=50, query={query_string={query=status:ACTIVE}}, from=0}
> {code}
> Issue I suspect is present in class: 
> _org.apache.camel.component.elasticsearch5.converter.ElasticsearchActionRequestConverter_
> and its method 
> _public static SearchRequest toSearchRequest(Object queryObject, Exchange 
> exchange)_
> {code}
> // line 191...
> if (queryObject instanceof Map) {
> Map mapQuery = (Map)queryObject;
> // Remove 'query' prefix from the query object for backward 
> compatibility
> if 
> (mapQuery.containsKey(ElasticsearchConstants.ES_QUERY_DSL_PREFIX)) {
> mapQuery = (Map Object>)mapQuery.get(ElasticsearchConstants.ES_QUERY_DSL_PREFIX);
> }
> try {
> XContentBuilder contentBuilder = 
> XContentFactory.contentBuilder(XContentType.JSON);
> queryText = contentBuilder.map(mapQuery).string();
> } catch (IOException e) {
> LOG.error(e.getMessage());
> }
> }
> // queryText then used on line 220...
> searchSourceBuilder.query(QueryBuilders.wrapperQuery(queryText));
> searchRequest.source(searchSourceBuilder);
> return searchRequest;
> {code}
> Inner if condition basically extracts only query part from the map 
> {code}
> query={query_string={query=status:ACTIVE}
> {code}
> and *"size" and "from" get lost from the query*
> {code}
> // line 194...
> if (mapQuery.containsKey(ElasticsearchConstants.ES_QUERY_DSL_PREFIX)) {
> mapQuery = (Map Object>)mapQuery.get(ElasticsearchConstants.ES_QUERY_DSL_PREFIX);
> // ...where ElasticsearchConstants.ES_QUERY_DSL_PREFIX = "query"
> }
> {code}
> Same issue is with usage of the String in the message body:
> {code}
> // line 203
> } else if (queryObject instanceof String) {
> queryText = (String)queryObject;
> ObjectMapper mapper = new ObjectMapper();
> try {
> JsonNode jsonTextObject = mapper.readValue(queryText, 
> JsonNode.class);
> JsonNode parentJsonNode = 
> jsonTextObject.get(ElasticsearchConstants.ES_QUERY_DSL_PREFIX);
> if (parentJsonNode != null) {
> queryText = parentJsonNode.toString();
> }
> } catch (IOException e) {
> LOG.error(e.getMessage());
> }
> }
> {code}
> Only workaround for this is to use *SearchRequest* object in a message body 
> where you can explicitly set "size" and "from" on SearchSourceBuilder object. 
> For example:
> {code}
> SearchRequest searchRequest = new SearchRequest("my_index")
> .types("my_type")
> .source(new 
> SearchSourceBuilder().query(QueryBuilders.wrapperQuery("my:query"))
> .size(50).from(0));
> {code}
> I don't know what was the developer's intention for having such a condition 
> which removes these parameters from the query.
> Thank you very much in advance if anybody can have a look and verify if this 
> is a valid concern.



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


[jira] [Commented] (CAMEL-12034) camel-elasticsearch5 - Search Operation: If Map or String is used in Message Body, "size" and "from" parameters are always ignored

2018-02-02 Thread Claus Ibsen (JIRA)

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

Claus Ibsen commented on CAMEL-12034:
-

Yeah lets do that

> camel-elasticsearch5 - Search Operation: If Map or String is used in Message 
> Body, "size" and "from" parameters are always ignored
> --
>
> Key: CAMEL-12034
> URL: https://issues.apache.org/jira/browse/CAMEL-12034
> Project: Camel
>  Issue Type: Bug
>  Components: camel-elasticsearch5
>Affects Versions: 2.20.1
>Reporter: Radoslav Cincala
>Assignee: Andrea Cosentino
>Priority: Minor
> Fix For: 2.20.3, 2.21.0
>
>
> Hi,
> I am using camel-elasticsearch5 component of Camel 2.20.1.
> I have found and issue. The description follows.
> *If you use Map or String in message body for SEARCH operation, "size" and 
> "from" parameters are always ignored hence you always get just default 10 
> results.*
> For example - if your map contains query like this: 
> (in terms of simplicity - following is String representation of the map):
> {code}
> {size=50, query={query_string={query=status:ACTIVE}}, from=0}
> {code}
> Issue I suspect is present in class: 
> _org.apache.camel.component.elasticsearch5.converter.ElasticsearchActionRequestConverter_
> and its method 
> _public static SearchRequest toSearchRequest(Object queryObject, Exchange 
> exchange)_
> {code}
> // line 191...
> if (queryObject instanceof Map) {
> Map mapQuery = (Map)queryObject;
> // Remove 'query' prefix from the query object for backward 
> compatibility
> if 
> (mapQuery.containsKey(ElasticsearchConstants.ES_QUERY_DSL_PREFIX)) {
> mapQuery = (Map Object>)mapQuery.get(ElasticsearchConstants.ES_QUERY_DSL_PREFIX);
> }
> try {
> XContentBuilder contentBuilder = 
> XContentFactory.contentBuilder(XContentType.JSON);
> queryText = contentBuilder.map(mapQuery).string();
> } catch (IOException e) {
> LOG.error(e.getMessage());
> }
> }
> // queryText then used on line 220...
> searchSourceBuilder.query(QueryBuilders.wrapperQuery(queryText));
> searchRequest.source(searchSourceBuilder);
> return searchRequest;
> {code}
> Inner if condition basically extracts only query part from the map 
> {code}
> query={query_string={query=status:ACTIVE}
> {code}
> and *"size" and "from" get lost from the query*
> {code}
> // line 194...
> if (mapQuery.containsKey(ElasticsearchConstants.ES_QUERY_DSL_PREFIX)) {
> mapQuery = (Map Object>)mapQuery.get(ElasticsearchConstants.ES_QUERY_DSL_PREFIX);
> // ...where ElasticsearchConstants.ES_QUERY_DSL_PREFIX = "query"
> }
> {code}
> Same issue is with usage of the String in the message body:
> {code}
> // line 203
> } else if (queryObject instanceof String) {
> queryText = (String)queryObject;
> ObjectMapper mapper = new ObjectMapper();
> try {
> JsonNode jsonTextObject = mapper.readValue(queryText, 
> JsonNode.class);
> JsonNode parentJsonNode = 
> jsonTextObject.get(ElasticsearchConstants.ES_QUERY_DSL_PREFIX);
> if (parentJsonNode != null) {
> queryText = parentJsonNode.toString();
> }
> } catch (IOException e) {
> LOG.error(e.getMessage());
> }
> }
> {code}
> Only workaround for this is to use *SearchRequest* object in a message body 
> where you can explicitly set "size" and "from" on SearchSourceBuilder object. 
> For example:
> {code}
> SearchRequest searchRequest = new SearchRequest("my_index")
> .types("my_type")
> .source(new 
> SearchSourceBuilder().query(QueryBuilders.wrapperQuery("my:query"))
> .size(50).from(0));
> {code}
> I don't know what was the developer's intention for having such a condition 
> which removes these parameters from the query.
> Thank you very much in advance if anybody can have a look and verify if this 
> is a valid concern.



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


[jira] [Commented] (CAMEL-12034) camel-elasticsearch5 - Search Operation: If Map or String is used in Message Body, "size" and "from" parameters are always ignored

2018-02-02 Thread Andrea Cosentino (JIRA)

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

Andrea Cosentino commented on CAMEL-12034:
--

Since we need to deprecate this component in favor of the rest one and rename 
it to elasticsearch-rest, do we really need to do this? I believe we need to 
update the rest stuff to version 6.1.x and deprecate elasticsearch5 before the 
2.21.0 release.

> camel-elasticsearch5 - Search Operation: If Map or String is used in Message 
> Body, "size" and "from" parameters are always ignored
> --
>
> Key: CAMEL-12034
> URL: https://issues.apache.org/jira/browse/CAMEL-12034
> Project: Camel
>  Issue Type: Bug
>  Components: camel-elasticsearch5
>Affects Versions: 2.20.1
>Reporter: Radoslav Cincala
>Assignee: Andrea Cosentino
>Priority: Minor
> Fix For: 2.20.3, 2.21.0
>
>
> Hi,
> I am using camel-elasticsearch5 component of Camel 2.20.1.
> I have found and issue. The description follows.
> *If you use Map or String in message body for SEARCH operation, "size" and 
> "from" parameters are always ignored hence you always get just default 10 
> results.*
> For example - if your map contains query like this: 
> (in terms of simplicity - following is String representation of the map):
> {code}
> {size=50, query={query_string={query=status:ACTIVE}}, from=0}
> {code}
> Issue I suspect is present in class: 
> _org.apache.camel.component.elasticsearch5.converter.ElasticsearchActionRequestConverter_
> and its method 
> _public static SearchRequest toSearchRequest(Object queryObject, Exchange 
> exchange)_
> {code}
> // line 191...
> if (queryObject instanceof Map) {
> Map mapQuery = (Map)queryObject;
> // Remove 'query' prefix from the query object for backward 
> compatibility
> if 
> (mapQuery.containsKey(ElasticsearchConstants.ES_QUERY_DSL_PREFIX)) {
> mapQuery = (Map Object>)mapQuery.get(ElasticsearchConstants.ES_QUERY_DSL_PREFIX);
> }
> try {
> XContentBuilder contentBuilder = 
> XContentFactory.contentBuilder(XContentType.JSON);
> queryText = contentBuilder.map(mapQuery).string();
> } catch (IOException e) {
> LOG.error(e.getMessage());
> }
> }
> // queryText then used on line 220...
> searchSourceBuilder.query(QueryBuilders.wrapperQuery(queryText));
> searchRequest.source(searchSourceBuilder);
> return searchRequest;
> {code}
> Inner if condition basically extracts only query part from the map 
> {code}
> query={query_string={query=status:ACTIVE}
> {code}
> and *"size" and "from" get lost from the query*
> {code}
> // line 194...
> if (mapQuery.containsKey(ElasticsearchConstants.ES_QUERY_DSL_PREFIX)) {
> mapQuery = (Map Object>)mapQuery.get(ElasticsearchConstants.ES_QUERY_DSL_PREFIX);
> // ...where ElasticsearchConstants.ES_QUERY_DSL_PREFIX = "query"
> }
> {code}
> Same issue is with usage of the String in the message body:
> {code}
> // line 203
> } else if (queryObject instanceof String) {
> queryText = (String)queryObject;
> ObjectMapper mapper = new ObjectMapper();
> try {
> JsonNode jsonTextObject = mapper.readValue(queryText, 
> JsonNode.class);
> JsonNode parentJsonNode = 
> jsonTextObject.get(ElasticsearchConstants.ES_QUERY_DSL_PREFIX);
> if (parentJsonNode != null) {
> queryText = parentJsonNode.toString();
> }
> } catch (IOException e) {
> LOG.error(e.getMessage());
> }
> }
> {code}
> Only workaround for this is to use *SearchRequest* object in a message body 
> where you can explicitly set "size" and "from" on SearchSourceBuilder object. 
> For example:
> {code}
> SearchRequest searchRequest = new SearchRequest("my_index")
> .types("my_type")
> .source(new 
> SearchSourceBuilder().query(QueryBuilders.wrapperQuery("my:query"))
> .size(50).from(0));
> {code}
> I don't know what was the developer's intention for having such a condition 
> which removes these parameters from the query.
> Thank you very much in advance if anybody can have a look and verify if this 
> is a valid concern.



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


[jira] [Updated] (CAMEL-12034) camel-elasticsearch5 - Search Operation: If Map or String is used in Message Body, "size" and "from" parameters are always ignored

2018-02-02 Thread Claus Ibsen (JIRA)

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

Claus Ibsen updated CAMEL-12034:

Summary: camel-elasticsearch5 - Search Operation: If Map or String is used 
in Message Body, "size" and "from" parameters are always ignored  (was: Search 
Operation: If Map or String is used in Message Body, "size" and "from" 
parameters are always ignored (lost while conversion).)

> camel-elasticsearch5 - Search Operation: If Map or String is used in Message 
> Body, "size" and "from" parameters are always ignored
> --
>
> Key: CAMEL-12034
> URL: https://issues.apache.org/jira/browse/CAMEL-12034
> Project: Camel
>  Issue Type: Bug
>  Components: camel-elasticsearch5
>Affects Versions: 2.20.1
>Reporter: Radoslav Cincala
>Assignee: Andrea Cosentino
>Priority: Minor
> Fix For: 2.20.3, 2.21.0
>
>
> Hi,
> I am using camel-elasticsearch5 component of Camel 2.20.1.
> I have found and issue. The description follows.
> *If you use Map or String in message body for SEARCH operation, "size" and 
> "from" parameters are always ignored hence you always get just default 10 
> results.*
> For example - if your map contains query like this: 
> (in terms of simplicity - following is String representation of the map):
> {code}
> {size=50, query={query_string={query=status:ACTIVE}}, from=0}
> {code}
> Issue I suspect is present in class: 
> _org.apache.camel.component.elasticsearch5.converter.ElasticsearchActionRequestConverter_
> and its method 
> _public static SearchRequest toSearchRequest(Object queryObject, Exchange 
> exchange)_
> {code}
> // line 191...
> if (queryObject instanceof Map) {
> Map mapQuery = (Map)queryObject;
> // Remove 'query' prefix from the query object for backward 
> compatibility
> if 
> (mapQuery.containsKey(ElasticsearchConstants.ES_QUERY_DSL_PREFIX)) {
> mapQuery = (Map Object>)mapQuery.get(ElasticsearchConstants.ES_QUERY_DSL_PREFIX);
> }
> try {
> XContentBuilder contentBuilder = 
> XContentFactory.contentBuilder(XContentType.JSON);
> queryText = contentBuilder.map(mapQuery).string();
> } catch (IOException e) {
> LOG.error(e.getMessage());
> }
> }
> // queryText then used on line 220...
> searchSourceBuilder.query(QueryBuilders.wrapperQuery(queryText));
> searchRequest.source(searchSourceBuilder);
> return searchRequest;
> {code}
> Inner if condition basically extracts only query part from the map 
> {code}
> query={query_string={query=status:ACTIVE}
> {code}
> and *"size" and "from" get lost from the query*
> {code}
> // line 194...
> if (mapQuery.containsKey(ElasticsearchConstants.ES_QUERY_DSL_PREFIX)) {
> mapQuery = (Map Object>)mapQuery.get(ElasticsearchConstants.ES_QUERY_DSL_PREFIX);
> // ...where ElasticsearchConstants.ES_QUERY_DSL_PREFIX = "query"
> }
> {code}
> Same issue is with usage of the String in the message body:
> {code}
> // line 203
> } else if (queryObject instanceof String) {
> queryText = (String)queryObject;
> ObjectMapper mapper = new ObjectMapper();
> try {
> JsonNode jsonTextObject = mapper.readValue(queryText, 
> JsonNode.class);
> JsonNode parentJsonNode = 
> jsonTextObject.get(ElasticsearchConstants.ES_QUERY_DSL_PREFIX);
> if (parentJsonNode != null) {
> queryText = parentJsonNode.toString();
> }
> } catch (IOException e) {
> LOG.error(e.getMessage());
> }
> }
> {code}
> Only workaround for this is to use *SearchRequest* object in a message body 
> where you can explicitly set "size" and "from" on SearchSourceBuilder object. 
> For example:
> {code}
> SearchRequest searchRequest = new SearchRequest("my_index")
> .types("my_type")
> .source(new 
> SearchSourceBuilder().query(QueryBuilders.wrapperQuery("my:query"))
> .size(50).from(0));
> {code}
> I don't know what was the developer's intention for having such a condition 
> which removes these parameters from the query.
> Thank you very much in advance if anybody can have a look and verify if this 
> is a valid concern.



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


[jira] [Resolved] (CAMEL-11530) RabbitMQ component doesn't handle network failure properly when using autoAck=false and automaticRecovery=true

2018-02-02 Thread Claus Ibsen (JIRA)

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

Claus Ibsen resolved CAMEL-11530.
-
Resolution: Implemented
  Assignee: Claus Ibsen

There has been a bunch of fixed on camel-rabbitmq. Try with latest releases.

> RabbitMQ component doesn't handle network failure properly when using 
> autoAck=false and automaticRecovery=true
> --
>
> Key: CAMEL-11530
> URL: https://issues.apache.org/jira/browse/CAMEL-11530
> Project: Camel
>  Issue Type: Bug
>  Components: camel-rabbitmq
>Affects Versions: 2.17.6
> Environment: RabbitMQ 3.5.7
>Reporter: Arnaud CHOTARD
>Assignee: Claus Ibsen
>Priority: Major
> Attachments: channel.png, connections.png, jmx.png, queue.png
>
>
> When using autoAck=false and automaticRecoveryEnabled=true on Camel RabbitMQ 
> consumer, we are facing problem during network failure recovery on our 
> production environments.
> Before CAMEL-8742, tested with Camel 2.16.2, the automatic recovery is 
> managed directly by RabbitMQ native client. When network failure is 
> recovering, the old channel is reconnect and messages are proccessed 
> correctly. 
> After CAMEL-8742, tested with Camel 2.17.6, the Camel RabbitMQ component open 
> new channel when network failure is recovering. On the other hand, RabbitMQ 
> native client will also reconnect old channels when using 
> automaticRecoveryEnabled=true. So two channel are now open. The two recovery 
> method make conflict. As consequence, new messages publish in RabbitMQ remain 
> unacked and the Camel exchange are not processing on Camel route. 
> To recover from this, we should delete, recreate the queue in production 
> environment and restart Camel application. So, the unacked messages are being 
> lost.
> What do you think of this problem ?
> Thank you
> Camel RabbitMQ Consumer Route :
> {code:java}
> from("rabbitmq:///?" + 
>   "connectionFactory=#brokerConnectionFactory" + 
>   "=" + brokerAdresses + 
>   "="+ brokerQueue +
>   "=false" + 
>   "=false" +
>   "=false"
>   )
>   .bean("", "");
> {code}
> RabbitMQ Connection Factory with automaticRecoveryEnabled=true
> {code}
>  class="com.rabbitmq.client.ConnectionFactory">
> 
> 
> 
> 
> 
> 
> 
> {code}



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


[jira] [Updated] (CAMEL-11708) spring boot code generation: the nested property processor does not handle object hierarchies

2018-02-02 Thread Claus Ibsen (JIRA)

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

Claus Ibsen updated CAMEL-11708:

Fix Version/s: (was: 2.21.0)
   2.22.0

> spring boot code generation: the nested property processor does not handle 
> object hierarchies
> -
>
> Key: CAMEL-11708
> URL: https://issues.apache.org/jira/browse/CAMEL-11708
> Project: Camel
>  Issue Type: Improvement
>  Components: tooling
>Reporter: Luca Burgazzoli
>Priority: Major
> Fix For: 2.22.0
>
>
> Assuming you have complex configuration object that inherits from another 
> configuration object, the spring boot code generation will creates the 
> configuration properties object only for the properties of the last class so 
> i.e. for a simple hierarchy like:
> {code}
> Common {
> String getX()
> void setX(String);
> }
> Specific extends Common {
> String getY()
> void setY(String);
> }
> {code}
> the generator will provides bindings only for
> {code}
> String getX()
> setX(String)
> {code}



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


[jira] [Updated] (CAMEL-11530) RabbitMQ component doesn't handle network failure properly when using autoAck=false and automaticRecovery=true

2018-02-02 Thread Claus Ibsen (JIRA)

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

Claus Ibsen updated CAMEL-11530:

Fix Version/s: 2.21.0

> RabbitMQ component doesn't handle network failure properly when using 
> autoAck=false and automaticRecovery=true
> --
>
> Key: CAMEL-11530
> URL: https://issues.apache.org/jira/browse/CAMEL-11530
> Project: Camel
>  Issue Type: Bug
>  Components: camel-rabbitmq
>Affects Versions: 2.17.6
> Environment: RabbitMQ 3.5.7
>Reporter: Arnaud CHOTARD
>Assignee: Claus Ibsen
>Priority: Major
> Fix For: 2.21.0
>
> Attachments: channel.png, connections.png, jmx.png, queue.png
>
>
> When using autoAck=false and automaticRecoveryEnabled=true on Camel RabbitMQ 
> consumer, we are facing problem during network failure recovery on our 
> production environments.
> Before CAMEL-8742, tested with Camel 2.16.2, the automatic recovery is 
> managed directly by RabbitMQ native client. When network failure is 
> recovering, the old channel is reconnect and messages are proccessed 
> correctly. 
> After CAMEL-8742, tested with Camel 2.17.6, the Camel RabbitMQ component open 
> new channel when network failure is recovering. On the other hand, RabbitMQ 
> native client will also reconnect old channels when using 
> automaticRecoveryEnabled=true. So two channel are now open. The two recovery 
> method make conflict. As consequence, new messages publish in RabbitMQ remain 
> unacked and the Camel exchange are not processing on Camel route. 
> To recover from this, we should delete, recreate the queue in production 
> environment and restart Camel application. So, the unacked messages are being 
> lost.
> What do you think of this problem ?
> Thank you
> Camel RabbitMQ Consumer Route :
> {code:java}
> from("rabbitmq:///?" + 
>   "connectionFactory=#brokerConnectionFactory" + 
>   "=" + brokerAdresses + 
>   "="+ brokerQueue +
>   "=false" + 
>   "=false" +
>   "=false"
>   )
>   .bean("", "");
> {code}
> RabbitMQ Connection Factory with automaticRecoveryEnabled=true
> {code}
>  class="com.rabbitmq.client.ConnectionFactory">
> 
> 
> 
> 
> 
> 
> 
> {code}



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


[jira] [Updated] (CAMEL-11708) spring boot code generation: the nested property processor does not handle object hierarchies

2018-02-02 Thread Claus Ibsen (JIRA)

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

Claus Ibsen updated CAMEL-11708:

Issue Type: Improvement  (was: Bug)

> spring boot code generation: the nested property processor does not handle 
> object hierarchies
> -
>
> Key: CAMEL-11708
> URL: https://issues.apache.org/jira/browse/CAMEL-11708
> Project: Camel
>  Issue Type: Improvement
>  Components: tooling
>Reporter: Luca Burgazzoli
>Priority: Major
> Fix For: 2.22.0
>
>
> Assuming you have complex configuration object that inherits from another 
> configuration object, the spring boot code generation will creates the 
> configuration properties object only for the properties of the last class so 
> i.e. for a simple hierarchy like:
> {code}
> Common {
> String getX()
> void setX(String);
> }
> Specific extends Common {
> String getY()
> void setY(String);
> }
> {code}
> the generator will provides bindings only for
> {code}
> String getX()
> setX(String)
> {code}



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


[jira] [Commented] (CAMEL-10360) IllegalStateException when mina buffer contains duplicate MLLP end bytes

2018-02-02 Thread Claus Ibsen (JIRA)

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

Claus Ibsen commented on CAMEL-10360:
-

I suggest to use the newer camel-mllp component which is more hardened

> IllegalStateException when mina buffer contains duplicate MLLP end bytes
> 
>
> Key: CAMEL-10360
> URL: https://issues.apache.org/jira/browse/CAMEL-10360
> Project: Camel
>  Issue Type: Bug
>  Components: camel-hl7
>Affects Versions: 2.17.3, 2.18.1
>Reporter: Gijsbert van den Brink
>Priority: Minor
> Attachments: CAMEL10360Test.java
>
>
> We're occasionally seeing the following Mina exception on our production 
> environment: "IllegalStateException: doDecode() can't return true when buffer 
> is not consumed." (full stack trace below)
> I haven't been able to reproduce the issue, and I don't fully understand the 
> problem, but I think it's caused by duplicate messages (or specifically 
> duplicate end byte markers) in the Mina IoBuffer that is read by Camel's 
> HL7MLLPDecoder.
> Full stack trace (with truncated hex dump):
> org.apache.camel.CamelExchangeException: Error occurred in ResponseHandler. 
> Exchange[ID-prdvpn01-zd-messaging-37296-1475153396916-0-335909]. Caused by: 
> [org.apache.mina.filter.codec.ProtocolDecoderException - 
> java.lang.IllegalStateException: doDecode() can't return true when buffer is 
> not consumed. (Hexdump: 0B 4D 53 48 ... 0D 1C 0D 0B 4D 53 48 ... 0D 1C 0D)]
>   at 
> org.apache.camel.component.mina2.Mina2Producer.doProcess(Mina2Producer.java:178)
>   at 
> org.apache.camel.component.mina2.Mina2Producer.process(Mina2Producer.java:116)
>   at 
> org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
>   at 
> org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:468)
>   at 
> org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:197)
>   at 
> org.apache.camel.processor.MulticastProcessor.doProcessSequential(MulticastProcessor.java:681)
>   at 
> org.apache.camel.processor.MulticastProcessor.doProcessSequential(MulticastProcessor.java:609)
>   at 
> org.apache.camel.processor.MulticastProcessor.process(MulticastProcessor.java:238)
>   at 
> org.apache.camel.processor.RecipientList.sendToRecipientList(RecipientList.java:170)
>   at 
> org.apache.camel.processor.RecipientList.process(RecipientList.java:131)
>   at org.apache.camel.processor.Pipeline.process(Pipeline.java:121)
>   at org.apache.camel.processor.Pipeline.process(Pipeline.java:83)
>   at 
> org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:468)
>   at 
> org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:197)
>   at org.apache.camel.processor.Pipeline.process(Pipeline.java:121)
>   at org.apache.camel.processor.Pipeline.process(Pipeline.java:83)
>   at 
> org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:197)
>   at 
> org.apache.camel.component.direct.DirectProducer.process(DirectProducer.java:62)
>   at 
> org.apache.camel.processor.SendProcessor.process(SendProcessor.java:145)
>   at 
> org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:468)
>   at 
> org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:197)
>   at 
> org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:197)
>   at 
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:109)
>   at 
> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:91)
>   at 
> org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:112)
>   at 
> org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:721)
>   at 
> org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:681)
>   at 
> org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:651)
>   at 
> org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:315)
>   at 
> org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:233)
>   at 
> 

[jira] [Commented] (CAMEL-12180) camel-braintree - Downgrade to version without org.json

2018-02-02 Thread Andrea Cosentino (JIRA)

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

Andrea Cosentino commented on CAMEL-12180:
--

The bundle is on his way. So we can upgrade only the jar for the moment and I 
take care of the Karaf feature after SMX bundles release.

> camel-braintree - Downgrade to version without org.json
> ---
>
> Key: CAMEL-12180
> URL: https://issues.apache.org/jira/browse/CAMEL-12180
> Project: Camel
>  Issue Type: Task
>  Components: camel-braintree
>Affects Versions: 2.21.0
>Reporter: Claus Ibsen
>Assignee: Claus Ibsen
>Priority: Major
> Fix For: 2.21.0
>
>
> We cannot use newer version as it uses org.json JAR. 



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


[jira] [Commented] (CAMEL-12180) camel-braintree - Downgrade to version without org.json

2018-02-02 Thread Claus Ibsen (JIRA)

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

Claus Ibsen commented on CAMEL-12180:
-

Okay the 2.75.0 release is now in maven central. Russ you are welcome to 
provide a PR

> camel-braintree - Downgrade to version without org.json
> ---
>
> Key: CAMEL-12180
> URL: https://issues.apache.org/jira/browse/CAMEL-12180
> Project: Camel
>  Issue Type: Task
>  Components: camel-braintree
>Affects Versions: 2.21.0
>Reporter: Claus Ibsen
>Assignee: Claus Ibsen
>Priority: Major
> Fix For: 2.21.0
>
>
> We cannot use newer version as it uses org.json JAR. 



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


[jira] [Commented] (CAMEL-12114) Have XmlLineNumberParser respecting namespace uri

2018-02-02 Thread Claus Ibsen (JIRA)

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

Claus Ibsen commented on CAMEL-12114:
-

You are welcome to work on a PR

> Have XmlLineNumberParser respecting namespace uri
> -
>
> Key: CAMEL-12114
> URL: https://issues.apache.org/jira/browse/CAMEL-12114
> Project: Camel
>  Issue Type: Improvement
>  Components: tooling
>Affects Versions: 2.20.1
>Reporter: Aurelien Pupier
>Priority: Minor
>
> when javax.xml.parsers.DocumentBuilderFactory.setNamespaceAware(boolean) is 
> [set to 
> true|https://github.com/apache/camel/blob/f980e6b3d88f5ebb9e604aabc44315fa01a9e486/tooling/camel-route-parser/src/main/java/org/apache/camel/parser/helper/XmlLineNumberParser.java#L87],
>  the namespace uris is supposed to be set on all nodes (when there is one)
> i think that it should be done 
> [here|https://github.com/apache/camel/blob/f980e6b3d88f5ebb9e604aabc44315fa01a9e486/tooling/camel-route-parser/src/main/java/org/apache/camel/parser/helper/XmlLineNumberParser.java#L133].
> it will also avoid to have to "forcenameSpace" see 
> [here|https://github.com/apache/camel/blob/f980e6b3d88f5ebb9e604aabc44315fa01a9e486/tooling/camel-route-parser/src/main/java/org/apache/camel/parser/helper/XmlLineNumberParser.java#L79]



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


[jira] [Resolved] (CAMEL-11996) RabbitConsumer could hang when RabbitMQ connection is lost and autoAck=false.

2018-02-02 Thread Claus Ibsen (JIRA)

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

Claus Ibsen resolved CAMEL-11996.
-
Resolution: Fixed

> RabbitConsumer could hang when RabbitMQ connection is lost and autoAck=false.
> -
>
> Key: CAMEL-11996
> URL: https://issues.apache.org/jira/browse/CAMEL-11996
> Project: Camel
>  Issue Type: Bug
>  Components: camel-rabbitmq
>Affects Versions: 2.18.0, 2.19.0, 2.20.0
>Reporter: Joel Mongård
>Assignee: Claus Ibsen
>Priority: Major
> Fix For: 2.19.5, 2.20.3, 2.21.0
>
>
> When the connection is lost to a RabbitMQ server and later restored there is 
> the possibility that the RabbitConsumer hangs. The only way around this that 
> I found is to restart my application. 
> I have experienced this problem in my testing environment running camel 
> 2.18.3 where my RabbitMQ installation is not stable causing every consumer 
> thread to hang on _lock.acquire()_ .
> The problem has been introduced in version 2.18.0 commit 
> 7ee0977c9f5c327a95122f5b80202dc5dd872e40
> A possible fix could be to include the statement _if (!channel.isOpen()) 
> return;_ in the try-finally block below it.
> {code:title=JUnit test}
> package org.apache.camel.component.rabbitmq;
> import org.junit.Test;
> import org.mockito.Mockito;
> import com.rabbitmq.client.Channel;
> import com.rabbitmq.client.Connection;
> public class RabbitConsumerTest {
>   private RabbitMQConsumer consumer = Mockito.mock(RabbitMQConsumer.class);
>   private RabbitMQEndpoint endpoint = Mockito.mock(RabbitMQEndpoint.class);
>   private Connection conn = Mockito.mock(Connection.class);
>   private Channel channel = Mockito.mock(Channel.class);
>  
>   @Test(timeout=5000)
>   public void testHandleDelivery_ShouldNotHangForeverIfChanelWasClosed() 
> throws Exception {  
> Mockito.when(consumer.getEndpoint()).thenReturn(endpoint);  
> Mockito.when(consumer.getConnection()).thenReturn(conn);
> Mockito.when(conn.createChannel()).thenReturn(channel);
> Mockito.when(channel.isOpen()).thenReturn(false).thenReturn(true);
> 
> RabbitConsumer rabbitConsumer = new RabbitConsumer(consumer);
> 
> rabbitConsumer.handleDelivery(null, null, null, null);
> rabbitConsumer.handleDelivery(null, null, null, null);
> rabbitConsumer.stop();
>   }
> }
> {code}



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


[jira] [Assigned] (CAMEL-11996) RabbitConsumer could hang when RabbitMQ connection is lost and autoAck=false.

2018-02-02 Thread Claus Ibsen (JIRA)

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

Claus Ibsen reassigned CAMEL-11996:
---

Assignee: Claus Ibsen

> RabbitConsumer could hang when RabbitMQ connection is lost and autoAck=false.
> -
>
> Key: CAMEL-11996
> URL: https://issues.apache.org/jira/browse/CAMEL-11996
> Project: Camel
>  Issue Type: Bug
>  Components: camel-rabbitmq
>Affects Versions: 2.18.0, 2.19.0, 2.20.0
>Reporter: Joel Mongård
>Assignee: Claus Ibsen
>Priority: Major
> Fix For: 2.19.5, 2.20.3, 2.21.0
>
>
> When the connection is lost to a RabbitMQ server and later restored there is 
> the possibility that the RabbitConsumer hangs. The only way around this that 
> I found is to restart my application. 
> I have experienced this problem in my testing environment running camel 
> 2.18.3 where my RabbitMQ installation is not stable causing every consumer 
> thread to hang on _lock.acquire()_ .
> The problem has been introduced in version 2.18.0 commit 
> 7ee0977c9f5c327a95122f5b80202dc5dd872e40
> A possible fix could be to include the statement _if (!channel.isOpen()) 
> return;_ in the try-finally block below it.
> {code:title=JUnit test}
> package org.apache.camel.component.rabbitmq;
> import org.junit.Test;
> import org.mockito.Mockito;
> import com.rabbitmq.client.Channel;
> import com.rabbitmq.client.Connection;
> public class RabbitConsumerTest {
>   private RabbitMQConsumer consumer = Mockito.mock(RabbitMQConsumer.class);
>   private RabbitMQEndpoint endpoint = Mockito.mock(RabbitMQEndpoint.class);
>   private Connection conn = Mockito.mock(Connection.class);
>   private Channel channel = Mockito.mock(Channel.class);
>  
>   @Test(timeout=5000)
>   public void testHandleDelivery_ShouldNotHangForeverIfChanelWasClosed() 
> throws Exception {  
> Mockito.when(consumer.getEndpoint()).thenReturn(endpoint);  
> Mockito.when(consumer.getConnection()).thenReturn(conn);
> Mockito.when(conn.createChannel()).thenReturn(channel);
> Mockito.when(channel.isOpen()).thenReturn(false).thenReturn(true);
> 
> RabbitConsumer rabbitConsumer = new RabbitConsumer(consumer);
> 
> rabbitConsumer.handleDelivery(null, null, null, null);
> rabbitConsumer.handleDelivery(null, null, null, null);
> rabbitConsumer.stop();
>   }
> }
> {code}



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


[jira] [Commented] (CAMEL-11996) RabbitConsumer could hang when RabbitMQ connection is lost and autoAck=false.

2018-02-02 Thread Claus Ibsen (JIRA)

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

Claus Ibsen commented on CAMEL-11996:
-

Thanks I reproduced the issue with your unit test and have a fix

> RabbitConsumer could hang when RabbitMQ connection is lost and autoAck=false.
> -
>
> Key: CAMEL-11996
> URL: https://issues.apache.org/jira/browse/CAMEL-11996
> Project: Camel
>  Issue Type: Bug
>  Components: camel-rabbitmq
>Affects Versions: 2.18.0, 2.19.0, 2.20.0
>Reporter: Joel Mongård
>Assignee: Claus Ibsen
>Priority: Major
> Fix For: 2.19.5, 2.20.3, 2.21.0
>
>
> When the connection is lost to a RabbitMQ server and later restored there is 
> the possibility that the RabbitConsumer hangs. The only way around this that 
> I found is to restart my application. 
> I have experienced this problem in my testing environment running camel 
> 2.18.3 where my RabbitMQ installation is not stable causing every consumer 
> thread to hang on _lock.acquire()_ .
> The problem has been introduced in version 2.18.0 commit 
> 7ee0977c9f5c327a95122f5b80202dc5dd872e40
> A possible fix could be to include the statement _if (!channel.isOpen()) 
> return;_ in the try-finally block below it.
> {code:title=JUnit test}
> package org.apache.camel.component.rabbitmq;
> import org.junit.Test;
> import org.mockito.Mockito;
> import com.rabbitmq.client.Channel;
> import com.rabbitmq.client.Connection;
> public class RabbitConsumerTest {
>   private RabbitMQConsumer consumer = Mockito.mock(RabbitMQConsumer.class);
>   private RabbitMQEndpoint endpoint = Mockito.mock(RabbitMQEndpoint.class);
>   private Connection conn = Mockito.mock(Connection.class);
>   private Channel channel = Mockito.mock(Channel.class);
>  
>   @Test(timeout=5000)
>   public void testHandleDelivery_ShouldNotHangForeverIfChanelWasClosed() 
> throws Exception {  
> Mockito.when(consumer.getEndpoint()).thenReturn(endpoint);  
> Mockito.when(consumer.getConnection()).thenReturn(conn);
> Mockito.when(conn.createChannel()).thenReturn(channel);
> Mockito.when(channel.isOpen()).thenReturn(false).thenReturn(true);
> 
> RabbitConsumer rabbitConsumer = new RabbitConsumer(consumer);
> 
> rabbitConsumer.handleDelivery(null, null, null, null);
> rabbitConsumer.handleDelivery(null, null, null, null);
> rabbitConsumer.stop();
>   }
> }
> {code}



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


[jira] [Assigned] (CAMEL-12223) camel-json-validator: Documentation and comments in code incorrectly mentions everit

2018-02-02 Thread Andrea Cosentino (JIRA)

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

Andrea Cosentino reassigned CAMEL-12223:


Assignee: Andrea Cosentino

> camel-json-validator:  Documentation and comments in code incorrectly 
> mentions everit
> -
>
> Key: CAMEL-12223
> URL: https://issues.apache.org/jira/browse/CAMEL-12223
> Project: Camel
>  Issue Type: Task
>Reporter: Pontus Ullgren
>Assignee: Andrea Cosentino
>Priority: Trivial
> Fix For: 2.21.0
>
>
> The switch to NetworkNT Schema validator (CAMEL-12032) missed to update some 
> documentations and code coments.



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


[jira] [Work started] (CAMEL-12223) camel-json-validator: Documentation and comments in code incorrectly mentions everit

2018-02-02 Thread Andrea Cosentino (JIRA)

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

Work on CAMEL-12223 started by Andrea Cosentino.

> camel-json-validator:  Documentation and comments in code incorrectly 
> mentions everit
> -
>
> Key: CAMEL-12223
> URL: https://issues.apache.org/jira/browse/CAMEL-12223
> Project: Camel
>  Issue Type: Task
>Reporter: Pontus Ullgren
>Assignee: Andrea Cosentino
>Priority: Trivial
> Fix For: 2.21.0
>
>
> The switch to NetworkNT Schema validator (CAMEL-12032) missed to update some 
> documentations and code coments.



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


[jira] [Resolved] (CAMEL-12223) camel-json-validator: Documentation and comments in code incorrectly mentions everit

2018-02-02 Thread Andrea Cosentino (JIRA)

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

Andrea Cosentino resolved CAMEL-12223.
--
Resolution: Fixed

> camel-json-validator:  Documentation and comments in code incorrectly 
> mentions everit
> -
>
> Key: CAMEL-12223
> URL: https://issues.apache.org/jira/browse/CAMEL-12223
> Project: Camel
>  Issue Type: Task
>Reporter: Pontus Ullgren
>Assignee: Andrea Cosentino
>Priority: Trivial
> Fix For: 2.21.0
>
>
> The switch to NetworkNT Schema validator (CAMEL-12032) missed to update some 
> documentations and code coments.



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


[jira] [Commented] (CAMEL-12223) camel-json-validator: Documentation and comments in code incorrectly mentions everit

2018-02-02 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CAMEL-12223:


oscerd closed pull request #2204: CAMEL-12223: camel-json-validator: Removed 
metioning of Everit from d…
URL: https://github.com/apache/camel/pull/2204
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/components/camel-json-validator/src/main/docs/json-validator-component.adoc 
b/components/camel-json-validator/src/main/docs/json-validator-component.adoc
index a6b29ae13ec..12dc05ac806 100644
--- 
a/components/camel-json-validator/src/main/docs/json-validator-component.adoc
+++ 
b/components/camel-json-validator/src/main/docs/json-validator-component.adoc
@@ -67,7 +67,7 @@ with the following path and query parameters:
 | *failOnNullHeader* (producer) | Whether to fail if no header exists when 
validating against a header. | true | boolean
 | *headerName* (producer) | To validate against a header instead of the 
message body. |  | String
 | *errorHandler* (advanced) | To use a custom ValidatorErrorHandler. The 
default error handler captures the errors and throws an exception. |  | 
JsonValidatorError Handler
-| *schemaLoader* (advanced) | To use a custom schema loader allowing for 
adding custom format validation. See Everit JSON Schema documentation. The 
default implementation will create a schema loader builder with draft v6 
support. |  | JsonSchemaLoader
+| *schemaLoader* (advanced) | To use a custom schema loader allowing for 
adding custom format validation. The default implementation will create a 
schema loader with draft v4 support. |  | JsonSchemaLoader
 | *synchronous* (advanced) | Sets whether synchronous processing should be 
strictly used or Camel is allowed to use asynchronous processing (if 
supported). | false | boolean
 |===
 // endpoint options: END
@@ -124,4 +124,4 @@ we can validate incoming JSON with the following Camel 
route, where `myschema.js
 from("direct:start")
   .to("json-validator:myschema.json")
   .to("mock:end")
-
\ No newline at end of file
+
diff --git 
a/components/camel-json-validator/src/main/java/org/apache/camel/component/jsonvalidator/JsonValidatorEndpoint.java
 
b/components/camel-json-validator/src/main/java/org/apache/camel/component/jsonvalidator/JsonValidatorEndpoint.java
index a4706c08c93..fb07874755a 100644
--- 
a/components/camel-json-validator/src/main/java/org/apache/camel/component/jsonvalidator/JsonValidatorEndpoint.java
+++ 
b/components/camel-json-validator/src/main/java/org/apache/camel/component/jsonvalidator/JsonValidatorEndpoint.java
@@ -36,7 +36,7 @@
 import org.slf4j.LoggerFactory;
 
 /**
- * Validates the payload of a message using Everit JSON schema validator.
+ * Validates the payload of a message using NetworkNT JSON Schema library.
  */
 @ManagedResource(description = "Managed JsonValidatorEndpoint")
 @UriEndpoint(scheme = "json-validator", firstVersion = "2.20.0", title = "JSON 
Schema Validator", syntax = "json-validator:resourceUri",
@@ -167,8 +167,7 @@ public JsonSchemaLoader getSchemaLoader() {
 }
 
 /**
- * To use a custom schema loader allowing for adding custom format 
validation. See Everit JSON Schema documentation.
- * The default implementation will create a schema loader builder with 
draft v6 support.
+ * To use a custom schema loader allowing for adding custom format 
validation. The default implementation will create a schema loader with draft 
v4 support.
  */
 public void setSchemaLoader(JsonSchemaLoader schemaLoader) {
 this.schemaLoader = schemaLoader;


 


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


> camel-json-validator:  Documentation and comments in code incorrectly 
> mentions everit
> -
>
> Key: CAMEL-12223
> URL: https://issues.apache.org/jira/browse/CAMEL-12223
> Project: Camel
>  Issue Type: Task
>Reporter: Pontus Ullgren
>Priority: Trivial
> Fix For: 2.21.0
>
>
> The switch to NetworkNT Schema validator (CAMEL-12032) missed to update some 
> documentations and code coments.



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


[jira] [Commented] (CAMEL-12223) camel-json-validator: Documentation and comments in code incorrectly mentions everit

2018-02-02 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CAMEL-12223:


oscerd commented on issue #2204: CAMEL-12223: camel-json-validator: Removed 
metioning of Everit from d…
URL: https://github.com/apache/camel/pull/2204#issuecomment-362522537
 
 
   Thanks :-)


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


> camel-json-validator:  Documentation and comments in code incorrectly 
> mentions everit
> -
>
> Key: CAMEL-12223
> URL: https://issues.apache.org/jira/browse/CAMEL-12223
> Project: Camel
>  Issue Type: Task
>Reporter: Pontus Ullgren
>Priority: Trivial
> Fix For: 2.21.0
>
>
> The switch to NetworkNT Schema validator (CAMEL-12032) missed to update some 
> documentations and code coments.



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


[jira] [Commented] (CAMEL-12223) camel-json-validator: Documentation and comments in code incorrectly mentions everit

2018-02-02 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CAMEL-12223:


Github user oscerd closed the pull request at:

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


> camel-json-validator:  Documentation and comments in code incorrectly 
> mentions everit
> -
>
> Key: CAMEL-12223
> URL: https://issues.apache.org/jira/browse/CAMEL-12223
> Project: Camel
>  Issue Type: Task
>Reporter: Pontus Ullgren
>Priority: Trivial
> Fix For: 2.21.0
>
>
> The switch to NetworkNT Schema validator (CAMEL-12032) missed to update some 
> documentations and code coments.



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


[jira] [Commented] (CAMEL-12223) camel-json-validator: Documentation and comments in code incorrectly mentions everit

2018-02-02 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CAMEL-12223:


ullgren opened a new pull request #2204: CAMEL-12223: camel-json-validator: 
Removed metioning of Everit from d…
URL: https://github.com/apache/camel/pull/2204
 
 
   …ocumentation and code comments.


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


> camel-json-validator:  Documentation and comments in code incorrectly 
> mentions everit
> -
>
> Key: CAMEL-12223
> URL: https://issues.apache.org/jira/browse/CAMEL-12223
> Project: Camel
>  Issue Type: Task
>Reporter: Pontus Ullgren
>Priority: Trivial
> Fix For: 2.21.0
>
>
> The switch to NetworkNT Schema validator (CAMEL-12032) missed to update some 
> documentations and code coments.



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


[jira] [Commented] (CAMEL-12223) camel-json-validator: Documentation and comments in code incorrectly mentions everit

2018-02-02 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CAMEL-12223:


GitHub user ullgren opened a pull request:

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

CAMEL-12223: camel-json-validator: Removed metioning of Everit from d…

…ocumentation and code comments.

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

$ git pull https://github.com/ullgren/camel 
CAMEL-12223-jsonvalidator-doc-typos

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

https://github.com/apache/camel/pull/2204.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 #2204


commit adb34ba5b30628678dd17970d9e91c03a5cf
Author: Pontus Ullgren 
Date:   2018-02-02T08:42:25Z

CAMEL-12223: camel-json-validator: Removed metioning of Everit from 
documentation and code comments.




> camel-json-validator:  Documentation and comments in code incorrectly 
> mentions everit
> -
>
> Key: CAMEL-12223
> URL: https://issues.apache.org/jira/browse/CAMEL-12223
> Project: Camel
>  Issue Type: Task
>Reporter: Pontus Ullgren
>Priority: Trivial
> Fix For: 2.21.0
>
>
> The switch to NetworkNT Schema validator (CAMEL-12032) missed to update some 
> documentations and code coments.



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


[jira] [Commented] (CAMEL-12195) camel redeliveries does not work with hystrix

2018-02-02 Thread Claus Ibsen (JIRA)

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

Claus Ibsen commented on CAMEL-12195:
-

You can try in the fallback to call a 2nd route via direct and let that 2nd 
route have retries.

> camel redeliveries does not work with hystrix
> -
>
> Key: CAMEL-12195
> URL: https://issues.apache.org/jira/browse/CAMEL-12195
> Project: Camel
>  Issue Type: Bug
>  Components: camel-hystrix
>Reporter: Scott Feldstein
>Assignee: Claus Ibsen
>Priority: Major
> Fix For: 2.21.0
>
>
> Camel hystrix does not work with errorHander and redeliveries.
> I discussed this here -> 
> [https://stackoverflow.com/questions/48396320/camel-exception-redelivery-with-hystrix]
> clone this repo to reproduce the issue
> {code:java}
> $ git clone g...@github.com:scottmf/camel-hystrix-bug.git
> $ cd camel-hystrix-bug
> $ gradlew clean test{code}



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


[jira] [Updated] (CAMEL-12223) camel-json-validator: Documentation and comments in code incorrectly mentions everit

2018-02-02 Thread Claus Ibsen (JIRA)

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

Claus Ibsen updated CAMEL-12223:

Issue Type: Task  (was: Bug)

> camel-json-validator:  Documentation and comments in code incorrectly 
> mentions everit
> -
>
> Key: CAMEL-12223
> URL: https://issues.apache.org/jira/browse/CAMEL-12223
> Project: Camel
>  Issue Type: Task
>Reporter: Pontus Ullgren
>Priority: Trivial
> Fix For: 2.21.0
>
>
> The switch to NetworkNT Schema validator (CAMEL-12032) missed to update some 
> documentations and code coments.



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


[jira] [Commented] (CAMEL-12223) camel-json-validator: Documentation and comments in code incorrectly mentions everit

2018-02-02 Thread Claus Ibsen (JIRA)

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

Claus Ibsen commented on CAMEL-12223:
-

Are you providing a PR

> camel-json-validator:  Documentation and comments in code incorrectly 
> mentions everit
> -
>
> Key: CAMEL-12223
> URL: https://issues.apache.org/jira/browse/CAMEL-12223
> Project: Camel
>  Issue Type: Task
>Reporter: Pontus Ullgren
>Priority: Trivial
> Fix For: 2.21.0
>
>
> The switch to NetworkNT Schema validator (CAMEL-12032) missed to update some 
> documentations and code coments.



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


[jira] [Updated] (CAMEL-12223) camel-json-validator: Documentation and comments in code incorrectly mentions everit

2018-02-02 Thread Claus Ibsen (JIRA)

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

Claus Ibsen updated CAMEL-12223:

Fix Version/s: 2.21.0

> camel-json-validator:  Documentation and comments in code incorrectly 
> mentions everit
> -
>
> Key: CAMEL-12223
> URL: https://issues.apache.org/jira/browse/CAMEL-12223
> Project: Camel
>  Issue Type: Task
>Reporter: Pontus Ullgren
>Priority: Trivial
> Fix For: 2.21.0
>
>
> The switch to NetworkNT Schema validator (CAMEL-12032) missed to update some 
> documentations and code coments.



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


[jira] [Updated] (CAMEL-12223) camel-json-validator: Documentation and comments in code incorrectly mentions everit

2018-02-02 Thread Pontus Ullgren (JIRA)

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

Pontus Ullgren updated CAMEL-12223:
---
Priority: Trivial  (was: Major)

> camel-json-validator:  Documentation and comments in code incorrectly 
> mentions everit
> -
>
> Key: CAMEL-12223
> URL: https://issues.apache.org/jira/browse/CAMEL-12223
> Project: Camel
>  Issue Type: Bug
>Reporter: Pontus Ullgren
>Priority: Trivial
>
> The switch to NetworkNT Schema validator (CAMEL-12032) missed to update some 
> documentations and code coments.



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


[jira] [Created] (CAMEL-12223) camel-json-validator: Documentation and comments in code incorrectly mentions everit

2018-02-02 Thread Pontus Ullgren (JIRA)
Pontus Ullgren created CAMEL-12223:
--

 Summary: camel-json-validator:  Documentation and comments in code 
incorrectly mentions everit
 Key: CAMEL-12223
 URL: https://issues.apache.org/jira/browse/CAMEL-12223
 Project: Camel
  Issue Type: Bug
Reporter: Pontus Ullgren


The switch to NetworkNT Schema validator (CAMEL-12032) missed to update some 
documentations and code coments.



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


[jira] [Updated] (CAMEL-12034) Search Operation: If Map or String is used in Message Body, "size" and "from" parameters are always ignored (lost while conversion).

2018-02-02 Thread Claus Ibsen (JIRA)

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

Claus Ibsen updated CAMEL-12034:

Fix Version/s: (was: 2.20.2)
   2.20.3

> Search Operation: If Map or String is used in Message Body, "size" and "from" 
> parameters are always ignored (lost while conversion).
> 
>
> Key: CAMEL-12034
> URL: https://issues.apache.org/jira/browse/CAMEL-12034
> Project: Camel
>  Issue Type: Bug
>  Components: camel-elasticsearch5
>Affects Versions: 2.20.1
>Reporter: Radoslav Cincala
>Assignee: Andrea Cosentino
>Priority: Minor
> Fix For: 2.20.3, 2.21.0
>
>
> Hi,
> I am using camel-elasticsearch5 component of Camel 2.20.1.
> I have found and issue. The description follows.
> *If you use Map or String in message body for SEARCH operation, "size" and 
> "from" parameters are always ignored hence you always get just default 10 
> results.*
> For example - if your map contains query like this: 
> (in terms of simplicity - following is String representation of the map):
> {code}
> {size=50, query={query_string={query=status:ACTIVE}}, from=0}
> {code}
> Issue I suspect is present in class: 
> _org.apache.camel.component.elasticsearch5.converter.ElasticsearchActionRequestConverter_
> and its method 
> _public static SearchRequest toSearchRequest(Object queryObject, Exchange 
> exchange)_
> {code}
> // line 191...
> if (queryObject instanceof Map) {
> Map mapQuery = (Map)queryObject;
> // Remove 'query' prefix from the query object for backward 
> compatibility
> if 
> (mapQuery.containsKey(ElasticsearchConstants.ES_QUERY_DSL_PREFIX)) {
> mapQuery = (Map Object>)mapQuery.get(ElasticsearchConstants.ES_QUERY_DSL_PREFIX);
> }
> try {
> XContentBuilder contentBuilder = 
> XContentFactory.contentBuilder(XContentType.JSON);
> queryText = contentBuilder.map(mapQuery).string();
> } catch (IOException e) {
> LOG.error(e.getMessage());
> }
> }
> // queryText then used on line 220...
> searchSourceBuilder.query(QueryBuilders.wrapperQuery(queryText));
> searchRequest.source(searchSourceBuilder);
> return searchRequest;
> {code}
> Inner if condition basically extracts only query part from the map 
> {code}
> query={query_string={query=status:ACTIVE}
> {code}
> and *"size" and "from" get lost from the query*
> {code}
> // line 194...
> if (mapQuery.containsKey(ElasticsearchConstants.ES_QUERY_DSL_PREFIX)) {
> mapQuery = (Map Object>)mapQuery.get(ElasticsearchConstants.ES_QUERY_DSL_PREFIX);
> // ...where ElasticsearchConstants.ES_QUERY_DSL_PREFIX = "query"
> }
> {code}
> Same issue is with usage of the String in the message body:
> {code}
> // line 203
> } else if (queryObject instanceof String) {
> queryText = (String)queryObject;
> ObjectMapper mapper = new ObjectMapper();
> try {
> JsonNode jsonTextObject = mapper.readValue(queryText, 
> JsonNode.class);
> JsonNode parentJsonNode = 
> jsonTextObject.get(ElasticsearchConstants.ES_QUERY_DSL_PREFIX);
> if (parentJsonNode != null) {
> queryText = parentJsonNode.toString();
> }
> } catch (IOException e) {
> LOG.error(e.getMessage());
> }
> }
> {code}
> Only workaround for this is to use *SearchRequest* object in a message body 
> where you can explicitly set "size" and "from" on SearchSourceBuilder object. 
> For example:
> {code}
> SearchRequest searchRequest = new SearchRequest("my_index")
> .types("my_type")
> .source(new 
> SearchSourceBuilder().query(QueryBuilders.wrapperQuery("my:query"))
> .size(50).from(0));
> {code}
> I don't know what was the developer's intention for having such a condition 
> which removes these parameters from the query.
> Thank you very much in advance if anybody can have a look and verify if this 
> is a valid concern.



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


[jira] [Updated] (CAMEL-11996) RabbitConsumer could hang when RabbitMQ connection is lost and autoAck=false.

2018-02-02 Thread Claus Ibsen (JIRA)

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

Claus Ibsen updated CAMEL-11996:

Fix Version/s: (was: 2.20.2)
   2.20.3

> RabbitConsumer could hang when RabbitMQ connection is lost and autoAck=false.
> -
>
> Key: CAMEL-11996
> URL: https://issues.apache.org/jira/browse/CAMEL-11996
> Project: Camel
>  Issue Type: Bug
>  Components: camel-rabbitmq
>Affects Versions: 2.18.0, 2.19.0, 2.20.0
>Reporter: Joel Mongård
>Priority: Major
> Fix For: 2.19.5, 2.20.3, 2.21.0
>
>
> When the connection is lost to a RabbitMQ server and later restored there is 
> the possibility that the RabbitConsumer hangs. The only way around this that 
> I found is to restart my application. 
> I have experienced this problem in my testing environment running camel 
> 2.18.3 where my RabbitMQ installation is not stable causing every consumer 
> thread to hang on _lock.acquire()_ .
> The problem has been introduced in version 2.18.0 commit 
> 7ee0977c9f5c327a95122f5b80202dc5dd872e40
> A possible fix could be to include the statement _if (!channel.isOpen()) 
> return;_ in the try-finally block below it.
> {code:title=JUnit test}
> package org.apache.camel.component.rabbitmq;
> import org.junit.Test;
> import org.mockito.Mockito;
> import com.rabbitmq.client.Channel;
> import com.rabbitmq.client.Connection;
> public class RabbitConsumerTest {
>   private RabbitMQConsumer consumer = Mockito.mock(RabbitMQConsumer.class);
>   private RabbitMQEndpoint endpoint = Mockito.mock(RabbitMQEndpoint.class);
>   private Connection conn = Mockito.mock(Connection.class);
>   private Channel channel = Mockito.mock(Channel.class);
>  
>   @Test(timeout=5000)
>   public void testHandleDelivery_ShouldNotHangForeverIfChanelWasClosed() 
> throws Exception {  
> Mockito.when(consumer.getEndpoint()).thenReturn(endpoint);  
> Mockito.when(consumer.getConnection()).thenReturn(conn);
> Mockito.when(conn.createChannel()).thenReturn(channel);
> Mockito.when(channel.isOpen()).thenReturn(false).thenReturn(true);
> 
> RabbitConsumer rabbitConsumer = new RabbitConsumer(consumer);
> 
> rabbitConsumer.handleDelivery(null, null, null, null);
> rabbitConsumer.handleDelivery(null, null, null, null);
> rabbitConsumer.stop();
>   }
> }
> {code}



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


[jira] [Commented] (CAMEL-10540) GROK Parser

2018-02-02 Thread Claus Ibsen (JIRA)

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

Claus Ibsen commented on CAMEL-10540:
-

Yeah I think we should use the same parser as Apache Metron.

> GROK Parser
> ---
>
> Key: CAMEL-10540
> URL: https://issues.apache.org/jira/browse/CAMEL-10540
> Project: Camel
>  Issue Type: New Feature
>Reporter: Jan Bernhardt
>Priority: Major
> Fix For: Future
>
>
> As discussed on the mailing list [1], it would be great to have a grok filter 
> for camel, to parse text with multiple named regex expressions resulting in a 
> Map containing the named key as well as the parsed value.
> [1] 
> http://camel.465427.n5.nabble.com/Parsing-unstructured-Text-in-Camel-td5790513.html



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