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

2018-02-01 Thread Scott Feldstein (JIRA)

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

Scott Feldstein commented on CAMEL-12195:
-

Thanks [~davsclaus], this is probably a doc issue then.  Could you recommend a 
way to coax the fallback to retry?  I worked on it for a while and it was not 
obvious.

> 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] [Created] (CAMEL-12222) ResrSwaggerServlet removes last part of context root

2018-02-01 Thread Darius Cooper (JIRA)
Darius Cooper created CAMEL-1:
-

 Summary: ResrSwaggerServlet removes last part of context root
 Key: CAMEL-1
 URL: https://issues.apache.org/jira/browse/CAMEL-1
 Project: Camel
  Issue Type: Bug
  Components: camel-swagger
Reporter: Darius Cooper


The method within RestSwaggerServlet, looks for the last "/" in the context 
root, and drops anything after that slash.


{code:java}
private String translateContextPath(HttpServletRequest request) {
  String path = request.getContextPath();
  if (path.isEmpty() || path.equals("/")) {
  return "";
  } else {
 int idx = path.lastIndexOf("/");
 if (idx > 0) {
 return path.substring(0, idx);
 }
  }
  return path;
}{code}

Even thought this has been deprecated, it would be good to fix it. 

An approach could be to add a servlet init parameter named 
"translateContextPath" which would default to true, and would work exactly as 
it does today by default. if set to false, it would return whatever value is in 
request.getContextPath() , with no translation.

I plan on working on this. Creating a Jira to get feedback on the approach



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


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

2018-02-01 Thread Mike Barlotta (JIRA)

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

Mike Barlotta commented on CAMEL-10540:
---

after looking around seems there are two Java Grok libraries
 * [https://github.com/thekrakken/java-grok]
 * [https://github.com/aicer/grok]

It looks like Apache Metron refers to thekrakken
 * 
[https://github.com/apache/metron/tree/c4954e8af7d5cab59ec6fdc4d9a0bb07c794afd6/metron-streaming/Metron-MessageParsers]
 * 
[https://github.com/apache/metron/blob/master/metron-platform/metron-parsers/src/main/java/org/apache/metron/parsers/GrokParser.java#L34-L35]

so I that Camel component should use this as well

thoughts?

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


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

2018-02-01 Thread Mike Barlotta (JIRA)

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

Mike Barlotta commented on CAMEL-10540:
---

sorry got side tracked... will pick it back up

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


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

2018-02-01 Thread John Poth (JIRA)

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

John Poth updated CAMEL-12221:
--
Description: 
Let's create a camel-fhir component based on [HAPI-FHIR|http://hapifhir.io]

I can take care of the PR. 

> 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] [Resolved] (CAMEL-12178) Add getMessage and setMessage methods to the Exchange interface

2018-02-01 Thread Quinn Stevenson (JIRA)

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

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

Fixed with commit 698c04dba0721f99abf04fee2030fb64b3601b69

> Add getMessage and setMessage methods to the Exchange interface
> ---
>
> Key: CAMEL-12178
> URL: https://issues.apache.org/jira/browse/CAMEL-12178
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-core
>Reporter: Quinn Stevenson
>Assignee: Quinn Stevenson
>Priority: Trivial
> Fix For: 2.21.0
>
>
> Most of the time, the correct Camel Message is retrieve from the exchange 
> using
>  
> Message message = hasOut() ? getOut() : getIn();
>  
> With this enhancement, the common usage would be supported by these methods.
>  
> To try this out, I had to change the Exchange interface, the DefaultExchange 
> implementation (both in camel-core), and RichExchange (in camel-scala).  
> Everything seemed to be fine with the change.
>  



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


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

2018-02-01 Thread John Poth (JIRA)

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

John Poth updated CAMEL-12221:
--
Summary: Let's create a camel-fhir component  (was: Let)

> 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
>




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


[jira] [Created] (CAMEL-12221) Let

2018-02-01 Thread John Poth (JIRA)
John Poth created CAMEL-12221:
-

 Summary: Let
 Key: CAMEL-12221
 URL: https://issues.apache.org/jira/browse/CAMEL-12221
 Project: Camel
  Issue Type: New Feature
Reporter: John Poth






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


[jira] [Updated] (CAMEL-11391) Add camel:route-trace and camel:context-mdc commands

2018-02-01 Thread Claus Ibsen (JIRA)

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

Claus Ibsen updated CAMEL-11391:

Priority: Minor  (was: Major)

> Add camel:route-trace and camel:context-mdc commands
> 
>
> Key: CAMEL-11391
> URL: https://issues.apache.org/jira/browse/CAMEL-11391
> Project: Camel
>  Issue Type: Improvement
>  Components: karaf
>Reporter: Jean-Baptiste Onofré
>Assignee: Jean-Baptiste Onofré
>Priority: Minor
>
> In order to allow users to turn on/off the tracer on a route or the MDC on a 
> Camel Context, it would be convenient to have corresponding 
> {{camel:route-trace}} and {{camel:context-mdc}} Karaf commands.



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


[jira] [Assigned] (CAMEL-8529) ScriptEngine usage optimizations

2018-02-01 Thread Claus Ibsen (JIRA)

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

Claus Ibsen reassigned CAMEL-8529:
--

Assignee: (was: Willem Jiang)

> ScriptEngine usage optimizations
> 
>
> Key: CAMEL-8529
> URL: https://issues.apache.org/jira/browse/CAMEL-8529
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-script
>Affects Versions: 2.15.0
>Reporter: gui
>Priority: Major
> Attachments: scriptbuilder.patch
>
>
> When a script is compiled (eg in case of js), the scriptbuilder is (re) 
> creating a new engine instance on every invocation, although the compiled 
> script has already an engine attached. 
> This cause a lot of unnecessary engine initialization on every invocation. 



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


[jira] [Resolved] (CAMEL-11408) Camel Servlet Web Page http://camel.apache.org/servlet.html

2018-02-01 Thread Claus Ibsen (JIRA)

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

Claus Ibsen resolved CAMEL-11408.
-
Resolution: Won't Fix

> Camel Servlet Web Page http://camel.apache.org/servlet.html
> ---
>
> Key: CAMEL-11408
> URL: https://issues.apache.org/jira/browse/CAMEL-11408
> Project: Camel
>  Issue Type: Task
>  Components: documentation
>Reporter: Martin Lichtin
>Priority: Trivial
>  Labels: documentaion
>
> On page http://camel.apache.org/servlet.html the section "Sample when using 
> OSGi" is missing the code snippets. 
> Can these examples be put back in and, if possible, be verified? Thanks much!



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


[jira] [Updated] (CAMEL-8529) ScriptEngine usage optimizations

2018-02-01 Thread Claus Ibsen (JIRA)

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

Claus Ibsen updated CAMEL-8529:
---
Priority: Minor  (was: Major)

> ScriptEngine usage optimizations
> 
>
> Key: CAMEL-8529
> URL: https://issues.apache.org/jira/browse/CAMEL-8529
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-script
>Affects Versions: 2.15.0
>Reporter: gui
>Priority: Minor
> Attachments: scriptbuilder.patch
>
>
> When a script is compiled (eg in case of js), the scriptbuilder is (re) 
> creating a new engine instance on every invocation, although the compiled 
> script has already an engine attached. 
> This cause a lot of unnecessary engine initialization on every invocation. 



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


[jira] [Commented] (CAMEL-11541) Telegram Button / Keyboard / Position

2018-02-01 Thread Claus Ibsen (JIRA)

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

Claus Ibsen commented on CAMEL-11541:
-

Contributions is welcome

> Telegram Button / Keyboard / Position
> -
>
> Key: CAMEL-11541
> URL: https://issues.apache.org/jira/browse/CAMEL-11541
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-telegram
>Reporter: Fabrizio Spataro
>Priority: Minor
>
> Telegram component manage a basic type of message (text, video, image, audio) 
> but there are any functionalities not implemeted yet. 
> For example: Keyboards, buttons, Positions (lat/lon) etc



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


[jira] [Updated] (CAMEL-11541) Telegram Button / Keyboard / Position

2018-02-01 Thread Claus Ibsen (JIRA)

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

Claus Ibsen updated CAMEL-11541:

Estimated Complexity: Novice  (was: Unknown)

> Telegram Button / Keyboard / Position
> -
>
> Key: CAMEL-11541
> URL: https://issues.apache.org/jira/browse/CAMEL-11541
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-telegram
>Reporter: Fabrizio Spataro
>Priority: Minor
>
> Telegram component manage a basic type of message (text, video, image, audio) 
> but there are any functionalities not implemeted yet. 
> For example: Keyboards, buttons, Positions (lat/lon) etc



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


[jira] [Updated] (CAMEL-8958) Add push/pop to the DSL so people can easily preserve and get back a message as-is

2018-02-01 Thread Claus Ibsen (JIRA)

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

Claus Ibsen updated CAMEL-8958:
---
Fix Version/s: (was: Future)
   2.22.0

> Add push/pop to the DSL so people can easily preserve and get back a message 
> as-is
> --
>
> Key: CAMEL-8958
> URL: https://issues.apache.org/jira/browse/CAMEL-8958
> Project: Camel
>  Issue Type: New Feature
>  Components: camel-core, eip
>Reporter: Claus Ibsen
>Assignee: Claus Ibsen
>Priority: Major
> Fix For: 3.0.0, 2.22.0
>
>
> We may ponder about some good naming for an EIP that remembers an Exchange 
> and then allow to restore that Exchange at a later point.
> We could have push/pop as a stack fashion. Or use some kind of naming, 
> push(foo) and then pop(foo). Or some better naming.
> People today have stored the message body as an exchange body and then 
> restored that later. But this may be simpler.
> For pop we could allow an optional aggregation strategy so people can merge 
> the current exchange with the pop in any way they want.



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


[jira] [Commented] (CAMEL-8958) Add push/pop to the DSL so people can easily preserve and get back a message as-is

2018-02-01 Thread Claus Ibsen (JIRA)

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

Claus Ibsen commented on CAMEL-8958:


Lets see if I get some time end of february as its a functionality that has 
many votes and that I also think we should try to add to 2.x

> Add push/pop to the DSL so people can easily preserve and get back a message 
> as-is
> --
>
> Key: CAMEL-8958
> URL: https://issues.apache.org/jira/browse/CAMEL-8958
> Project: Camel
>  Issue Type: New Feature
>  Components: camel-core, eip
>Reporter: Claus Ibsen
>Assignee: Claus Ibsen
>Priority: Major
> Fix For: 3.0.0, 2.22.0
>
>
> We may ponder about some good naming for an EIP that remembers an Exchange 
> and then allow to restore that Exchange at a later point.
> We could have push/pop as a stack fashion. Or use some kind of naming, 
> push(foo) and then pop(foo). Or some better naming.
> People today have stored the message body as an exchange body and then 
> restored that later. But this may be simpler.
> For pop we could allow an optional aggregation strategy so people can merge 
> the current exchange with the pop in any way they want.



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


[jira] [Assigned] (CAMEL-8958) Add push/pop to the DSL so people can easily preserve and get back a message as-is

2018-02-01 Thread Claus Ibsen (JIRA)

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

Claus Ibsen reassigned CAMEL-8958:
--

Assignee: Claus Ibsen

> Add push/pop to the DSL so people can easily preserve and get back a message 
> as-is
> --
>
> Key: CAMEL-8958
> URL: https://issues.apache.org/jira/browse/CAMEL-8958
> Project: Camel
>  Issue Type: New Feature
>  Components: camel-core, eip
>Reporter: Claus Ibsen
>Assignee: Claus Ibsen
>Priority: Major
> Fix For: 3.0.0, 2.22.0
>
>
> We may ponder about some good naming for an EIP that remembers an Exchange 
> and then allow to restore that Exchange at a later point.
> We could have push/pop as a stack fashion. Or use some kind of naming, 
> push(foo) and then pop(foo). Or some better naming.
> People today have stored the message body as an exchange body and then 
> restored that later. But this may be simpler.
> For pop we could allow an optional aggregation strategy so people can merge 
> the current exchange with the pop in any way they want.



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


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

2018-02-01 Thread Claus Ibsen (JIRA)

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

Claus Ibsen updated CAMEL-10540:

Fix Version/s: Future

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


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

2018-02-01 Thread Claus Ibsen (JIRA)

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

Claus Ibsen commented on CAMEL-10540:
-

Anyone working on this

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


[jira] [Work started] (CAMEL-12178) Add getMessage and setMessage methods to the Exchange interface

2018-02-01 Thread Quinn Stevenson (JIRA)

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

Work on CAMEL-12178 started by Quinn Stevenson.
---
> Add getMessage and setMessage methods to the Exchange interface
> ---
>
> Key: CAMEL-12178
> URL: https://issues.apache.org/jira/browse/CAMEL-12178
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-core
>Reporter: Quinn Stevenson
>Assignee: Quinn Stevenson
>Priority: Trivial
>
> Most of the time, the correct Camel Message is retrieve from the exchange 
> using
>  
> Message message = hasOut() ? getOut() : getIn();
>  
> With this enhancement, the common usage would be supported by these methods.
>  
> To try this out, I had to change the Exchange interface, the DefaultExchange 
> implementation (both in camel-core), and RichExchange (in camel-scala).  
> Everything seemed to be fine with the change.
>  



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


[jira] [Updated] (CAMEL-11650) Use Hibernate Validator 6.x where possible

2018-02-01 Thread Claus Ibsen (JIRA)

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

Claus Ibsen updated CAMEL-11650:

Fix Version/s: 2.22.0

> Use Hibernate Validator 6.x where possible
> --
>
> Key: CAMEL-11650
> URL: https://issues.apache.org/jira/browse/CAMEL-11650
> Project: Camel
>  Issue Type: Task
>  Components: camel-bean-validator, camel-cm-sms
>Reporter: Andrea Cosentino
>Assignee: Andrea Cosentino
>Priority: Major
> Fix For: Future, 2.22.0
>
>
> We have to try to upgrade wherever possible, but we may have problem with 
> validation-api and el-api in OSGi. It will be a bit of pain to use the same 
> version for all the component and have all working in OSGi.



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


[jira] [Commented] (CAMEL-11650) Use Hibernate Validator 6.x where possible

2018-02-01 Thread Claus Ibsen (JIRA)

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

Claus Ibsen commented on CAMEL-11650:
-

Lets revisit for Camel 2.22.0 when we upgrade to Spring Boot 2

> Use Hibernate Validator 6.x where possible
> --
>
> Key: CAMEL-11650
> URL: https://issues.apache.org/jira/browse/CAMEL-11650
> Project: Camel
>  Issue Type: Task
>  Components: camel-bean-validator, camel-cm-sms
>Reporter: Andrea Cosentino
>Assignee: Andrea Cosentino
>Priority: Major
> Fix For: Future, 2.22.0
>
>
> We have to try to upgrade wherever possible, but we may have problem with 
> validation-api and el-api in OSGi. It will be a bit of pain to use the same 
> version for all the component and have all working in OSGi.



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


[jira] [Assigned] (CAMEL-12178) Add getMessage and setMessage methods to the Exchange interface

2018-02-01 Thread Quinn Stevenson (JIRA)

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

Quinn Stevenson reassigned CAMEL-12178:
---

Assignee: Quinn Stevenson

> Add getMessage and setMessage methods to the Exchange interface
> ---
>
> Key: CAMEL-12178
> URL: https://issues.apache.org/jira/browse/CAMEL-12178
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-core
>Reporter: Quinn Stevenson
>Assignee: Quinn Stevenson
>Priority: Trivial
>
> Most of the time, the correct Camel Message is retrieve from the exchange 
> using
>  
> Message message = hasOut() ? getOut() : getIn();
>  
> With this enhancement, the common usage would be supported by these methods.
>  
> To try this out, I had to change the Exchange interface, the DefaultExchange 
> implementation (both in camel-core), and RichExchange (in camel-scala).  
> Everything seemed to be fine with the change.
>  



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


[jira] [Updated] (CAMEL-11186) Upgrade dropwizard metrics

2018-02-01 Thread Claus Ibsen (JIRA)

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

Claus Ibsen updated CAMEL-11186:

Fix Version/s: (was: 2.21.0)
   2.22.0

> Upgrade dropwizard metrics
> --
>
> Key: CAMEL-11186
> URL: https://issues.apache.org/jira/browse/CAMEL-11186
> Project: Camel
>  Issue Type: Task
>  Components: camel-metrics
>Reporter: Claus Ibsen
>Priority: Major
> Fix For: 2.22.0
>
>
> There is a newer 3.2.x release and we are on 3.1.x. But it failed an test in 
> the spring boot integration tests. So we need to find out why.



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


[jira] [Commented] (CAMEL-11430) Add support for Spring Boot 2.0.x

2018-02-01 Thread Claus Ibsen (JIRA)

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

Claus Ibsen commented on CAMEL-11430:
-

We should upgrade the branch to RC1

> Add support for Spring Boot 2.0.x
> -
>
> Key: CAMEL-11430
> URL: https://issues.apache.org/jira/browse/CAMEL-11430
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-spring-boot
>Reporter: Marcin Grzejszczak
>Priority: Major
> Fix For: 2.22.0
>
>
> Hello!
> It would be great to add compatibility with Boot 2.0.x . Spring Cloud 
> Contract uses Camel but in the 2.0.x branch (that is compatible with Boot 
> 2.0.x ) we can't actually use it.



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


[jira] [Resolved] (CAMEL-11773) Popup message about SyntaxHiglighter when accessing camel 2.20 release note page

2018-02-01 Thread Claus Ibsen (JIRA)

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

Claus Ibsen resolved CAMEL-11773.
-
   Resolution: Fixed
 Assignee: Claus Ibsen
Fix Version/s: 2.21.0

> Popup message about SyntaxHiglighter when accessing camel 2.20 release note 
> page
> 
>
> Key: CAMEL-11773
> URL: https://issues.apache.org/jira/browse/CAMEL-11773
> Project: Camel
>  Issue Type: Task
>  Components: documentation
>Affects Versions: 2.20.0
>Reporter: Aurélien Pupier
>Assignee: Claus Ibsen
>Priority: Minor
> Fix For: 2.21.0
>
> Attachments: screenshot-1.png
>
>
> http://camel.apache.org/camel-2200-release.html
> !screenshot-1.png!



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


[jira] [Updated] (CAMEL-11430) Add support for Spring Boot 2.0.x

2018-02-01 Thread Claus Ibsen (JIRA)

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

Claus Ibsen updated CAMEL-11430:

Fix Version/s: (was: 2.21.0)
   2.22.0

> Add support for Spring Boot 2.0.x
> -
>
> Key: CAMEL-11430
> URL: https://issues.apache.org/jira/browse/CAMEL-11430
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-spring-boot
>Reporter: Marcin Grzejszczak
>Priority: Major
> Fix For: 2.22.0
>
>
> Hello!
> It would be great to add compatibility with Boot 2.0.x . Spring Cloud 
> Contract uses Camel but in the 2.0.x branch (that is compatible with Boot 
> 2.0.x ) we can't actually use it.



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


[jira] [Updated] (CAMEL-10806) Create camel-rxjava2 component

2018-02-01 Thread Claus Ibsen (JIRA)

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

Claus Ibsen updated CAMEL-10806:

Fix Version/s: (was: 2.21.0)
   2.22.0

> Create camel-rxjava2 component
> --
>
> Key: CAMEL-10806
> URL: https://issues.apache.org/jira/browse/CAMEL-10806
> Project: Camel
>  Issue Type: New Feature
>Reporter: Luca Burgazzoli
>Assignee: Luca Burgazzoli
>Priority: Minor
> Fix For: 2.22.0
>
>
> A we have now camel-reactive-streams it would be nice to have a RxJava 2 
> implementation of the camel-reactive-streams API



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


[jira] [Commented] (CAMEL-11870) camel-reactive-streams: use the Flow interfaces in Java 9

2018-02-01 Thread Claus Ibsen (JIRA)

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

Claus Ibsen commented on CAMEL-11870:
-

Maybe wait for this until JDK9 is the minimum version

> camel-reactive-streams: use the Flow interfaces in Java 9
> -
>
> Key: CAMEL-11870
> URL: https://issues.apache.org/jira/browse/CAMEL-11870
> Project: Camel
>  Issue Type: New Feature
>Reporter: Nicola Ferraro
>Assignee: Nicola Ferraro
>Priority: Major
> Fix For: Future
>
>
> We should use Java 9 flow interfaces for reactive-streams objects produced 
> and consumed by camel-reactive-streams.
> We can leverage the multi-release-jar feature to provide interfaces that 
> extend from Java 9 Flow.xxx only when running on Java 9.
> Some hints here: 
> http://kto.so/2017/09/30/the-practical-truth-about-multi-release-jars/



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


[jira] [Updated] (CAMEL-11870) camel-reactive-streams: use the Flow interfaces in Java 9

2018-02-01 Thread Claus Ibsen (JIRA)

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

Claus Ibsen updated CAMEL-11870:

Fix Version/s: (was: 2.21.0)
   Future

> camel-reactive-streams: use the Flow interfaces in Java 9
> -
>
> Key: CAMEL-11870
> URL: https://issues.apache.org/jira/browse/CAMEL-11870
> Project: Camel
>  Issue Type: New Feature
>Reporter: Nicola Ferraro
>Assignee: Nicola Ferraro
>Priority: Major
> Fix For: Future
>
>
> We should use Java 9 flow interfaces for reactive-streams objects produced 
> and consumed by camel-reactive-streams.
> We can leverage the multi-release-jar feature to provide interfaces that 
> extend from Java 9 Flow.xxx only when running on Java 9.
> Some hints here: 
> http://kto.so/2017/09/30/the-practical-truth-about-multi-release-jars/



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


[jira] [Updated] (CAMEL-11887) JDK9 - Module names for Apache Camel

2018-02-01 Thread Claus Ibsen (JIRA)

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

Claus Ibsen updated CAMEL-11887:

Fix Version/s: (was: 2.21.0)
   2.22.0

> JDK9 - Module names for Apache Camel
> 
>
> Key: CAMEL-11887
> URL: https://issues.apache.org/jira/browse/CAMEL-11887
> Project: Camel
>  Issue Type: Task
>  Components: build system
>Reporter: Claus Ibsen
>Priority: Major
> Fix For: 2.22.0
>
>
> We should decide what JDK9 module name to use for Apache Camel.
> There is a bit of information about this at this PR
> https://github.com/apache/camel/pull/2007



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


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

2018-02-01 Thread Aurelien Pupier (JIRA)

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

Aurelien Pupier commented on CAMEL-12114:
-

I'm trying to reuse as much as possible existing Camel stuff for writing a 
Camel Language Server [https://github.com/lhein/camel-language-server]

 

i'm using it here 

https://github.com/lhein/camel-language-server/blob/fe907863203950a7f936f5e1740670069498722b/server/src/main/java/org/apache/camel/tools/lsp/internal/parser/ParserFileHelper.java#L79

> 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] [Commented] (CAMEL-11878) BlueprintCamelContext should use Filter for serviceevents

2018-02-01 Thread Claus Ibsen (JIRA)

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

Claus Ibsen commented on CAMEL-11878:
-

The OSGi filter is still missing, the code seems to just want events for its 
own bundle.

> BlueprintCamelContext should use Filter for serviceevents
> -
>
> Key: CAMEL-11878
> URL: https://issues.apache.org/jira/browse/CAMEL-11878
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-blueprint
>Reporter: Christoph Läubrich
>Priority: Minor
>
> Currently BlueprintCamelContext registers for all ServcieEvents in fact it is 
> only interrested in a very specific event type 
> (objectClass=org.osgi.service.blueprint.container.BlueprintContainer)
> Beside geting and testing more vents as neccesary, since it also logs each 
> event received if enabled Debug logging ALL Osgi-Service events are logged 
> (which might be much in a larger OSGi-App) making reading the logs really 
> hard.



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


[jira] [Commented] (CAMEL-11878) BlueprintCamelContext should use Filter for serviceevents

2018-02-01 Thread Claus Ibsen (JIRA)

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

Claus Ibsen commented on CAMEL-11878:
-

Yeah not sure why logging all those event changes. I am bumping that to TRACE

> BlueprintCamelContext should use Filter for serviceevents
> -
>
> Key: CAMEL-11878
> URL: https://issues.apache.org/jira/browse/CAMEL-11878
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-blueprint
>Reporter: Christoph Läubrich
>Priority: Minor
>
> Currently BlueprintCamelContext registers for all ServcieEvents in fact it is 
> only interrested in a very specific event type 
> (objectClass=org.osgi.service.blueprint.container.BlueprintContainer)
> Beside geting and testing more vents as neccesary, since it also logs each 
> event received if enabled Debug logging ALL Osgi-Service events are logged 
> (which might be much in a larger OSGi-App) making reading the logs really 
> hard.



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


[jira] [Resolved] (CAMEL-8657) Add Maven Plugin to generate route coverage report

2018-02-01 Thread Claus Ibsen (JIRA)

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

Claus Ibsen resolved CAMEL-8657.

Resolution: Fixed

We have a basic implementation now that can output route-coverage.

We can do new work in the future to generate a nice HTML report etc. Hopefully 
people in the community can step to build such things.

> Add Maven Plugin to generate route coverage report
> --
>
> Key: CAMEL-8657
> URL: https://issues.apache.org/jira/browse/CAMEL-8657
> Project: Camel
>  Issue Type: New Feature
>  Components: tests, tooling
>Reporter: Claus Ibsen
>Assignee: Claus Ibsen
>Priority: Major
> Fix For: 2.21.0
>
> Attachments: FilterTest-testSendMatchingMessage.xml, Screen Shot 
> 2015-04-18 at 11.38.05 AM.png
>
>
> With help from CAMEL-8656 we can enable unit tests to generate xml files with 
> route statistics.
> What we need is then a mvn plugin to generate a nice report from those, such 
> as a html page that has a summary, and then a detailed route with colored 
> lines for route usage, so you can spot which routes has unused parts etc.
> For starters the route can be dumped as xml from the report as its already in 
> xml format. Its a matter of removing the noise, and then apply css or what 
> style to do if exchangesTotal=0 and if its > 0 etc.



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


[jira] [Updated] (CAMEL-11223) camel-jpa doesn't handle exclusive locks for concurrent consumers when setting consumeDelete to false

2018-02-01 Thread Claus Ibsen (JIRA)

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

Claus Ibsen updated CAMEL-11223:

Priority: Minor  (was: Major)

> camel-jpa doesn't handle exclusive locks for concurrent consumers when 
> setting consumeDelete to false
> -
>
> Key: CAMEL-11223
> URL: https://issues.apache.org/jira/browse/CAMEL-11223
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-jpa
>Affects Versions: 2.18.3
> Environment: Java JDK  1.8.0_121
> Spring 4 (reproduced with Spring Boot 1.5.3)
> RedHat RHEL 7.1 x86_64
> Oracle 11G
>Reporter: TEIKITEETINI-VAYSSE Loic
>Priority: Minor
> Attachments: jira-camel-11223.zip
>
>
> Deploying 4 instances of the same app containing a camel-jpa consumer polling 
> on the same database, I noticed that several servers can consume the same 
> entities.
> The polling is currently done as follow :
> # Poll without lock on the `maxResult` first rows
> # On each row :
> ## Apply a lock _select ... for update (NOWAIT)_
> ## Consume entity
> ## Release the lock (commit)
> ## New Transaction
> ## Process exchange
> ## End Transaction
> What can happen with several instances of the consuming on the same database 
> is :
> # {color:green}Server 1 polls the 10 first rows{color}
> # {color:red}Server 2 polls the same 10 first rows{color}
> # {color:green}Server 1 locks row 1 for update and consume it{color}
> # {color:red}Server 2 locks row 1 for update as the previous lock is already 
> released and consumes it{color}
> This demand is related to my previous post on the user forum : 
> http://camel.465427.n5.nabble.com/JPA-consumer-component-is-not-handling-multiple-server-concurrent-polling-td5797937.html



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


[jira] [Updated] (CAMEL-11956) Support Spring 5.0.x

2018-02-01 Thread Claus Ibsen (JIRA)

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

Claus Ibsen updated CAMEL-11956:

Fix Version/s: (was: 2.21.0)
   2.22.0

> Support Spring 5.0.x
> 
>
> Key: CAMEL-11956
> URL: https://issues.apache.org/jira/browse/CAMEL-11956
> Project: Camel
>  Issue Type: Task
>  Components: camel-spring
>Affects Versions: 2.20.0
>Reporter: Guillaume Nodet
>Priority: Major
> Fix For: 2.22.0
>
>
> Not sure if camel runs correctly with spring 5.0.x, but the OSGi imports and 
> features exclude 5.x anyway...



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


[jira] [Updated] (CAMEL-11956) Support Spring 5.0.x

2018-02-01 Thread Claus Ibsen (JIRA)

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

Claus Ibsen updated CAMEL-11956:

Component/s: camel-spring

> Support Spring 5.0.x
> 
>
> Key: CAMEL-11956
> URL: https://issues.apache.org/jira/browse/CAMEL-11956
> Project: Camel
>  Issue Type: Task
>  Components: camel-spring
>Affects Versions: 2.20.0
>Reporter: Guillaume Nodet
>Priority: Major
> Fix For: 2.22.0
>
>
> Not sure if camel runs correctly with spring 5.0.x, but the OSGi imports and 
> features exclude 5.x anyway...



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


[jira] [Resolved] (CAMEL-12026) ensure camel bundle with spring configuration works in OSGi with aries-blueprint-spring bridge

2018-02-01 Thread Claus Ibsen (JIRA)

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

Claus Ibsen resolved CAMEL-12026.
-
Resolution: Won't Fix

> ensure camel bundle with spring configuration works in OSGi with 
> aries-blueprint-spring bridge
> --
>
> Key: CAMEL-12026
> URL: https://issues.apache.org/jira/browse/CAMEL-12026
> Project: Camel
>  Issue Type: Task
>Reporter: Freeman Fang
>Assignee: Freeman Fang
>Priority: Major
>
> the spring-dm won't work with spring 4.x, and there's a new blueprint-spring 
> introduced in Aries to make the spring configured bundle still work with 
> spring 4.x
> We need add back CamelContextFactoryBean.java and OsgiSpringCamelContext.java 
> which was removed with camel-spring-dm module, as they are "OSGi context 
> aware" and ensure we use OsgiComponentResolver, OsgiDataFormatResolver etc 
> with the bundle in OSGi.
> We need remove spring-dm dependency from those classes.



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


[jira] [Updated] (CAMEL-12048) Intermittent failure of SipIntegrationTest

2018-02-01 Thread Claus Ibsen (JIRA)

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

Claus Ibsen updated CAMEL-12048:

Priority: Minor  (was: Major)

> Intermittent failure of SipIntegrationTest
> --
>
> Key: CAMEL-12048
> URL: https://issues.apache.org/jira/browse/CAMEL-12048
> Project: Camel
>  Issue Type: Task
>  Components: camel-sip, tests
>Affects Versions: 2.20.1
>Reporter: Thomas Diesler
>Priority: Minor
>
> There are some exceptions in the test log:
> {code}
> #27;[0m#27;[31m10:36:04,409 ERROR [PresenceAgent] (PipelineThread-0) 
> Detected a parse error: java.text.ParseException: [C@5cf84b8b
> Unexpected Token : Call-ID
>   at gov.nist.core.LexerCore.match(LexerCore.java:231)
>   at gov.nist.javax.sip.parser.CallIDParser.parse(CallIDParser.java:66)
>   at 
> gov.nist.javax.sip.parser.StringMsgParser.processHeader(StringMsgParser.java:280)
>   at 
> gov.nist.javax.sip.parser.StringMsgParser.parseSIPMessage(StringMsgParser.java:170)
>   at 
> gov.nist.javax.sip.parser.PipelinedMsgParser.run(PipelinedMsgParser.java:304)
>   at java.lang.Thread.run(Thread.java:745)
> #27;[0m#27;[31m10:36:04,415 ERROR 
> [org.apache.camel.component.sip.listener.SipPresenceAgentListener] 
> (EventScannerThread) Exception thrown during publish/notify processing in the 
> Sip Presence Agent Listener: java.lang.NullPointerException
>   at 
> org.apache.camel.component.sip.listener.SipPresenceAgentListener.sendNotification(SipPresenceAgentListener.java:82)
>   at 
> org.apache.camel.component.sip.listener.SipPresenceAgentListener.processPublish(SipPresenceAgentListener.java:124)
>   at 
> org.apache.camel.component.sip.listener.SipPresenceAgentListener.processRequest(SipPresenceAgentListener.java:64)
>   at gov.nist.javax.sip.EventScanner.deliverEvent(EventScanner.java:227)
>   at gov.nist.javax.sip.EventScanner.run(EventScanner.java:517)
>   at java.lang.Thread.run(Thread.java:745)
> #27;[0m#27;[0m10:36:14,380 INFO  
> [org.apache.camel.impl.DefaultCamelContext] (pool-2-thread-1) Apache Camel 
> 2.20.0 (CamelContext: camel-255) is shutting down
> #27;[0m#27;[0m10:36:14,381 INFO  
> [org.apache.camel.impl.DefaultShutdownStrategy] (pool-2-thread-1) Starting to 
> graceful shutdown 2 routes (timeout 300 seconds)
> #27;[0m#27;[0m10:36:14,381 INFO  
> [org.apache.camel.impl.DefaultShutdownStrategy] (Camel (camel-255) thread 
> #429 - ShutdownTask) Route: route325 shutdown complete, was consuming from: 
> sip://johndoe@localhost:17190?eventHeaderName=evtHdrName=evtid=Subscriber=localhost=17189=agent
> #27;[0m#27;[31m10:36:14,385 ERROR [PresenceAgent] (PipelineThread-0) 
> Detected a parse error: java.text.ParseException: [C@794d5e00 getNextChar: 
> End of buffer
>   at gov.nist.core.StringTokenizer.getNextChar(StringTokenizer.java:147)
>   at gov.nist.core.LexerCore.peekNextToken(LexerCore.java:187)
>   at gov.nist.javax.sip.parser.URLParser.uriReference(URLParser.java:339)
>   at 
> gov.nist.javax.sip.parser.RequestLineParser.parse(RequestLineParser.java:60)
>   at 
> gov.nist.javax.sip.parser.StringMsgParser.processFirstLine(StringMsgParser.java:230)
>   at 
> gov.nist.javax.sip.parser.StringMsgParser.parseSIPMessage(StringMsgParser.java:158)
>   at 
> gov.nist.javax.sip.parser.PipelinedMsgParser.run(PipelinedMsgParser.java:304)
>   at java.lang.Thread.run(Thread.java:745)
> {code}
> CrossRef: https://github.com/wildfly-extras/wildfly-camel/issues/2229



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


[jira] [Commented] (CAMEL-12052) MBean method addOrUpdateRoutesFromXml should validate route XML

2018-02-01 Thread Claus Ibsen (JIRA)

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

Claus Ibsen commented on CAMEL-12052:
-

This can be a bit tricker if you update an existing route, then the old route 
must first be stopped/remove before the new one is added/started.

It also depends what you mean by validate. The XML is parsed first, so you 
cannot submit invalid XML. 

> MBean method addOrUpdateRoutesFromXml should validate route XML
> ---
>
> Key: CAMEL-12052
> URL: https://issues.apache.org/jira/browse/CAMEL-12052
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-core, jmx
>Reporter: James Netherton
>Priority: Major
>
> With JMX you can invoke the addOrUpdateRoutesFromXml method to change a route 
> definition.
> The old route is removed before the new one is added. This is a problem if 
> the provided route XML definition is not valid. In this case, the new route 
> will not be created, but the old one has already been removed. So things are 
> left in a dirty state,
> We should check to see whether the updated route is valid before attempting 
> to remove it.



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


[jira] [Commented] (CAMEL-12052) MBean method addOrUpdateRoutesFromXml should validate route XML

2018-02-01 Thread Claus Ibsen (JIRA)

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

Claus Ibsen commented on CAMEL-12052:
-

Also this JMX operation is for devlopment and not production usage, you should 
not update any running routes in live production.

> MBean method addOrUpdateRoutesFromXml should validate route XML
> ---
>
> Key: CAMEL-12052
> URL: https://issues.apache.org/jira/browse/CAMEL-12052
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-core, jmx
>Reporter: James Netherton
>Priority: Minor
>
> With JMX you can invoke the addOrUpdateRoutesFromXml method to change a route 
> definition.
> The old route is removed before the new one is added. This is a problem if 
> the provided route XML definition is not valid. In this case, the new route 
> will not be created, but the old one has already been removed. So things are 
> left in a dirty state,
> We should check to see whether the updated route is valid before attempting 
> to remove it.



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


[jira] [Updated] (CAMEL-12052) MBean method addOrUpdateRoutesFromXml should validate route XML

2018-02-01 Thread Claus Ibsen (JIRA)

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

Claus Ibsen updated CAMEL-12052:

Priority: Minor  (was: Major)

> MBean method addOrUpdateRoutesFromXml should validate route XML
> ---
>
> Key: CAMEL-12052
> URL: https://issues.apache.org/jira/browse/CAMEL-12052
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-core, jmx
>Reporter: James Netherton
>Priority: Minor
>
> With JMX you can invoke the addOrUpdateRoutesFromXml method to change a route 
> definition.
> The old route is removed before the new one is added. This is a problem if 
> the provided route XML definition is not valid. In this case, the new route 
> will not be created, but the old one has already been removed. So things are 
> left in a dirty state,
> We should check to see whether the updated route is valid before attempting 
> to remove it.



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


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

2018-02-01 Thread Claus Ibsen (JIRA)

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

Claus Ibsen commented on CAMEL-12114:
-

This parser is for internal tooling in Apache Camel. Are you using it for 
something?

> 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] [Commented] (CAMEL-12100) Camel Hystrix component should be transparent for exceptions while `closed` and not using fallback

2018-02-01 Thread Claus Ibsen (JIRA)

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

Claus Ibsen commented on CAMEL-12100:
-

Any update on this?

> Camel Hystrix component should be transparent for exceptions while `closed` 
> and not using fallback 
> ---
>
> Key: CAMEL-12100
> URL: https://issues.apache.org/jira/browse/CAMEL-12100
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-hystrix
>Affects Versions: 2.19.4
>Reporter: Oskar Huminiecki
>Priority: Major
>
> Circuit breaker should be transparent when `closed` - so until it is `open` 
> all exceptions should be passed through not wrapped as it happening now (when 
> fallback is disabled)
> Hystrix library always wraps cause with `HystrixRuntimeException` but Java 
> aspect implementation unwraps it and in result annotation based hystrix in 
> Java is transparent.
> And it should behave same way in Camel.
> As it would be big change in existing behaviour I would suggest new parameter 
> `transparent` default to `false`. When set to true then original cause would 
> be re-thrown (as it is implemented in `HystrixCommandAspect` from 
> `hystrix-javanica`)



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


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

2018-02-01 Thread Claus Ibsen (JIRA)

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

Claus Ibsen updated CAMEL-12114:

Priority: Minor  (was: Major)

> 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-11876) OsgiCamelContextPublisher might leak Service-References

2018-02-01 Thread Claus Ibsen (JIRA)

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

Claus Ibsen resolved CAMEL-11876.
-
Resolution: Fixed

> OsgiCamelContextPublisher might leak Service-References
> ---
>
> Key: CAMEL-11876
> URL: https://issues.apache.org/jira/browse/CAMEL-11876
> Project: Camel
>  Issue Type: Bug
>  Components: osgi
>Reporter: Christoph Läubrich
>Assignee: Claus Ibsen
>Priority: Minor
> Fix For: 2.21.0
>
>
> OsgiCamelContextPublisher holds a Map of Service-References in its doShutdown 
> method this map is cleared.
> This could lead to problem when there are still items in the map.
> Instead of clearing the map, it should be iterate+remove
> {code:java}
> Iterator it = registrations.values().iterator();
>   while (it.hasNext()) {
>   it.next().unregister();
>   it.remove();
>   }
> {code}



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


[jira] [Resolved] (CAMEL-12220) Add Trigger based download to RemoteFileComponent

2018-02-01 Thread Pavel Kostelnik (JIRA)

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

Pavel Kostelnik resolved CAMEL-12220.
-
   Resolution: Not A Problem
Fix Version/s: 2.20.0

Already implemented using the doneFileName option

> Add Trigger based download to RemoteFileComponent
> -
>
> Key: CAMEL-12220
> URL: https://issues.apache.org/jira/browse/CAMEL-12220
> Project: Camel
>  Issue Type: New Feature
>  Components: camel-ftp
>Affects Versions: 2.20.0
>Reporter: Pavel Kostelnik
>Priority: Minor
> Fix For: 2.20.0
>
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> I would like to request a feature that allows trigger based download via 
> additional uri parameters.
>  
> USE CASE DESCRIPTION
> In enterprise env. we often see file downloads ((s)FTP(s)) to be based on 
> trigger files instead of using File locks. Meaning an extra empty file is 
> created once original process is finished filling up the actual data file 
> with data. Only after trigger is created data file is viable for pick up. 
> This is to avoid pick up of partial data.
>  
> TRIGGER LOGIC
> Triggers are usually named the same way as the actual data files. So if data 
> file being created is dataFile.txt then trigger filename is usually 
> dataFile.txt.trig or dataFile.trig (depending on trigger policy).
> We see 2 trigger file policies being applied - APPEND (more common - 
> dataFile.txt.trig) or REPLACE (less common dataFile.trig). 
>  
> SUGGESTED NEW URI PARAMs
>  * triggerExtension (default to "trig" but can be anything really)
>  * triggerPolicy (possible values APPEND or REPLACE - default to APPEND)
>  
> SUGGESTED IMPLEMENTATION
> Look for trigger files first and then use pollEnrich() and replace trigger 
> file name downloaded appropriatelly for actual dataFile based on trigger 
> extension and trigger policy
>  
>  
> If this is not picked up by anybody else our team will pick up and implement 
> and will create a pull request



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


[jira] [Commented] (CAMEL-12220) Add Trigger based download to RemoteFileComponent

2018-02-01 Thread Pavel Kostelnik (JIRA)

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

Pavel Kostelnik commented on CAMEL-12220:
-

Hi :) who else to reply... 

Anyway thanks after research here --> 
[https://stackoverflow.com/questions/35048765/apache-camel-file-with-donefilename]
 is an example that sums it up.

 

Closing issue 

> Add Trigger based download to RemoteFileComponent
> -
>
> Key: CAMEL-12220
> URL: https://issues.apache.org/jira/browse/CAMEL-12220
> Project: Camel
>  Issue Type: New Feature
>  Components: camel-ftp
>Affects Versions: 2.20.0
>Reporter: Pavel Kostelnik
>Priority: Minor
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> I would like to request a feature that allows trigger based download via 
> additional uri parameters.
>  
> USE CASE DESCRIPTION
> In enterprise env. we often see file downloads ((s)FTP(s)) to be based on 
> trigger files instead of using File locks. Meaning an extra empty file is 
> created once original process is finished filling up the actual data file 
> with data. Only after trigger is created data file is viable for pick up. 
> This is to avoid pick up of partial data.
>  
> TRIGGER LOGIC
> Triggers are usually named the same way as the actual data files. So if data 
> file being created is dataFile.txt then trigger filename is usually 
> dataFile.txt.trig or dataFile.trig (depending on trigger policy).
> We see 2 trigger file policies being applied - APPEND (more common - 
> dataFile.txt.trig) or REPLACE (less common dataFile.trig). 
>  
> SUGGESTED NEW URI PARAMs
>  * triggerExtension (default to "trig" but can be anything really)
>  * triggerPolicy (possible values APPEND or REPLACE - default to APPEND)
>  
> SUGGESTED IMPLEMENTATION
> Look for trigger files first and then use pollEnrich() and replace trigger 
> file name downloaded appropriatelly for actual dataFile based on trigger 
> extension and trigger policy
>  
>  
> If this is not picked up by anybody else our team will pick up and implement 
> and will create a pull request



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


[jira] [Commented] (CAMEL-12220) Add Trigger based download to RemoteFileComponent

2018-02-01 Thread Claus Ibsen (JIRA)

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

Claus Ibsen commented on CAMEL-12220:
-

Such functionality is already there with the done file name option

> Add Trigger based download to RemoteFileComponent
> -
>
> Key: CAMEL-12220
> URL: https://issues.apache.org/jira/browse/CAMEL-12220
> Project: Camel
>  Issue Type: New Feature
>  Components: camel-ftp
>Affects Versions: 2.20.0
>Reporter: Pavel Kostelnik
>Priority: Minor
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> I would like to request a feature that allows trigger based download via 
> additional uri parameters.
>  
> USE CASE DESCRIPTION
> In enterprise env. we often see file downloads ((s)FTP(s)) to be based on 
> trigger files instead of using File locks. Meaning an extra empty file is 
> created once original process is finished filling up the actual data file 
> with data. Only after trigger is created data file is viable for pick up. 
> This is to avoid pick up of partial data.
>  
> TRIGGER LOGIC
> Triggers are usually named the same way as the actual data files. So if data 
> file being created is dataFile.txt then trigger filename is usually 
> dataFile.txt.trig or dataFile.trig (depending on trigger policy).
> We see 2 trigger file policies being applied - APPEND (more common - 
> dataFile.txt.trig) or REPLACE (less common dataFile.trig). 
>  
> SUGGESTED NEW URI PARAMs
>  * triggerExtension (default to "trig" but can be anything really)
>  * triggerPolicy (possible values APPEND or REPLACE - default to APPEND)
>  
> SUGGESTED IMPLEMENTATION
> Look for trigger files first and then use pollEnrich() and replace trigger 
> file name downloaded appropriatelly for actual dataFile based on trigger 
> extension and trigger policy
>  
>  
> If this is not picked up by anybody else our team will pick up and implement 
> and will create a pull request



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


[jira] [Created] (CAMEL-12220) Add Trigger based download to RemoteFileComponent

2018-02-01 Thread Pavel Kostelnik (JIRA)
Pavel Kostelnik created CAMEL-12220:
---

 Summary: Add Trigger based download to RemoteFileComponent
 Key: CAMEL-12220
 URL: https://issues.apache.org/jira/browse/CAMEL-12220
 Project: Camel
  Issue Type: New Feature
  Components: camel-ftp
Affects Versions: 2.20.0
Reporter: Pavel Kostelnik


I would like to request a feature that allows trigger based download via 
additional uri parameters.

 

USE CASE DESCRIPTION

In enterprise env. we often see file downloads ((s)FTP(s)) to be based on 
trigger files instead of using File locks. Meaning an extra empty file is 
created once original process is finished filling up the actual data file with 
data. Only after trigger is created data file is viable for pick up. This is to 
avoid pick up of partial data.

 

TRIGGER LOGIC

Triggers are usually named the same way as the actual data files. So if data 
file being created is dataFile.txt then trigger filename is usually 
dataFile.txt.trig or dataFile.trig (depending on trigger policy).

We see 2 trigger file policies being applied - APPEND (more common - 
dataFile.txt.trig) or REPLACE (less common dataFile.trig). 

 

SUGGESTED NEW URI PARAMs
 * triggerExtension (default to "trig" but can be anything really)
 * triggerPolicy (possible values APPEND or REPLACE - default to APPEND)

 

SUGGESTED IMPLEMENTATION

Look for trigger files first and then use pollEnrich() and replace trigger file 
name downloaded appropriatelly for actual dataFile based on trigger extension 
and trigger policy

 

 

If this is not picked up by anybody else our team will pick up and implement 
and will create a pull request



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


[jira] [Commented] (CAMEL-12217) Camel REST DSL API - Multiple Content Type - XML Error

2018-02-01 Thread Claus Ibsen (JIRA)

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

Claus Ibsen commented on CAMEL-12217:
-

Getting JAXB to work with jaxb.index files can be a bit tricky sometimes

> Camel REST DSL API - Multiple Content Type - XML Error
> --
>
> Key: CAMEL-12217
> URL: https://issues.apache.org/jira/browse/CAMEL-12217
> Project: Camel
>  Issue Type: Bug
>  Components: camel-core, camel-jaxb, camel-servlet
>Affects Versions: 2.20.1, 2.20.2
> Environment: * Windows 10
>  * JVM 1.8
>  * IntelliJ IDEA
>  * Maven 3.3.3
>Reporter: Rafael Manzoni
>Priority: Major
> Fix For: 2.21.0
>
> Attachments: credits-v1.zip
>
>
> I am trying to create a Camel REST service via Java DSL that can 
> consume/produce both json and xml and the JSON works but I receive the an 
> error when I try to retrieve the result in XML.
> RestConfiguration:
> {code:java}
> /**
>  * This configuration is for start the Apache Camel application with the 
> Spring Boot servlet
>  * @author rafael.manzoni
>  */
> public class RestConfiguration extends RouteBuilder {
>  @Override
>  public void configure() throws Exception {
>  restConfiguration()
>  .component("servlet")
>  .contextPath("/credits/v1")
>  .enableCORS(true)
>  .apiContextPath("/api-doc")
>  .apiProperty("api.title", "REST API")
>  .apiProperty("api.version", "v1")
>  .apiContextRouteId("doc-api")
>  .bindingMode(RestBindingMode.auto)
>  .dataFormatProperty("prettyPrint", "true")
>  .dataFormatProperty("mustBeJAXBElement", "true");
>  }
> }{code}
> RestMethods:
> {code:java}
> /**
>  * Rest methods configuration. Apply all HTTP routes to Camel Routes
>  * @author REST Methods Configuration
>  */
> public class RestMethods extends RouteBuilder {
>  @Override
>  public void configure() throws Exception {
>  rest()
>  .bindingMode(RestBindingMode.auto)
>  .consumes("application/json, application/xml")
>  .produces("application/json, application/xml")
>  .get("/rating")
>  .toD("direct:getRatingByClient");
>  }
> }{code}
>  
> Route Implementation:
> {code:java}
> public class GetRatingByClientRoute extends RouteBuilder{
>  // Use to created the mock
>  private final ObjectMapper objectMapper = new ObjectMapper();
>  @Override
>  public void configure() throws Exception {
>  
>  from("direct:getRatingByClient")
>  // Request
>  .to("log:init")
>  // Mediation
>  .process(exchange -> {
>  // TODO Implement route
>  TestEntity test = new TestEntity();
>  test.setTestAttribute("Teste");
>  exchange.getIn().setBody(test);
>  })
>  // Response
>  .to("log:end");
>  
>  }
> }{code}
> When I run with Content-Type application/json works like a charm. But, when i 
> run with Content-Type application/xml i got this error: 
> *_java.io.IOException: org.apache.camel.InvalidPayloadException: No body 
> available of type: javax.xml.bind.JAXBElement but has value: class 
> GetRatingByClientRouteResponse_*
> Follow the requisition that I´m testing:
> _*Success:*_
> curl -X GET \ 
> '[http://localhost:8080/credits/v1/rating?client_cpf_cnpj=111]' \ -H 
> 'Accept: application/json' \ -H 'Cache-Control: no-cache' \ -H 'Content-Type: 
> application/json'
>  
> _*Failure:*_
> curl -X GET \ 
> '[http://localhost:8080/credits/v1/rating?client_cpf_cnpj=111]' \ -H 
> 'Accept: application/xml' \ -H 'Cache-Control: no-cache' \ -H 'Content-Type: 
> application/xml'
>  
> I´m attaching the project to this issue.



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


[jira] [Commented] (CAMEL-12217) Camel REST DSL API - Multiple Content Type - XML Error

2018-02-01 Thread Claus Ibsen (JIRA)

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

Claus Ibsen commented on CAMEL-12217:
-

You need to use jaxb.index files for your JAXB classes. Or you can turn off the 
data format to require a JAXBElement by

.dataFormatProperty("mustBeJAXBElement", "false");

> Camel REST DSL API - Multiple Content Type - XML Error
> --
>
> Key: CAMEL-12217
> URL: https://issues.apache.org/jira/browse/CAMEL-12217
> Project: Camel
>  Issue Type: Bug
>  Components: camel-core, camel-jaxb, camel-servlet
>Affects Versions: 2.20.1, 2.20.2
> Environment: * Windows 10
>  * JVM 1.8
>  * IntelliJ IDEA
>  * Maven 3.3.3
>Reporter: Rafael Manzoni
>Priority: Major
> Fix For: 2.21.0
>
> Attachments: credits-v1.zip
>
>
> I am trying to create a Camel REST service via Java DSL that can 
> consume/produce both json and xml and the JSON works but I receive the an 
> error when I try to retrieve the result in XML.
> RestConfiguration:
> {code:java}
> /**
>  * This configuration is for start the Apache Camel application with the 
> Spring Boot servlet
>  * @author rafael.manzoni
>  */
> public class RestConfiguration extends RouteBuilder {
>  @Override
>  public void configure() throws Exception {
>  restConfiguration()
>  .component("servlet")
>  .contextPath("/credits/v1")
>  .enableCORS(true)
>  .apiContextPath("/api-doc")
>  .apiProperty("api.title", "REST API")
>  .apiProperty("api.version", "v1")
>  .apiContextRouteId("doc-api")
>  .bindingMode(RestBindingMode.auto)
>  .dataFormatProperty("prettyPrint", "true")
>  .dataFormatProperty("mustBeJAXBElement", "true");
>  }
> }{code}
> RestMethods:
> {code:java}
> /**
>  * Rest methods configuration. Apply all HTTP routes to Camel Routes
>  * @author REST Methods Configuration
>  */
> public class RestMethods extends RouteBuilder {
>  @Override
>  public void configure() throws Exception {
>  rest()
>  .bindingMode(RestBindingMode.auto)
>  .consumes("application/json, application/xml")
>  .produces("application/json, application/xml")
>  .get("/rating")
>  .toD("direct:getRatingByClient");
>  }
> }{code}
>  
> Route Implementation:
> {code:java}
> public class GetRatingByClientRoute extends RouteBuilder{
>  // Use to created the mock
>  private final ObjectMapper objectMapper = new ObjectMapper();
>  @Override
>  public void configure() throws Exception {
>  
>  from("direct:getRatingByClient")
>  // Request
>  .to("log:init")
>  // Mediation
>  .process(exchange -> {
>  // TODO Implement route
>  TestEntity test = new TestEntity();
>  test.setTestAttribute("Teste");
>  exchange.getIn().setBody(test);
>  })
>  // Response
>  .to("log:end");
>  
>  }
> }{code}
> When I run with Content-Type application/json works like a charm. But, when i 
> run with Content-Type application/xml i got this error: 
> *_java.io.IOException: org.apache.camel.InvalidPayloadException: No body 
> available of type: javax.xml.bind.JAXBElement but has value: class 
> GetRatingByClientRouteResponse_*
> Follow the requisition that I´m testing:
> _*Success:*_
> curl -X GET \ 
> '[http://localhost:8080/credits/v1/rating?client_cpf_cnpj=111]' \ -H 
> 'Accept: application/json' \ -H 'Cache-Control: no-cache' \ -H 'Content-Type: 
> application/json'
>  
> _*Failure:*_
> curl -X GET \ 
> '[http://localhost:8080/credits/v1/rating?client_cpf_cnpj=111]' \ -H 
> 'Accept: application/xml' \ -H 'Cache-Control: no-cache' \ -H 'Content-Type: 
> application/xml'
>  
> I´m attaching the project to this issue.



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


[jira] [Resolved] (CAMEL-12217) Camel REST DSL API - Multiple Content Type - XML Error

2018-02-01 Thread Claus Ibsen (JIRA)

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

Claus Ibsen resolved CAMEL-12217.
-
   Resolution: Invalid
 Assignee: Claus Ibsen
Fix Version/s: 2.21.0

> Camel REST DSL API - Multiple Content Type - XML Error
> --
>
> Key: CAMEL-12217
> URL: https://issues.apache.org/jira/browse/CAMEL-12217
> Project: Camel
>  Issue Type: Bug
>  Components: camel-core, camel-jaxb, camel-servlet
>Affects Versions: 2.20.1, 2.20.2
> Environment: * Windows 10
>  * JVM 1.8
>  * IntelliJ IDEA
>  * Maven 3.3.3
>Reporter: Rafael Manzoni
>Assignee: Claus Ibsen
>Priority: Major
> Fix For: 2.21.0
>
> Attachments: credits-v1.zip
>
>
> I am trying to create a Camel REST service via Java DSL that can 
> consume/produce both json and xml and the JSON works but I receive the an 
> error when I try to retrieve the result in XML.
> RestConfiguration:
> {code:java}
> /**
>  * This configuration is for start the Apache Camel application with the 
> Spring Boot servlet
>  * @author rafael.manzoni
>  */
> public class RestConfiguration extends RouteBuilder {
>  @Override
>  public void configure() throws Exception {
>  restConfiguration()
>  .component("servlet")
>  .contextPath("/credits/v1")
>  .enableCORS(true)
>  .apiContextPath("/api-doc")
>  .apiProperty("api.title", "REST API")
>  .apiProperty("api.version", "v1")
>  .apiContextRouteId("doc-api")
>  .bindingMode(RestBindingMode.auto)
>  .dataFormatProperty("prettyPrint", "true")
>  .dataFormatProperty("mustBeJAXBElement", "true");
>  }
> }{code}
> RestMethods:
> {code:java}
> /**
>  * Rest methods configuration. Apply all HTTP routes to Camel Routes
>  * @author REST Methods Configuration
>  */
> public class RestMethods extends RouteBuilder {
>  @Override
>  public void configure() throws Exception {
>  rest()
>  .bindingMode(RestBindingMode.auto)
>  .consumes("application/json, application/xml")
>  .produces("application/json, application/xml")
>  .get("/rating")
>  .toD("direct:getRatingByClient");
>  }
> }{code}
>  
> Route Implementation:
> {code:java}
> public class GetRatingByClientRoute extends RouteBuilder{
>  // Use to created the mock
>  private final ObjectMapper objectMapper = new ObjectMapper();
>  @Override
>  public void configure() throws Exception {
>  
>  from("direct:getRatingByClient")
>  // Request
>  .to("log:init")
>  // Mediation
>  .process(exchange -> {
>  // TODO Implement route
>  TestEntity test = new TestEntity();
>  test.setTestAttribute("Teste");
>  exchange.getIn().setBody(test);
>  })
>  // Response
>  .to("log:end");
>  
>  }
> }{code}
> When I run with Content-Type application/json works like a charm. But, when i 
> run with Content-Type application/xml i got this error: 
> *_java.io.IOException: org.apache.camel.InvalidPayloadException: No body 
> available of type: javax.xml.bind.JAXBElement but has value: class 
> GetRatingByClientRouteResponse_*
> Follow the requisition that I´m testing:
> _*Success:*_
> curl -X GET \ 
> '[http://localhost:8080/credits/v1/rating?client_cpf_cnpj=111]' \ -H 
> 'Accept: application/json' \ -H 'Cache-Control: no-cache' \ -H 'Content-Type: 
> application/json'
>  
> _*Failure:*_
> curl -X GET \ 
> '[http://localhost:8080/credits/v1/rating?client_cpf_cnpj=111]' \ -H 
> 'Accept: application/xml' \ -H 'Cache-Control: no-cache' \ -H 'Content-Type: 
> application/xml'
>  
> I´m attaching the project to this issue.



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


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

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

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

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-362216834
 
 
   AFAIK, async servlet API handles requests by writing to HttpServletResponse 
and setting context.complete(). Currently (before what i have done) what is 
done in CamelServlet is to do this and process camel's exchange with  
`consumer.getProcessor().process`. What i have added is to call 
`consumer.getAsyncProcessor().process(exchange, asyncCallback)` with a proper 
asyncCallBack in which callkback.done(false) is called after completing to 
write to HttpServletResponse, which will trigger context.complete(). 
   If you can describe what your thinking around the subject of the complexity, 
i'd like to try to implement..
   
   Thanks for the review.


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-12192) BindyCsvDataFormat does not support skip fields

2018-02-01 Thread Neo Xu (JIRA)

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

Neo Xu commented on CAMEL-12192:


[~davsclaus] Thank you for accepting my code.

> BindyCsvDataFormat does not support skip fields 
> 
>
> Key: CAMEL-12192
> URL: https://issues.apache.org/jira/browse/CAMEL-12192
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-bindy
>Affects Versions: 2.15.1, 2.20.1
>Reporter: Neo Xu
>Assignee: Claus Ibsen
>Priority: Major
> Fix For: 2.21.0
>
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> Currently: BindyCsvDataFormat has to map all the fields in a CSV file.
>  If there are 200 fields in a CSV file, it has to create 200 fields in a 
> class. But sometimes, it is only interested in 20 fields. So it needs to skip 
> some positions if they are not required. But BindyCsvDataFormat will throw an 
> exception in this case. 
>  



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


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

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

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

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-362211942
 
 
   This is not entirely correct, its more complicated to implement


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] [Updated] (CAMEL-12195) camel redeliveries does not work with hystrix

2018-02-01 Thread Claus Ibsen (JIRA)

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

Claus Ibsen updated CAMEL-12195:

Fix Version/s: 2.21.0

> 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] [Resolved] (CAMEL-12195) camel redeliveries does not work with hystrix

2018-02-01 Thread Claus Ibsen (JIRA)

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

Claus Ibsen resolved CAMEL-12195.
-
Resolution: Not A Problem
  Assignee: Claus Ibsen

That is how Hystrix EIP / CB EIP is intended to work. It has its own kind of 
error handling logic where you can use a fallback if there was a problem.

> 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
>
> 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] [Resolved] (CAMEL-12060) split exceptions not caught with nested splits & subroutes

2018-02-01 Thread Claus Ibsen (JIRA)

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

Claus Ibsen resolved CAMEL-12060.
-
Resolution: Won't Fix
  Assignee: Claus Ibsen

You need to turn off error handling on your direct routes. 

 

And current behavior is how the routing engine works.

> split exceptions not caught with nested splits & subroutes 
> ---
>
> Key: CAMEL-12060
> URL: https://issues.apache.org/jira/browse/CAMEL-12060
> Project: Camel
>  Issue Type: Bug
>Affects Versions: 2.18.3, 2.20.1
> Environment: Windows, JDK 1.8.0_152
>Reporter: Paul McCulloch
>Assignee: Claus Ibsen
>Priority: Minor
> Attachments: TestCamel12060.java
>
>
> A route with a split within a split using direct: subroutes within either the 
> outer or inner split() does not have exceptions (within the split() handled 
> correctly).
> A test case is attached showing the same logic with & without subroutes.



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


[jira] [Updated] (CAMEL-12060) split exceptions not caught with nested splits & subroutes

2018-02-01 Thread Claus Ibsen (JIRA)

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

Claus Ibsen updated CAMEL-12060:

Priority: Minor  (was: Major)

> split exceptions not caught with nested splits & subroutes 
> ---
>
> Key: CAMEL-12060
> URL: https://issues.apache.org/jira/browse/CAMEL-12060
> Project: Camel
>  Issue Type: Bug
>Affects Versions: 2.18.3, 2.20.1
> Environment: Windows, JDK 1.8.0_152
>Reporter: Paul McCulloch
>Priority: Minor
> Attachments: TestCamel12060.java
>
>
> A route with a split within a split using direct: subroutes within either the 
> outer or inner split() does not have exceptions (within the split() handled 
> correctly).
> A test case is attached showing the same logic with & without subroutes.



--
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-01 Thread Russ Johnson (JIRA)

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

Russ Johnson commented on CAMEL-12180:
--

OK - I'll prepare a PR on my side so I can verify the unit tests, and will keep 
an eye out for the Karaf bundle release before submitting the 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-12180) camel-braintree - Downgrade to version without org.json

2018-02-01 Thread Andrea Cosentino (JIRA)

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

Andrea Cosentino commented on CAMEL-12180:
--

Before update we need to have a Karaf bundle for that version. It will be 
released in these days.

> 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] [Resolved] (CAMEL-12181) XML Signature: '#' missing in ObjectReference attribute of XADES element DataObjectFormat

2018-02-01 Thread Claus Ibsen (JIRA)

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

Claus Ibsen resolved CAMEL-12181.
-
Resolution: Fixed

> XML Signature: '#' missing in ObjectReference attribute of XADES element 
> DataObjectFormat
> -
>
> Key: CAMEL-12181
> URL: https://issues.apache.org/jira/browse/CAMEL-12181
> Project: Camel
>  Issue Type: Bug
>  Components: camel-xmlsecurity
>Affects Versions: 2.18.5, 2.19.4, 2.20.1
>Reporter: Franz Forsthofer
>Assignee: Franz Forsthofer
>Priority: Major
> Fix For: 2.19.5, 2.20.3, 2.21.0
>
>
> If you create an XML Signature with a XADES element DataObjectFormat then you 
> get currently an XML which is similar as shown in the following snippet:
>  URI="#_4dccda23-2c67-487b-b7f2-30188bb089f7">
> ...
>  
> ...
> {color:#00} ObjectReference="_1a612e6b-0da6-4695-a8f7-d189a47a7e05">{color}
> {color:#00}    …{color}
> {color:#00}{color}
>  
> {color:#00}The ObjectReference value 
> "_1a612e6b-0da6-4695-a8f7-d189a47a7e05" is not a valid URI. The  character 
> '#' is missing at the beginning of the value{color}



--
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-01 Thread Claus Ibsen (JIRA)

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

Claus Ibsen commented on CAMEL-12180:
-

Yeah you are welcome to do a PR and run the unit tests to ensure it still works

> 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-01 Thread Russ Johnson (JIRA)

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

Russ Johnson commented on CAMEL-12180:
--

Braintree has just released version 2.75.0 of their Java SDK here: 
[https://github.com/braintree/braintree_java/releases/tag/2.75.0] and it no 
longer uses org.json

I've taken a look, and I don't believe there are any issues with the work I've 
recently done on the camel component.

I suspect it would be easiest for you to upgrade to version 2.75.0 of the 
braintree SDK, but let me know if you want a new ticket opened and for me to do 
a pull request for this.

Let me know, and thanks for the help.

 

> 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-12181) XML Signature: '#' missing in ObjectReference attribute of XADES element DataObjectFormat

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

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

ASF GitHub Bot commented on CAMEL-12181:


davsclaus closed pull request #2203: CAMEL-12181: XML Signature: '#' missing in 
ObjectReference attribute 
URL: https://github.com/apache/camel/pull/2203
 
 
   

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-xmlsecurity/src/main/java/org/apache/camel/component/xmlsecurity/api/XAdESSignatureProperties.java
 
b/components/camel-xmlsecurity/src/main/java/org/apache/camel/component/xmlsecurity/api/XAdESSignatureProperties.java
index 06ef1c7c9e3..da263dd9847 100644
--- 
a/components/camel-xmlsecurity/src/main/java/org/apache/camel/component/xmlsecurity/api/XAdESSignatureProperties.java
+++ 
b/components/camel-xmlsecurity/src/main/java/org/apache/camel/component/xmlsecurity/api/XAdESSignatureProperties.java
@@ -740,7 +740,7 @@ protected String addDataObjectFormat(Element 
signedDataObjectProperties, Documen
 Element dataObjectFormat = createElement("DataObjectFormat", doc, 
input);
 signedDataObjectProperties.appendChild(dataObjectFormat);
 String contentReferenceId = "_" + UUID.randomUUID().toString();
-setAttribute(dataObjectFormat, "ObjectReference", contentReferenceId);
+setAttribute(dataObjectFormat, "ObjectReference", "#" + 
contentReferenceId);
 
 if (getDataObjectFormatDescription() != null && 
!getDataObjectFormatDescription().isEmpty()) {
 Element description = createElement("Description", doc, input);
diff --git 
a/components/camel-xmlsecurity/src/test/java/org/apache/camel/component/xmlsecurity/XAdESSignaturePropertiesTest.java
 
b/components/camel-xmlsecurity/src/test/java/org/apache/camel/component/xmlsecurity/XAdESSignaturePropertiesTest.java
index 5a75256c0b0..eb64c1afd3c 100644
--- 
a/components/camel-xmlsecurity/src/test/java/org/apache/camel/component/xmlsecurity/XAdESSignaturePropertiesTest.java
+++ 
b/components/camel-xmlsecurity/src/test/java/org/apache/camel/component/xmlsecurity/XAdESSignaturePropertiesTest.java
@@ -223,6 +223,7 @@ public void envelopingAllParameters() throws Exception {
 //DataObjectFormat
 checkXpath(doc, pathToDataObjectProperties + 
"etsi:DataObjectFormat/etsi:Description/text()", prefix2Namespace, "invoice");
 checkXpath(doc, pathToDataObjectProperties + 
"etsi:DataObjectFormat/etsi:MimeType/text()", prefix2Namespace, "text/xml");
+checkXpath(doc, pathToDataObjectProperties + 
"etsi:DataObjectFormat/@ObjectReference", prefix2Namespace, "#", true);
 checkXpath(doc, pathToDataObjectProperties + 
"etsi:DataObjectFormat/etsi:ObjectIdentifier/etsi:Identifier/text()",
 prefix2Namespace, "1.2.840.113549.1.9.16.6.2");
 checkXpath(doc, pathToDataObjectProperties + 
"etsi:DataObjectFormat/etsi:ObjectIdentifier/etsi:Identifier/@Qualifier",
@@ -834,11 +835,18 @@ private void validateAgainstSchema(Document doc) throws 
Exception {
 
 static void checkXpath(Document doc, String xpathString, final Map prefix2Namespace, String expectedResult)
 throws XPathExpressionException {
+checkXpath(doc, xpathString, prefix2Namespace, expectedResult, false);
+}
+
+   static void checkXpath(Document doc, String xpathString, final Map prefix2Namespace, String expectedResult, boolean startsWith)
+throws XPathExpressionException {
 
 XPathExpression expr = getXpath(xpathString, prefix2Namespace);
 String result = (String) expr.evaluate(doc, XPathConstants.STRING);
 assertNotNull("The xpath " + xpathString + " returned a null value", 
result);
-if (NOT_EMPTY.equals(expectedResult)) {
+if (startsWith) {
+assertTrue(result.startsWith(expectedResult));
+} else if (NOT_EMPTY.equals(expectedResult)) {
 assertTrue("Not empty result for xpath " + xpathString + " 
expected", !result.isEmpty());
 } else {
 assertEquals(expectedResult, result);


 


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


> XML Signature: '#' missing in ObjectReference attribute of XADES element 
> DataObjectFormat
> -
>
> Key: CAMEL-12181
> URL: 

[jira] [Commented] (CAMEL-12181) XML Signature: '#' missing in ObjectReference attribute of XADES element DataObjectFormat

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

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

ASF GitHub Bot commented on CAMEL-12181:


Github user davsclaus closed the pull request at:

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


> XML Signature: '#' missing in ObjectReference attribute of XADES element 
> DataObjectFormat
> -
>
> Key: CAMEL-12181
> URL: https://issues.apache.org/jira/browse/CAMEL-12181
> Project: Camel
>  Issue Type: Bug
>  Components: camel-xmlsecurity
>Affects Versions: 2.18.5, 2.19.4, 2.20.1
>Reporter: Franz Forsthofer
>Assignee: Franz Forsthofer
>Priority: Major
> Fix For: 2.19.5, 2.20.3, 2.21.0
>
>
> If you create an XML Signature with a XADES element DataObjectFormat then you 
> get currently an XML which is similar as shown in the following snippet:
>  URI="#_4dccda23-2c67-487b-b7f2-30188bb089f7">
> ...
>  
> ...
> {color:#00} ObjectReference="_1a612e6b-0da6-4695-a8f7-d189a47a7e05">{color}
> {color:#00}    …{color}
> {color:#00}{color}
>  
> {color:#00}The ObjectReference value 
> "_1a612e6b-0da6-4695-a8f7-d189a47a7e05" is not a valid URI. The  character 
> '#' is missing at the beginning of the value{color}



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


[jira] [Commented] (CAMEL-11370) Problem with MTOM in Camel-CXF

2018-02-01 Thread Claus Ibsen (JIRA)

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

Claus Ibsen commented on CAMEL-11370:
-

Try with newer version. Also if you can build a small sample project / unit 
test that reproduces the issue will help.

And then there is also commercial support

http://camel.apache.org/commercial-camel-offerings.html

> Problem with MTOM in Camel-CXF
> --
>
> Key: CAMEL-11370
> URL: https://issues.apache.org/jira/browse/CAMEL-11370
> Project: Camel
>  Issue Type: Bug
>  Components: camel-cxf
>Reporter: Joerg Kessler
>Priority: Minor
> Attachments: MTOM-conversion.patch, 
> accept-also-sub-classes-of-orgapachecxfjaxbJAXBDataB.patch, mtom.test.zip
>
>
> I originally opened the issue on CXF:
> https://issues.apache.org/jira/browse/CXF-7388
> but ther CXF guys think the problem is in camel-cxf. Please have a look at 
> this ticket. Basically the MTOM conversion seems not to work anymore when 
> using CXF in Camel. I provided a unit test that demonstrates the observed 
> behaviour.



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


[jira] [Commented] (CAMEL-12192) BindyCsvDataFormat does not support skip fields

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

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

ASF GitHub Bot commented on CAMEL-12192:


davsclaus closed pull request #2200:  CAMEL-12192 support csv bindy skip fields
URL: https://github.com/apache/camel/pull/2200
 
 
   

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-bindy/src/main/java/org/apache/camel/dataformat/bindy/BindyCsvFactory.java
 
b/components/camel-bindy/src/main/java/org/apache/camel/dataformat/bindy/BindyCsvFactory.java
index 9906402ef6b..e2046c91f50 100755
--- 
a/components/camel-bindy/src/main/java/org/apache/camel/dataformat/bindy/BindyCsvFactory.java
+++ 
b/components/camel-bindy/src/main/java/org/apache/camel/dataformat/bindy/BindyCsvFactory.java
@@ -37,8 +37,6 @@
 import org.apache.camel.dataformat.bindy.annotation.Section;
 import org.apache.camel.dataformat.bindy.format.FormatException;
 import org.apache.camel.dataformat.bindy.util.ConverterUtils;
-import org.apache.camel.impl.DefaultClassResolver;
-import org.apache.camel.spi.ClassResolver;
 import org.apache.camel.util.ObjectHelper;
 import org.apache.camel.util.ReflectionHelper;
 import org.slf4j.Logger;
@@ -67,6 +65,7 @@
 
 private String separator;
 private boolean skipFirstLine;
+private boolean skipField;
 private boolean generateHeaderColumnNames;
 private boolean messageOrdered;
 private String quote;
@@ -174,105 +173,118 @@ public void bind(CamelContext camelContext, 
List tokens, Map model, int line, int pos, int counterMandatoryFields, String data, 
DataField dataField) throws Exception {
+ObjectHelper.notNull(dataField, "No position " + pos + " defined for 
the field: " + data + ", line: " + line);
+
+if (dataField.trim()) {
+data = data.trim();
+}
+
+if (dataField.required()) {
+// Increment counter of mandatory fields
+++counterMandatoryFields;
+
+// Check if content of the field is empty
+// This is not possible for mandatory fields
+if (data.equals("")) {
+throw new IllegalArgumentException("The mandatory field 
defined at the position " + pos + " is empty for the line: " + line);
 }
+}
 
-// Create format object to format the field
-FormattingOptions formattingOptions = 
ConverterUtils.convert(dataField,
-field.getType(),
-field.getAnnotation(BindyConverter.class),
-getLocale());
-Format 

[jira] [Commented] (CAMEL-12192) BindyCsvDataFormat does not support skip fields

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

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

ASF GitHub Bot commented on CAMEL-12192:


Github user davsclaus closed the pull request at:

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


> BindyCsvDataFormat does not support skip fields 
> 
>
> Key: CAMEL-12192
> URL: https://issues.apache.org/jira/browse/CAMEL-12192
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-bindy
>Affects Versions: 2.15.1, 2.20.1
>Reporter: Neo Xu
>Assignee: Claus Ibsen
>Priority: Major
> Fix For: 2.21.0
>
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> Currently: BindyCsvDataFormat has to map all the fields in a CSV file.
>  If there are 200 fields in a CSV file, it has to create 200 fields in a 
> class. But sometimes, it is only interested in 20 fields. So it needs to skip 
> some positions if they are not required. But BindyCsvDataFormat will throw an 
> exception in this case. 
>  



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


[jira] [Resolved] (CAMEL-12192) BindyCsvDataFormat does not support skip fields

2018-02-01 Thread Claus Ibsen (JIRA)

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

Claus Ibsen resolved CAMEL-12192.
-
   Resolution: Fixed
 Assignee: Claus Ibsen
Fix Version/s: 2.21.0

Thanks for the PR

> BindyCsvDataFormat does not support skip fields 
> 
>
> Key: CAMEL-12192
> URL: https://issues.apache.org/jira/browse/CAMEL-12192
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-bindy
>Affects Versions: 2.15.1, 2.20.1
>Reporter: Neo Xu
>Assignee: Claus Ibsen
>Priority: Major
> Fix For: 2.21.0
>
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> Currently: BindyCsvDataFormat has to map all the fields in a CSV file.
>  If there are 200 fields in a CSV file, it has to create 200 fields in a 
> class. But sometimes, it is only interested in 20 fields. So it needs to skip 
> some positions if they are not required. But BindyCsvDataFormat will throw an 
> exception in this case. 
>  



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


[jira] [Commented] (CAMEL-12192) BindyCsvDataFormat does not support skip fields

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

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

ASF GitHub Bot commented on CAMEL-12192:


davsclaus commented on issue #2200:  CAMEL-12192 support csv bindy skip fields
URL: https://github.com/apache/camel/pull/2200#issuecomment-362195628
 
 
   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


> BindyCsvDataFormat does not support skip fields 
> 
>
> Key: CAMEL-12192
> URL: https://issues.apache.org/jira/browse/CAMEL-12192
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-bindy
>Affects Versions: 2.15.1, 2.20.1
>Reporter: Neo Xu
>Assignee: Claus Ibsen
>Priority: Major
> Fix For: 2.21.0
>
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> Currently: BindyCsvDataFormat has to map all the fields in a CSV file.
>  If there are 200 fields in a CSV file, it has to create 200 fields in a 
> class. But sometimes, it is only interested in 20 fields. So it needs to skip 
> some positions if they are not required. But BindyCsvDataFormat will throw an 
> exception in this case. 
>  



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