[jira] [Commented] (CAMEL-11294) Repair not-working-examples or mark as deprecated

2017-05-17 Thread Tomohisa Igarashi (JIRA)

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

Tomohisa Igarashi commented on CAMEL-11294:
---

I think I'll look into deeper later, but if anyone could pick some of them that 
would be great!

> Repair not-working-examples or mark as deprecated
> -
>
> Key: CAMEL-11294
> URL: https://issues.apache.org/jira/browse/CAMEL-11294
> Project: Camel
>  Issue Type: Task
>  Components: examples
>Reporter: Tomohisa Igarashi
> Fix For: 2.20.0
>
>
> http://camel.465427.n5.nabble.com/VOTE-Release-Apache-Camel-2-19-0-Attempt-2-tt5798533.html#a5798566
> I run many of camel examples and found some are not working by just following 
> readme instructions, Let's repair it, enrich instructions or mark it as 
> deprecated.
> * cassandra-kubernetes, hazelcast-kubernates 
> ** image not found - any special steps to let it recognize staging repo? 
> {code}
> 9m3m  6   {kubelet minikube}  spec.containers{java-exec}  
> Warning Failed  Failed to pull image 
> "camel/camel-cassandra-kubernetes-example:2.19.0": rpc error: code = 2 desc = 
> Error: image camel/camel-cassandra-kubernetes-example not found 
> {code}
> {code}
> [ERROR] F8: f8-cd-doc-link: Failed to parse URL: 
> scpexe://people.apache.org/www/camel.apache.org/maven//camel-parent/examples/camel-hazelcast-kubernetes-example.
>  java.net.MalformedURLException: unknown protocol: scpexe 
> {code}
> * cdi-osgi 
> ** camel:run is OK, but there seems to be a incompatible dependency around 
> weld on karaf 
> {code}
> 2017-05-02T15:26:26,654 | ERROR | FelixStartLevel  | Felix
> |  -  -  | Bundle org.ops4j.pax.cdi.extender [130] EventDispatcher: 
> Error during dispatch. (java.lang.NoSuchMethodError: 
> org.ops4j.pax.cdi.weld.impl.WeldCdiContainer.doWithClassLoader(Ljava/util/concurrent/Callable;)Ljava/lang/Object;)
>  
> java.lang.NoSuchMethodError: 
> org.ops4j.pax.cdi.weld.impl.WeldCdiContainer.doWithClassLoader(Ljava/util/concurrent/Callable;)Ljava/lang/Object;
>  
> at 
> org.ops4j.pax.cdi.weld.impl.WeldCdiContainer.doStart(WeldCdiContainer.java:94)
>  ~[?:?] 
> {code}
> * cxf-blueprint 
> ** can't install on karaf 4.1.1 
> {code}
> karaf@root()> feature:install war cxf camel camel-jaxb camel-cxf 
> Error executing command: java.lang.InterruptedException 
> java.lang.IllegalStateException: No inital startlevel yet 
> at 
> org.apache.felix.framework.FrameworkStartLevelImpl.setStartLevel(FrameworkStartLevelImpl.java:131)
>  
> at org.apache.karaf.main.Main.setStartLevel(Main.java:605) 
> at 
> org.apache.karaf.main.Main$KarafLockCallback.lockAquired(Main.java:711) 
> at org.apache.karaf.main.Main.doMonitor(Main.java:382) 
> at org.apache.karaf.main.Main.access$100(Main.java:75) 
> at org.apache.karaf.main.Main$3.run(Main.java:369) 
> {code}
> * cxf-osgi 
> ** should be removed as camel-spring-dm is no longer available 
> * etl 
> ** install fails with missing dependency 
> {code}
> karaf@root()> feature:install camel-example-etl   
>   
>17:37:11 
> Error executing command: Unable to resolve root: missing requirement [root] 
> osgi.identity; osgi.identity=camel-example-etl; type=karaf.feature; 
> version="[2.19.0,2.19.0]"; 
> filter:="(&(osgi.identity=camel-example-etl)(type=karaf.feature)(version>=2.19.0)(version<=2.19.0))"
>  [caused by: Unable to resolve camel-example-etl/2.19.0: missing requirement 
> [camel-example-etl/2.19.0] osgi.identity; osgi.identity=org.apache.openjpa; 
> type=osgi.bundle; version="[2.4.2,2.4.2]"; resolution:=mandatory [caused by: 
> Unable to resolve org.apache.openjpa/2.4.2: missing requirement 
> [org.apache.openjpa/2.4.2] osgi.wiring.package; 
> filter:="(&(osgi.wiring.package=org.apache.xbean.asm5)(version>=5.0.0)(!(version>=6.0.0)))"]]
>  
> {code}
> * loadbalancing, route-throttling 
> ** it seems like Spring does load the XML, but camel context is not starting. 
> Stop here 
> {code}
> INFO: Loading XML bean definitions from class path resource 
> [META-INF/spring/camel-context-mina1.xml] 
> {code}
> * rest-swagger 
> ** failed to run 
> {code}
> java.lang.IllegalStateException: Failed to execute ApplicationRunner 
> at 
> org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:770)
>  [spring-boot-1.5.3.RELEASE.jar!/:1.5.3.RELEASE] 
> ... 
> Caused by: org.apache.camel.CamelExecutionException: Exception occurred 
> during execution on the exchange: 
> Exchange[ID-localhost-localdomain-33075-1494340340660-0-2] 
> at 
> 

[jira] [Assigned] (CAMEL-11294) Repair not-working-examples or mark as deprecated

2017-05-17 Thread Tomohisa Igarashi (JIRA)

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

Tomohisa Igarashi reassigned CAMEL-11294:
-

Assignee: Tomohisa Igarashi

> Repair not-working-examples or mark as deprecated
> -
>
> Key: CAMEL-11294
> URL: https://issues.apache.org/jira/browse/CAMEL-11294
> Project: Camel
>  Issue Type: Task
>  Components: examples
>Reporter: Tomohisa Igarashi
>Assignee: Tomohisa Igarashi
> Fix For: 2.20.0
>
>
> http://camel.465427.n5.nabble.com/VOTE-Release-Apache-Camel-2-19-0-Attempt-2-tt5798533.html#a5798566
> I run many of camel examples and found some are not working by just following 
> readme instructions, Let's repair it, enrich instructions or mark it as 
> deprecated.
> * cassandra-kubernetes, hazelcast-kubernates 
> ** image not found - any special steps to let it recognize staging repo? 
> {code}
> 9m3m  6   {kubelet minikube}  spec.containers{java-exec}  
> Warning Failed  Failed to pull image 
> "camel/camel-cassandra-kubernetes-example:2.19.0": rpc error: code = 2 desc = 
> Error: image camel/camel-cassandra-kubernetes-example not found 
> {code}
> {code}
> [ERROR] F8: f8-cd-doc-link: Failed to parse URL: 
> scpexe://people.apache.org/www/camel.apache.org/maven//camel-parent/examples/camel-hazelcast-kubernetes-example.
>  java.net.MalformedURLException: unknown protocol: scpexe 
> {code}
> * cdi-osgi 
> ** camel:run is OK, but there seems to be a incompatible dependency around 
> weld on karaf 
> {code}
> 2017-05-02T15:26:26,654 | ERROR | FelixStartLevel  | Felix
> |  -  -  | Bundle org.ops4j.pax.cdi.extender [130] EventDispatcher: 
> Error during dispatch. (java.lang.NoSuchMethodError: 
> org.ops4j.pax.cdi.weld.impl.WeldCdiContainer.doWithClassLoader(Ljava/util/concurrent/Callable;)Ljava/lang/Object;)
>  
> java.lang.NoSuchMethodError: 
> org.ops4j.pax.cdi.weld.impl.WeldCdiContainer.doWithClassLoader(Ljava/util/concurrent/Callable;)Ljava/lang/Object;
>  
> at 
> org.ops4j.pax.cdi.weld.impl.WeldCdiContainer.doStart(WeldCdiContainer.java:94)
>  ~[?:?] 
> {code}
> * cxf-blueprint 
> ** can't install on karaf 4.1.1 
> {code}
> karaf@root()> feature:install war cxf camel camel-jaxb camel-cxf 
> Error executing command: java.lang.InterruptedException 
> java.lang.IllegalStateException: No inital startlevel yet 
> at 
> org.apache.felix.framework.FrameworkStartLevelImpl.setStartLevel(FrameworkStartLevelImpl.java:131)
>  
> at org.apache.karaf.main.Main.setStartLevel(Main.java:605) 
> at 
> org.apache.karaf.main.Main$KarafLockCallback.lockAquired(Main.java:711) 
> at org.apache.karaf.main.Main.doMonitor(Main.java:382) 
> at org.apache.karaf.main.Main.access$100(Main.java:75) 
> at org.apache.karaf.main.Main$3.run(Main.java:369) 
> {code}
> * cxf-osgi 
> ** should be removed as camel-spring-dm is no longer available 
> * etl 
> ** install fails with missing dependency 
> {code}
> karaf@root()> feature:install camel-example-etl   
>   
>17:37:11 
> Error executing command: Unable to resolve root: missing requirement [root] 
> osgi.identity; osgi.identity=camel-example-etl; type=karaf.feature; 
> version="[2.19.0,2.19.0]"; 
> filter:="(&(osgi.identity=camel-example-etl)(type=karaf.feature)(version>=2.19.0)(version<=2.19.0))"
>  [caused by: Unable to resolve camel-example-etl/2.19.0: missing requirement 
> [camel-example-etl/2.19.0] osgi.identity; osgi.identity=org.apache.openjpa; 
> type=osgi.bundle; version="[2.4.2,2.4.2]"; resolution:=mandatory [caused by: 
> Unable to resolve org.apache.openjpa/2.4.2: missing requirement 
> [org.apache.openjpa/2.4.2] osgi.wiring.package; 
> filter:="(&(osgi.wiring.package=org.apache.xbean.asm5)(version>=5.0.0)(!(version>=6.0.0)))"]]
>  
> {code}
> * loadbalancing, route-throttling 
> ** it seems like Spring does load the XML, but camel context is not starting. 
> Stop here 
> {code}
> INFO: Loading XML bean definitions from class path resource 
> [META-INF/spring/camel-context-mina1.xml] 
> {code}
> * rest-swagger 
> ** failed to run 
> {code}
> java.lang.IllegalStateException: Failed to execute ApplicationRunner 
> at 
> org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:770)
>  [spring-boot-1.5.3.RELEASE.jar!/:1.5.3.RELEASE] 
> ... 
> Caused by: org.apache.camel.CamelExecutionException: Exception occurred 
> during execution on the exchange: 
> Exchange[ID-localhost-localdomain-33075-1494340340660-0-2] 
> at 
> org.apache.camel.util.ObjectHelper.wrapCamelExecutionException(ObjectHelper.java:1772)
>  

[jira] [Created] (CAMEL-11294) Repair not-working-examples or mark as deprecated

2017-05-17 Thread Tomohisa Igarashi (JIRA)
Tomohisa Igarashi created CAMEL-11294:
-

 Summary: Repair not-working-examples or mark as deprecated
 Key: CAMEL-11294
 URL: https://issues.apache.org/jira/browse/CAMEL-11294
 Project: Camel
  Issue Type: Task
  Components: examples
Reporter: Tomohisa Igarashi
 Fix For: 2.20.0


http://camel.465427.n5.nabble.com/VOTE-Release-Apache-Camel-2-19-0-Attempt-2-tt5798533.html#a5798566

I run many of camel examples and found some are not working by just following 
readme instructions, Let's repair it, enrich instructions or mark it as 
deprecated.

* cassandra-kubernetes, hazelcast-kubernates 
** image not found - any special steps to let it recognize staging repo? 
{code}
9m  3m  6   {kubelet minikube}  spec.containers{java-exec}  
Warning Failed  Failed to pull image 
"camel/camel-cassandra-kubernetes-example:2.19.0": rpc error: code = 2 desc = 
Error: image camel/camel-cassandra-kubernetes-example not found 
{code}
{code}
[ERROR] F8: f8-cd-doc-link: Failed to parse URL: 
scpexe://people.apache.org/www/camel.apache.org/maven//camel-parent/examples/camel-hazelcast-kubernetes-example.
 java.net.MalformedURLException: unknown protocol: scpexe 
{code}

* cdi-osgi 
** camel:run is OK, but there seems to be a incompatible dependency around weld 
on karaf 
{code}
2017-05-02T15:26:26,654 | ERROR | FelixStartLevel  | Felix  
  |  -  -  | Bundle org.ops4j.pax.cdi.extender [130] EventDispatcher: Error 
during dispatch. (java.lang.NoSuchMethodError: 
org.ops4j.pax.cdi.weld.impl.WeldCdiContainer.doWithClassLoader(Ljava/util/concurrent/Callable;)Ljava/lang/Object;)
 
java.lang.NoSuchMethodError: 
org.ops4j.pax.cdi.weld.impl.WeldCdiContainer.doWithClassLoader(Ljava/util/concurrent/Callable;)Ljava/lang/Object;
 
at 
org.ops4j.pax.cdi.weld.impl.WeldCdiContainer.doStart(WeldCdiContainer.java:94) 
~[?:?] 
{code}

* cxf-blueprint 
** can't install on karaf 4.1.1 
{code}
karaf@root()> feature:install war cxf camel camel-jaxb camel-cxf 
Error executing command: java.lang.InterruptedException 
java.lang.IllegalStateException: No inital startlevel yet 
at 
org.apache.felix.framework.FrameworkStartLevelImpl.setStartLevel(FrameworkStartLevelImpl.java:131)
 
at org.apache.karaf.main.Main.setStartLevel(Main.java:605) 
at 
org.apache.karaf.main.Main$KarafLockCallback.lockAquired(Main.java:711) 
at org.apache.karaf.main.Main.doMonitor(Main.java:382) 
at org.apache.karaf.main.Main.access$100(Main.java:75) 
at org.apache.karaf.main.Main$3.run(Main.java:369) 
{code}

* cxf-osgi 
** should be removed as camel-spring-dm is no longer available 

* etl 
** install fails with missing dependency 
{code}
karaf@root()> feature:install camel-example-etl 

   17:37:11 
Error executing command: Unable to resolve root: missing requirement [root] 
osgi.identity; osgi.identity=camel-example-etl; type=karaf.feature; 
version="[2.19.0,2.19.0]"; 
filter:="(&(osgi.identity=camel-example-etl)(type=karaf.feature)(version>=2.19.0)(version<=2.19.0))"
 [caused by: Unable to resolve camel-example-etl/2.19.0: missing requirement 
[camel-example-etl/2.19.0] osgi.identity; osgi.identity=org.apache.openjpa; 
type=osgi.bundle; version="[2.4.2,2.4.2]"; resolution:=mandatory [caused by: 
Unable to resolve org.apache.openjpa/2.4.2: missing requirement 
[org.apache.openjpa/2.4.2] osgi.wiring.package; 
filter:="(&(osgi.wiring.package=org.apache.xbean.asm5)(version>=5.0.0)(!(version>=6.0.0)))"]]
 
{code}

* loadbalancing, route-throttling 
** it seems like Spring does load the XML, but camel context is not starting. 
Stop here 
{code}
INFO: Loading XML bean definitions from class path resource 
[META-INF/spring/camel-context-mina1.xml] 
{code}


* rest-swagger 
** failed to run 
{code}
java.lang.IllegalStateException: Failed to execute ApplicationRunner 
at 
org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:770)
 [spring-boot-1.5.3.RELEASE.jar!/:1.5.3.RELEASE] 
... 
Caused by: org.apache.camel.CamelExecutionException: Exception occurred during 
execution on the exchange: 
Exchange[ID-localhost-localdomain-33075-1494340340660-0-2] 
at 
org.apache.camel.util.ObjectHelper.wrapCamelExecutionException(ObjectHelper.java:1772)
 ~[camel-core-2.19.0.jar!/:2.19.0] 
... 
Caused by: java.nio.channels.ClosedChannelException: null 
at 
io.undertow.client.http.HttpClientConnection$5.handleEvent(HttpClientConnection.java:189)
 ~[undertow-core-1.4.13.Final.jar!/:1.4.13.Final] 
... 
{code}


* splunk 
** no progress after "SLF4J: Defaulting to no-operation (NOP) logger 
implementation" 


* spring-boot-rest-jpa 
** tests fail 
{code}
Failed tests: 

[jira] [Resolved] (CAMEL-10544) Upgrade to smack 4.2.0

2017-05-17 Thread Babak Vahdat (JIRA)

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

Babak Vahdat resolved CAMEL-10544.
--
Resolution: Fixed

> Upgrade to smack 4.2.0
> --
>
> Key: CAMEL-10544
> URL: https://issues.apache.org/jira/browse/CAMEL-10544
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-xmpp
>Affects Versions: 2.19.0
>Reporter: Christian Schneider
>Assignee: Babak Vahdat
>Priority: Minor
> Fix For: 2.20.0
>
>
> Smack 4.2 changed some of the API. This issue covers upgrading the dependency 
> as well as the camel-xmpp code.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Assigned] (CAMEL-10544) Upgrade to smack 4.2.0

2017-05-17 Thread Babak Vahdat (JIRA)

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

Babak Vahdat reassigned CAMEL-10544:


 Assignee: Babak Vahdat  (was: Christian Schneider)
Affects Version/s: (was: 2.18.0)
   2.19.0
 Priority: Minor  (was: Major)
Fix Version/s: (was: Future)
   2.20.0
  Description: Smack 4.2 changed some of the API. This issue covers 
upgrading the dependency as well as the camel-xmpp code.  (was: Smack 4.1 
changed some of the API. This issue covers upgrading the dependency as well as 
the camel-xmpp code.)
  Summary: Upgrade to smack 4.2.0  (was: Upgrade to smack 4.1)

> Upgrade to smack 4.2.0
> --
>
> Key: CAMEL-10544
> URL: https://issues.apache.org/jira/browse/CAMEL-10544
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-xmpp
>Affects Versions: 2.19.0
>Reporter: Christian Schneider
>Assignee: Babak Vahdat
>Priority: Minor
> Fix For: 2.20.0
>
>
> Smack 4.2 changed some of the API. This issue covers upgrading the dependency 
> as well as the camel-xmpp code.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CAMEL-10544) Upgrade to smack 4.1

2017-05-17 Thread Christian Schneider (JIRA)

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

Christian Schneider commented on CAMEL-10544:
-

Thanks for looking into this. Feel free to go ahead.

> Upgrade to smack 4.1
> 
>
> Key: CAMEL-10544
> URL: https://issues.apache.org/jira/browse/CAMEL-10544
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-xmpp
>Affects Versions: 2.19.0
>Reporter: Christian Schneider
>Assignee: Christian Schneider
> Fix For: 2.20.0
>
>
> Smack 4.1 changed some of the API. This issue covers upgrading the dependency 
> as well as the camel-xmpp code.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CAMEL-10544) Upgrade to smack 4.1

2017-05-17 Thread Babak Vahdat (JIRA)

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

Babak Vahdat commented on CAMEL-10544:
--

As there's been no progress on this ticket I've looked into it and have got a 
patch in place. So I'm taking the liberty of assigning this to myself. And in 
the meanwhile smack version 4.2.0 is already out. So going to adapt the 
description of this ticket as well.

> Upgrade to smack 4.1
> 
>
> Key: CAMEL-10544
> URL: https://issues.apache.org/jira/browse/CAMEL-10544
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-xmpp
>Affects Versions: 2.18.0
>Reporter: Christian Schneider
>Assignee: Christian Schneider
> Fix For: Future
>
>
> Smack 4.1 changed some of the API. This issue covers upgrading the dependency 
> as well as the camel-xmpp code.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (CAMEL-11291) spring boot starters: allow to hook into auto configuration process

2017-05-17 Thread Luca Burgazzoli (JIRA)

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

Luca Burgazzoli updated CAMEL-11291:

Summary: spring boot starters: allow to hook into auto configuration 
process  (was: spring boot starters: )

> spring boot starters: allow to hook into auto configuration process
> ---
>
> Key: CAMEL-11291
> URL: https://issues.apache.org/jira/browse/CAMEL-11291
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-spring-boot, camel-spring-boot-starters
>Reporter: Luca Burgazzoli
>Assignee: Luca Burgazzoli
>Priority: Minor
> Fix For: 2.20.0
>
>
> as today the camel-package-maven-plugin is responsible to generate
> component starters but sometimes you need to hook into the auto configuration 
> process and with generated started it may be problematic as changes may be 
> overridden by the next camel-package-maven-plugin run.
> So it would be nice to have the auto generation code to collect some bean 
> post configurer and apply them to the component being created.
> For reference see:
> https://lists.apache.org/thread.html/04816521e7eb0c52f0e87488ac0d3a87d8941b3fc180308b07b03aab@%3Cdev.camel.apache.org%3E



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Created] (CAMEL-11293) Rest DSL Producer HTTP ignores http verb from uri

2017-05-17 Thread Owain McGuire (JIRA)
Owain McGuire created CAMEL-11293:
-

 Summary: Rest DSL Producer HTTP ignores http verb from uri
 Key: CAMEL-11293
 URL: https://issues.apache.org/jira/browse/CAMEL-11293
 Project: Camel
  Issue Type: Bug
  Components: camel-http4
Affects Versions: 2.19.0
Reporter: Owain McGuire


As per 
http://camel.465427.n5.nabble.com/2-19-0-Rest-Producer-DSL-http4-support-for-PUT-workaround-td5799706.html

https://github.com/apache/camel/blob/camel-2.19.x/components/camel-http4/src/main/java/org/apache/camel/component/http4/helper/HttpMethodHelper.java#L64

The createMethod function does not take the http verb from the URI, PUT is 
transformed to a POST since there is a payload.  Resulting in an incorrect http 
request being formed.  The verb from the URI should take precedence.  

There is a workaround of setting Exchange.HTTP_METHOD header as per:

  .setHeader(Exchange.HTTP_METHOD, constant(HttpMethods.PUT))
  .to("rest:put:api/resource/{{resource.id}}")

HttpHelperTest is lacking coverage of http verbs other than GET and POST




--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CAMEL-10728) Camel MongoDB Multiple Insert issue

2017-05-17 Thread Damien B (JIRA)

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

Damien B commented on CAMEL-10728:
--

PR posted https://github.com/apache/camel/pull/1701

> Camel MongoDB Multiple Insert issue
> ---
>
> Key: CAMEL-10728
> URL: https://issues.apache.org/jira/browse/CAMEL-10728
> Project: Camel
>  Issue Type: Bug
>  Components: camel-mongodb
>Affects Versions: 2.18.1
>Reporter: Ankur Saxena
>Priority: Minor
>
> I think there is a problem with multi-insert on MongoDB component as it fails 
> to gracefully handle a BasicDBList. The logic below always sets the 
> SingleInsert flag to true if the type converter is able to convert the 
> exchange to a DBObject interface. This is implemented by BasicDBList and 
> BasicDBObject.
> Further details below :
> I am trying to do a multiple insert using the camel mongo db component.
> My Pojo representation is :
> {code:java}
>  Person {
>  String firstName;
>  String lastName;
>  }
> {code}
> I have a processor which constructs a valid List of Person pojo and is a 
> valid json structure. When this list of Person is sent to the mongodb 
> producer , on invocation of createDoInsert the type conversion to 
> BasicDBObject fails. This piece of code below looks to be the problem. Should 
> it have more fall backs / checks in place to attempt the list conversion down 
> further below as it fails on the very first cast itself. Debugging the 
> MongoDbProducer the exchange object being received is a BasicDBList which 
> implements DBObject. This causes the singleInsert flag to remain set at true 
> which fails the insertion below as we get a BasicDBList instead of a 
> BasicDBObject :
> {code:java}
>if(singleInsert) {
> BasicDBObject insertObjects = (BasicDBObject)insert;
> dbCol.insertOne(insertObjects);
> exchange1.getIn().setHeader("CamelMongoOid", 
> insertObjects.get("_id"));
> }
> {code}
> The Camel MongoDbProducer code fragment
> {code:java}
> private Function createDoInsert() {
> return (exchange1) -> {
> MongoCollection dbCol = this.calculateCollection(exchange1);
> boolean singleInsert = true;
> Object insert = exchange1.getIn().getBody(DBObject.class);
> if(insert == null) {
> insert = exchange1.getIn().getBody(List.class);
> if(insert == null) {
> throw new CamelMongoDbException("MongoDB operation = insert, 
> Body is not conversible to type DBObject nor List");
> }
> singleInsert = false;
> insert = this.attemptConvertToList((List)insert, exchange1);
> }
> if(singleInsert) {
> BasicDBObject insertObjects = (BasicDBObject)insert;
> dbCol.insertOne(insertObjects);
> exchange1.getIn().setHeader("CamelMongoOid", 
> insertObjects.get("_id"));
> } else {
> List insertObjects1 = (List)insert;
> dbCol.insertMany(insertObjects1);
> ArrayList objectIdentification = new 
> ArrayList(insertObjects1.size());
> 
> objectIdentification.addAll((Collection)insertObjects1.stream().map((insertObject)
>  -> {
> return insertObject.get("_id");
> }).collect(Collectors.toList()));
> exchange1.getIn().setHeader("CamelMongoOid", 
> objectIdentification);
> }
> return insert;
> };
> }
> {code}
> My route is as below :
> {code:xml}
> 
> http://0.0.0.0:9886/test"/>
> 
> 
> 
> fname
> lname
> 
> 
> 
>  uri="mongodb:mongoBean?database=axs175collection=insuranceoperation=insert"
>  />
> {code}
> and the MongoDBProcessor constructing the List of Person Pojo
> {code:java}
> @Component
> public class MongodbProcessor implements Processor {
> @Override
> public void process(Exchange exchange) throws Exception {
> ArrayList personlist = (ArrayList) 
> exchange.getIn().getBody();
> ArrayList persons = new ArrayList<>();
> for(List records : personlist){
> Person person = new Person();
> person.setFname(records.get(0));
> person.setLname(records.get(1));
> persons.add(person);
> }
> exchange.getIn().setBody(persons);
> }
> } 
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CAMEL-10504) Hiding an underlying exception if MongoDbBasicConverters fails to convert to DBObject

2017-05-17 Thread Damien B (JIRA)

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

Damien B commented on CAMEL-10504:
--

PR posted https://github.com/apache/camel/pull/1701

> Hiding an underlying exception if MongoDbBasicConverters fails to convert to 
> DBObject
> -
>
> Key: CAMEL-10504
> URL: https://issues.apache.org/jira/browse/CAMEL-10504
> Project: Camel
>  Issue Type: Bug
>  Components: camel-mongodb
>Affects Versions: 2.17.3, 2.18.0
>Reporter: Evgenii Lomonosov
>Assignee: Andrea Cosentino
>Priority: Minor
> Fix For: 2.18.1, 2.19.0
>
>
> If conversion fails it could be hard to understand what is a problem because 
> it returns just a message "Conversion has fallen back to generic Object -> 
> DBObject, but unable to convert type {}. Returning null" that points to a 
> class that was not converted.
> In case of, as example, if a list of objects that should be converted leads 
> to a memory error because of parent-child link are cycled for 2 objects, it 
> would take a lot of efforts to understand what is going on. And information 
> about underlying exception, stackoverflow in this case, could help to find 
> the root cause much faster than now.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CAMEL-10728) Camel MongoDB Multiple Insert issue

2017-05-17 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CAMEL-10728:


GitHub user NKame opened a pull request:

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

CAMEL-10728 fix handling of BasicDBList and allow better use of multi insert

Context: camel-mongodb, multi insert. Handle the case where the input is a 
BasicDBList. Adds a configuration header to tell the component to avoid trying 
to convert the body to a DBObject when the user knows a multi insert is needed 
("CamelMongoDbMultiInsert").

See
https://issues.apache.org/jira/browse/CAMEL-10504
https://issues.apache.org/jira/browse/CAMEL-10728

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

$ git pull https://github.com/NKame/camel master2

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

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

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

This closes #1701


commit 579a149fc1ce6cdee7331e89622ddfee74dcbf82
Author: Damien Bonvillain 
Date:   2017-05-17T15:44:16Z

CAMEL-10728 fix handling of BasicDBList and allow better use of multi 
insert.

Context: camel-mongodb, multi insert. Handle the case where the input is a 
BasicDBList. Adds a configuration header to tell the component to avoid trying 
to convert the body to a DBObject when the user knows a multi insert is needed 
("CamelMongoDbMultiInsert").

See
https://issues.apache.org/jira/browse/CAMEL-10504
https://issues.apache.org/jira/browse/CAMEL-10728




> Camel MongoDB Multiple Insert issue
> ---
>
> Key: CAMEL-10728
> URL: https://issues.apache.org/jira/browse/CAMEL-10728
> Project: Camel
>  Issue Type: Bug
>  Components: camel-mongodb
>Affects Versions: 2.18.1
>Reporter: Ankur Saxena
>Priority: Minor
>
> I think there is a problem with multi-insert on MongoDB component as it fails 
> to gracefully handle a BasicDBList. The logic below always sets the 
> SingleInsert flag to true if the type converter is able to convert the 
> exchange to a DBObject interface. This is implemented by BasicDBList and 
> BasicDBObject.
> Further details below :
> I am trying to do a multiple insert using the camel mongo db component.
> My Pojo representation is :
> {code:java}
>  Person {
>  String firstName;
>  String lastName;
>  }
> {code}
> I have a processor which constructs a valid List of Person pojo and is a 
> valid json structure. When this list of Person is sent to the mongodb 
> producer , on invocation of createDoInsert the type conversion to 
> BasicDBObject fails. This piece of code below looks to be the problem. Should 
> it have more fall backs / checks in place to attempt the list conversion down 
> further below as it fails on the very first cast itself. Debugging the 
> MongoDbProducer the exchange object being received is a BasicDBList which 
> implements DBObject. This causes the singleInsert flag to remain set at true 
> which fails the insertion below as we get a BasicDBList instead of a 
> BasicDBObject :
> {code:java}
>if(singleInsert) {
> BasicDBObject insertObjects = (BasicDBObject)insert;
> dbCol.insertOne(insertObjects);
> exchange1.getIn().setHeader("CamelMongoOid", 
> insertObjects.get("_id"));
> }
> {code}
> The Camel MongoDbProducer code fragment
> {code:java}
> private Function createDoInsert() {
> return (exchange1) -> {
> MongoCollection dbCol = this.calculateCollection(exchange1);
> boolean singleInsert = true;
> Object insert = exchange1.getIn().getBody(DBObject.class);
> if(insert == null) {
> insert = exchange1.getIn().getBody(List.class);
> if(insert == null) {
> throw new CamelMongoDbException("MongoDB operation = insert, 
> Body is not conversible to type DBObject nor List");
> }
> singleInsert = false;
> insert = this.attemptConvertToList((List)insert, exchange1);
> }
> if(singleInsert) {
> BasicDBObject insertObjects = (BasicDBObject)insert;
> dbCol.insertOne(insertObjects);
> exchange1.getIn().setHeader("CamelMongoOid", 
> insertObjects.get("_id"));
> } else {
> List insertObjects1 = (List)insert;
> dbCol.insertMany(insertObjects1);
> ArrayList objectIdentification = new 
> ArrayList(insertObjects1.size());
> 
> objectIdentification.addAll((Collection)insertObjects1.stream().map((insertObject)
>  -> {
> return insertObject.get("_id");

[jira] [Created] (CAMEL-11292) support for Scala 2.12.x

2017-05-17 Thread Sarunas Valaskevicius (JIRA)
Sarunas Valaskevicius created CAMEL-11292:
-

 Summary: support for Scala 2.12.x
 Key: CAMEL-11292
 URL: https://issues.apache.org/jira/browse/CAMEL-11292
 Project: Camel
  Issue Type: New Feature
  Components: camel-scala
Affects Versions: 2.19.0
Reporter: Sarunas Valaskevicius


currently camel-scala depends on Scala 2.11. could this be upgraded to 2.12.x 
release? 

Same with scalatest.

All possible updates can be seen here - 
https://mvnrepository.com/artifact/org.apache.camel/camel-scala/2.19.0

Thanks



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Comment Edited] (CAMEL-10504) Hiding an underlying exception if MongoDbBasicConverters fails to convert to DBObject

2017-05-17 Thread Damien B (JIRA)

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

Damien B edited comment on CAMEL-10504 at 5/17/17 2:40 PM:
---

Working on it. We can see the same behavior in the current (slightly modified) 
tests:
{code:java}
@Test
public void testMultiInsertStringFromListNoHeader() throws Exception {
assertEquals(0, testCollection.count());
Object result = template.requestBody("direct:insert", 
Collections.newArrayList("{\"_id\":\"testInsertString\", 
\"scientist\":\"Einstein\"}",
"{\"_id\":\"testInsertString2\", 
\"scientist\":\"Einstein Too\"}"));
assertTrue(result instanceof List);
DBObject b = testCollection.find(new BasicDBObject("_id", 
"testInsertString")).first();
assertNotNull("No record with 'testInsertString' _id", b);
b = testCollection.find(new BasicDBObject("_id", 
"testInsertString2")).first();
assertNotNull("No record with 'testInsertString' _id", b);
}
{code}

{code}
2017-05-17 16:31:21,310 [main   ] WARN  MongoDbBasicConverters 
- Conversion has fallen back to generic Object -> DBObject, but unable to 
convert type java.util.ArrayList. Returning null. 
java.lang.IllegalArgumentException: Can not deserialize instance of 
java.util.LinkedHashMap out of START_ARRAY token
 at [Source: N/A; line: -1, column: -1]
2017-05-17 16:34:13,380 [main   ] WARN  MongoDbBasicConverters 
- Conversion has fallen back to generic Object -> DBObject, but unable to 
convert type org.apache.camel.impl.DefaultMessage. Returning null. 
java.lang.IllegalArgumentException: (was java.lang.NullPointerException) 
(through reference chain: 
org.apache.camel.impl.DefaultMessage["exchange"]->org.apache.camel.impl.DefaultExchange["context"]->org.apache.camel.spring.SpringCamelContext["managementNameStrategy"]->org.apache.camel.impl.DefaultManagementNameStrategy["name"])
{code}

Is there a way with the current structure of testing to check if those logs 
happen (I don't really want to parse camel-mongodb-test.log)?



was (Author: damien_b):
Working on it. We can see the same behavior in the current tests:
{code}
2017-05-17 16:31:21,310 [main   ] WARN  MongoDbBasicConverters 
- Conversion has fallen back to generic Object -> DBObject, but unable to 
convert type java.util.ArrayList. Returning null. 
java.lang.IllegalArgumentException: Can not deserialize instance of 
java.util.LinkedHashMap out of START_ARRAY token
 at [Source: N/A; line: -1, column: -1]
2017-05-17 16:34:13,380 [main   ] WARN  MongoDbBasicConverters 
- Conversion has fallen back to generic Object -> DBObject, but unable to 
convert type org.apache.camel.impl.DefaultMessage. Returning null. 
java.lang.IllegalArgumentException: (was java.lang.NullPointerException) 
(through reference chain: 
org.apache.camel.impl.DefaultMessage["exchange"]->org.apache.camel.impl.DefaultExchange["context"]->org.apache.camel.spring.SpringCamelContext["managementNameStrategy"]->org.apache.camel.impl.DefaultManagementNameStrategy["name"])
{code}

Is there a way with the current structure of testing to check if those logs 
happen (I don't really want to parse camel-mongodb-test.log)?


> Hiding an underlying exception if MongoDbBasicConverters fails to convert to 
> DBObject
> -
>
> Key: CAMEL-10504
> URL: https://issues.apache.org/jira/browse/CAMEL-10504
> Project: Camel
>  Issue Type: Bug
>  Components: camel-mongodb
>Affects Versions: 2.17.3, 2.18.0
>Reporter: Evgenii Lomonosov
>Assignee: Andrea Cosentino
>Priority: Minor
> Fix For: 2.18.1, 2.19.0
>
>
> If conversion fails it could be hard to understand what is a problem because 
> it returns just a message "Conversion has fallen back to generic Object -> 
> DBObject, but unable to convert type {}. Returning null" that points to a 
> class that was not converted.
> In case of, as example, if a list of objects that should be converted leads 
> to a memory error because of parent-child link are cycled for 2 objects, it 
> would take a lot of efforts to understand what is going on. And information 
> about underlying exception, stackoverflow in this case, could help to find 
> the root cause much faster than now.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CAMEL-10504) Hiding an underlying exception if MongoDbBasicConverters fails to convert to DBObject

2017-05-17 Thread Damien B (JIRA)

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

Damien B commented on CAMEL-10504:
--

Working on it. We can see the same behavior in the current tests:
{code}
2017-05-17 16:31:21,310 [main   ] WARN  MongoDbBasicConverters 
- Conversion has fallen back to generic Object -> DBObject, but unable to 
convert type java.util.ArrayList. Returning null. 
java.lang.IllegalArgumentException: Can not deserialize instance of 
java.util.LinkedHashMap out of START_ARRAY token
 at [Source: N/A; line: -1, column: -1]
2017-05-17 16:34:13,380 [main   ] WARN  MongoDbBasicConverters 
- Conversion has fallen back to generic Object -> DBObject, but unable to 
convert type org.apache.camel.impl.DefaultMessage. Returning null. 
java.lang.IllegalArgumentException: (was java.lang.NullPointerException) 
(through reference chain: 
org.apache.camel.impl.DefaultMessage["exchange"]->org.apache.camel.impl.DefaultExchange["context"]->org.apache.camel.spring.SpringCamelContext["managementNameStrategy"]->org.apache.camel.impl.DefaultManagementNameStrategy["name"])
{code}

Is there a way with the current structure of testing to check if those logs 
happen (I don't really want to parse camel-mongodb-test.log)?


> Hiding an underlying exception if MongoDbBasicConverters fails to convert to 
> DBObject
> -
>
> Key: CAMEL-10504
> URL: https://issues.apache.org/jira/browse/CAMEL-10504
> Project: Camel
>  Issue Type: Bug
>  Components: camel-mongodb
>Affects Versions: 2.17.3, 2.18.0
>Reporter: Evgenii Lomonosov
>Assignee: Andrea Cosentino
>Priority: Minor
> Fix For: 2.18.1, 2.19.0
>
>
> If conversion fails it could be hard to understand what is a problem because 
> it returns just a message "Conversion has fallen back to generic Object -> 
> DBObject, but unable to convert type {}. Returning null" that points to a 
> class that was not converted.
> In case of, as example, if a list of objects that should be converted leads 
> to a memory error because of parent-child link are cycled for 2 objects, it 
> would take a lot of efforts to understand what is going on. And information 
> about underlying exception, stackoverflow in this case, could help to find 
> the root cause much faster than now.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CAMEL-11187) Java 9 - building camel-spring has a maven WARN

2017-05-17 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CAMEL-11187:


Github user johnpoth closed the pull request at:

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


> Java 9 - building camel-spring has a maven WARN
> ---
>
> Key: CAMEL-11187
> URL: https://issues.apache.org/jira/browse/CAMEL-11187
> Project: Camel
>  Issue Type: Task
>  Components: build system
>Reporter: Claus Ibsen
>Assignee: John Poth
>Priority: Minor
> Fix For: 2.20.0
>
>
> davsclaus:/Users/davsclaus/workspace/camel/components/camel-spring (master)/$ 
> mvn clean install -P fastinstall
> [INFO] Scanning for projects...
> [WARNING]
> [WARNING] Some problems were encountered while building the effective model 
> for org.apache.camel:camel-spring:jar:2.19.0-SNAPSHOT
> [WARNING] 'profiles.profile[jdk9-build].plugins.plugin.(groupId:artifactId)' 
> must be unique but found duplicate declaration of plugin 
> org.apache.maven.plugins:maven-antrun-plugin @ 
> org.apache.camel:camel-spring:[unknown-version], 
> /Users/davsclaus/workspace/camel/components/camel-spring/pom.xml, line 676, 
> column 19
> [WARNING]
> [WARNING] It is highly recommended to fix these problems because they 
> threaten the stability of your build.
> [WARNING]
> [WARNING] For this reason, future Maven versions might no longer support 
> building such malformed projects.
> [WARNING]



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Work started] (CAMEL-11266) The ehcache component creates a separate CacheManager per producer route

2017-05-17 Thread Luca Burgazzoli (JIRA)

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

Work on CAMEL-11266 started by Luca Burgazzoli.
---
> The ehcache component creates a separate CacheManager per producer route
> 
>
> Key: CAMEL-11266
> URL: https://issues.apache.org/jira/browse/CAMEL-11266
> Project: Camel
>  Issue Type: Bug
>  Components: camel-ehcache
>Affects Versions: 2.19.0
>Reporter: Marco Santarelli
>Assignee: Luca Burgazzoli
> Fix For: 2.20.0
>
>
> The issue becomes clear if the developers declares more than one producer 
> route with the attached ehcache config: multiple cache managers start 
> contention of file lock and the startup fails.
> {code:xml}
>  
> http://www.w3.org/2001/XMLSchema-instance;
> xmlns:ehcache="http://www.ehcache.org/v3;
> xsi:schemaLocation="http://www.ehcache.org/v3 
> http://www.ehcache.org/schema/ehcache-core-3.3.xsd;>
>  directory="${java.io.tmpdir}/ehcache">
> 
> 
> 
> 
> 60
> 
> 
> 
> 
> 1
> 
> 
> 
> java.lang.String
> java.io.Serializable
> 
> 
> 
> 
> 1000
> 10
> 
> 
> 
> {code}
> resulting in:
> {code}
> Caused by: org.ehcache.StateTransitionException: Couldn't lock rootDir: 
> /var/folders/gf/6psxkr_n7vl_qbhw8mktqqwwgn/T/ehcache
>   at 
> org.ehcache.core.StatusTransitioner$Transition.failed(StatusTransitioner.java:235)
>  ~[ehcache-3.2.2.jar:3.2.2 892e5c56c2a7100866de90dc7c2099a62fb6198b]
>   at org.ehcache.core.EhcacheManager.init(EhcacheManager.java:588) 
> ~[ehcache-3.2.2.jar:3.2.2 892e5c56c2a7100866de90dc7c2099a62fb6198b]
>   at 
> org.apache.camel.component.ehcache.EhcacheManager.start(EhcacheManager.java:66)
>  ~[camel-ehcache-2.19.0.jar:2.19.0]
>   at 
> org.apache.camel.component.ehcache.EhcacheEndpoint.doStart(EhcacheEndpoint.java:65)
>  ~[camel-ehcache-2.19.0.jar:2.19.0]
>   at 
> org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61) 
> ~[camel-core-2.19.0.jar:2.19.0]
>   at 
> org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:75) 
> ~[camel-core-2.19.0.jar:2.19.0]
>   at 
> org.apache.camel.processor.SendProcessor.doStart(SendProcessor.java:236) 
> ~[camel-core-2.19.0.jar:2.19.0]
>   at 
> org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61) 
> ~[camel-core-2.19.0.jar:2.19.0]
>   at 
> org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:75) 
> ~[camel-core-2.19.0.jar:2.19.0]
>   at 
> org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:60) 
> ~[camel-core-2.19.0.jar:2.19.0]
>   at 
> org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:104) 
> ~[camel-core-2.19.0.jar:2.19.0]
>   at 
> org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:90) 
> ~[camel-core-2.19.0.jar:2.19.0]
>   at 
> org.apache.camel.processor.RedeliveryErrorHandler.doStart(RedeliveryErrorHandler.java:1447)
>  ~[camel-core-2.19.0.jar:2.19.0]
>   at 
> org.apache.camel.support.ChildServiceSupport.start(ChildServiceSupport.java:44)
>  ~[camel-core-2.19.0.jar:2.19.0]
>   at 
> org.apache.camel.support.ChildServiceSupport.start(ChildServiceSupport.java:31)
>  ~[camel-core-2.19.0.jar:2.19.0]
>   at 
> org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:75) 
> ~[camel-core-2.19.0.jar:2.19.0]
>   at 
> org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:60) 
> ~[camel-core-2.19.0.jar:2.19.0]
>   at 
> org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:104) 
> ~[camel-core-2.19.0.jar:2.19.0]
>   at 
> org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:90) 
> ~[camel-core-2.19.0.jar:2.19.0]
>   at 
> org.apache.camel.processor.interceptor.DefaultChannel.doStart(DefaultChannel.java:156)
>  ~[camel-core-2.19.0.jar:2.19.0]
>   at 
> org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61) 
> ~[camel-core-2.19.0.jar:2.19.0]
>   at 
> org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:75) 
> ~[camel-core-2.19.0.jar:2.19.0]
>   at 
> org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:60) 
> ~[camel-core-2.19.0.jar:2.19.0]
>   at 
> org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:104) 
> ~[camel-core-2.19.0.jar:2.19.0]
>   at 
> org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:90) 
> ~[camel-core-2.19.0.jar:2.19.0]
>   at 
> org.apache.camel.processor.DelegateAsyncProcessor.doStart(DelegateAsyncProcessor.java:80)
>  ~[camel-core-2.19.0.jar:2.19.0]
>   at 
> 

[jira] [Comment Edited] (CAMEL-11266) The ehcache component creates a separate CacheManager per producer route

2017-05-17 Thread Luca Burgazzoli (JIRA)

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

Luca Burgazzoli edited comment on CAMEL-11266 at 5/17/17 12:23 PM:
---

Yeah that is something I've started working on :)

So I'm adding a CacheManager "cache" whose key is the configuration source 
(i.e. the uri or a Configuration instance, etc) but it requires a little bit of 
time to make it working properly as there is a change in the life-cycle of the 
cache manager and because of this behavioural change, it will be available in 
2.20.

Note that 2.19.1 will have a way to set the CacheManager on component level 
like 

{code:java}
EhcacheComponent ehcache = new EhcacheComponent();
ehcache.setCacheManager(myCacheManager);

   from("direct:cache")

.to("ehcache:my-cache?keyType=java.lang.String=java.lang.String");
{code}



was (Author: lb):
Yeah that is something I've started of working on :)
So I'm adding a CacheManager "cache" whose key is the configuration source 
(i.e. the uri or a Configuration instance, etc) but it requires a little bit of 
time to make it working properly as there is a change in the life-cycle of the 
cache manager and because of this behavioural change, it will be available in 
2.20.

Note that 2.19.1 will have a way to set the CacheManager on component level 
like 

{code:java}
EhcacheComponent ehcache = new EhcacheComponent();
ehcache.setCacheManager(myCacheManager);

   from("direct:cache")

.to("ehcache:my-cache?keyType=java.lang.String=java.lang.String");
{code}


> The ehcache component creates a separate CacheManager per producer route
> 
>
> Key: CAMEL-11266
> URL: https://issues.apache.org/jira/browse/CAMEL-11266
> Project: Camel
>  Issue Type: Bug
>  Components: camel-ehcache
>Affects Versions: 2.19.0
>Reporter: Marco Santarelli
>Assignee: Luca Burgazzoli
> Fix For: 2.20.0
>
>
> The issue becomes clear if the developers declares more than one producer 
> route with the attached ehcache config: multiple cache managers start 
> contention of file lock and the startup fails.
> {code:xml}
>  
> http://www.w3.org/2001/XMLSchema-instance;
> xmlns:ehcache="http://www.ehcache.org/v3;
> xsi:schemaLocation="http://www.ehcache.org/v3 
> http://www.ehcache.org/schema/ehcache-core-3.3.xsd;>
>  directory="${java.io.tmpdir}/ehcache">
> 
> 
> 
> 
> 60
> 
> 
> 
> 
> 1
> 
> 
> 
> java.lang.String
> java.io.Serializable
> 
> 
> 
> 
> 1000
> 10
> 
> 
> 
> {code}
> resulting in:
> {code}
> Caused by: org.ehcache.StateTransitionException: Couldn't lock rootDir: 
> /var/folders/gf/6psxkr_n7vl_qbhw8mktqqwwgn/T/ehcache
>   at 
> org.ehcache.core.StatusTransitioner$Transition.failed(StatusTransitioner.java:235)
>  ~[ehcache-3.2.2.jar:3.2.2 892e5c56c2a7100866de90dc7c2099a62fb6198b]
>   at org.ehcache.core.EhcacheManager.init(EhcacheManager.java:588) 
> ~[ehcache-3.2.2.jar:3.2.2 892e5c56c2a7100866de90dc7c2099a62fb6198b]
>   at 
> org.apache.camel.component.ehcache.EhcacheManager.start(EhcacheManager.java:66)
>  ~[camel-ehcache-2.19.0.jar:2.19.0]
>   at 
> org.apache.camel.component.ehcache.EhcacheEndpoint.doStart(EhcacheEndpoint.java:65)
>  ~[camel-ehcache-2.19.0.jar:2.19.0]
>   at 
> org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61) 
> ~[camel-core-2.19.0.jar:2.19.0]
>   at 
> org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:75) 
> ~[camel-core-2.19.0.jar:2.19.0]
>   at 
> org.apache.camel.processor.SendProcessor.doStart(SendProcessor.java:236) 
> ~[camel-core-2.19.0.jar:2.19.0]
>   at 
> org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61) 
> ~[camel-core-2.19.0.jar:2.19.0]
>   at 
> org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:75) 
> ~[camel-core-2.19.0.jar:2.19.0]
>   at 
> org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:60) 
> ~[camel-core-2.19.0.jar:2.19.0]
>   at 
> org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:104) 
> ~[camel-core-2.19.0.jar:2.19.0]
>   at 
> org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:90) 
> ~[camel-core-2.19.0.jar:2.19.0]
>   at 
> org.apache.camel.processor.RedeliveryErrorHandler.doStart(RedeliveryErrorHandler.java:1447)
>  ~[camel-core-2.19.0.jar:2.19.0]
>   at 
> org.apache.camel.support.ChildServiceSupport.start(ChildServiceSupport.java:44)
>  ~[camel-core-2.19.0.jar:2.19.0]
>   at 
> 

[jira] [Commented] (CAMEL-11266) The ehcache component creates a separate CacheManager per producer route

2017-05-17 Thread Luca Burgazzoli (JIRA)

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

Luca Burgazzoli commented on CAMEL-11266:
-

Yeah that is something I've started of working on :)
So I'm adding a CacheManager "cache" whose key is the configuration source 
(i.e. the uri or a Configuration instance, etc) but it requires a little bit of 
time to make it working properly as there is a change in the life-cycle of the 
cache manager and because of this behavioural change, it will be available in 
2.20.

Note that 2.19.1 will have a way to set the CacheManager on component level 
like 

{code:java}
EhcacheComponent ehcache = new EhcacheComponent();
ehcache.setCacheManager(myCacheManager);

   from("direct:cache")

.to("ehcache:my-cache?keyType=java.lang.String=java.lang.String");
{code}


> The ehcache component creates a separate CacheManager per producer route
> 
>
> Key: CAMEL-11266
> URL: https://issues.apache.org/jira/browse/CAMEL-11266
> Project: Camel
>  Issue Type: Bug
>  Components: camel-ehcache
>Affects Versions: 2.19.0
>Reporter: Marco Santarelli
>Assignee: Luca Burgazzoli
> Fix For: 2.20.0
>
>
> The issue becomes clear if the developers declares more than one producer 
> route with the attached ehcache config: multiple cache managers start 
> contention of file lock and the startup fails.
> {code:xml}
>  
> http://www.w3.org/2001/XMLSchema-instance;
> xmlns:ehcache="http://www.ehcache.org/v3;
> xsi:schemaLocation="http://www.ehcache.org/v3 
> http://www.ehcache.org/schema/ehcache-core-3.3.xsd;>
>  directory="${java.io.tmpdir}/ehcache">
> 
> 
> 
> 
> 60
> 
> 
> 
> 
> 1
> 
> 
> 
> java.lang.String
> java.io.Serializable
> 
> 
> 
> 
> 1000
> 10
> 
> 
> 
> {code}
> resulting in:
> {code}
> Caused by: org.ehcache.StateTransitionException: Couldn't lock rootDir: 
> /var/folders/gf/6psxkr_n7vl_qbhw8mktqqwwgn/T/ehcache
>   at 
> org.ehcache.core.StatusTransitioner$Transition.failed(StatusTransitioner.java:235)
>  ~[ehcache-3.2.2.jar:3.2.2 892e5c56c2a7100866de90dc7c2099a62fb6198b]
>   at org.ehcache.core.EhcacheManager.init(EhcacheManager.java:588) 
> ~[ehcache-3.2.2.jar:3.2.2 892e5c56c2a7100866de90dc7c2099a62fb6198b]
>   at 
> org.apache.camel.component.ehcache.EhcacheManager.start(EhcacheManager.java:66)
>  ~[camel-ehcache-2.19.0.jar:2.19.0]
>   at 
> org.apache.camel.component.ehcache.EhcacheEndpoint.doStart(EhcacheEndpoint.java:65)
>  ~[camel-ehcache-2.19.0.jar:2.19.0]
>   at 
> org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61) 
> ~[camel-core-2.19.0.jar:2.19.0]
>   at 
> org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:75) 
> ~[camel-core-2.19.0.jar:2.19.0]
>   at 
> org.apache.camel.processor.SendProcessor.doStart(SendProcessor.java:236) 
> ~[camel-core-2.19.0.jar:2.19.0]
>   at 
> org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61) 
> ~[camel-core-2.19.0.jar:2.19.0]
>   at 
> org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:75) 
> ~[camel-core-2.19.0.jar:2.19.0]
>   at 
> org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:60) 
> ~[camel-core-2.19.0.jar:2.19.0]
>   at 
> org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:104) 
> ~[camel-core-2.19.0.jar:2.19.0]
>   at 
> org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:90) 
> ~[camel-core-2.19.0.jar:2.19.0]
>   at 
> org.apache.camel.processor.RedeliveryErrorHandler.doStart(RedeliveryErrorHandler.java:1447)
>  ~[camel-core-2.19.0.jar:2.19.0]
>   at 
> org.apache.camel.support.ChildServiceSupport.start(ChildServiceSupport.java:44)
>  ~[camel-core-2.19.0.jar:2.19.0]
>   at 
> org.apache.camel.support.ChildServiceSupport.start(ChildServiceSupport.java:31)
>  ~[camel-core-2.19.0.jar:2.19.0]
>   at 
> org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:75) 
> ~[camel-core-2.19.0.jar:2.19.0]
>   at 
> org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:60) 
> ~[camel-core-2.19.0.jar:2.19.0]
>   at 
> org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:104) 
> ~[camel-core-2.19.0.jar:2.19.0]
>   at 
> org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:90) 
> ~[camel-core-2.19.0.jar:2.19.0]
>   at 
> org.apache.camel.processor.interceptor.DefaultChannel.doStart(DefaultChannel.java:156)
>  ~[camel-core-2.19.0.jar:2.19.0]
>   at 
> 

[jira] [Commented] (CAMEL-11266) The ehcache component creates a separate CacheManager per producer route

2017-05-17 Thread Marco Santarelli (JIRA)

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

Marco Santarelli commented on CAMEL-11266:
--

Ok, thanks luca for this clarification and your example! I still think that if 
we use an autogenerated cacheManager based on XML configuration, we should 
reuse it for producer routes. The limitation of eh-cache file tier comes from 
building 2 cacheManagers with the same configuration on the same VM. Perhaps 
the component should hold a map of configuration url -> cacheManager instance, 
allowing the users to still leverage customizable cacheManagers per route, but 
having a less verbose configuration in case of simple applications.

> The ehcache component creates a separate CacheManager per producer route
> 
>
> Key: CAMEL-11266
> URL: https://issues.apache.org/jira/browse/CAMEL-11266
> Project: Camel
>  Issue Type: Bug
>  Components: camel-ehcache
>Affects Versions: 2.19.0
>Reporter: Marco Santarelli
>Assignee: Luca Burgazzoli
> Fix For: 2.20.0
>
>
> The issue becomes clear if the developers declares more than one producer 
> route with the attached ehcache config: multiple cache managers start 
> contention of file lock and the startup fails.
> {code:xml}
>  
> http://www.w3.org/2001/XMLSchema-instance;
> xmlns:ehcache="http://www.ehcache.org/v3;
> xsi:schemaLocation="http://www.ehcache.org/v3 
> http://www.ehcache.org/schema/ehcache-core-3.3.xsd;>
>  directory="${java.io.tmpdir}/ehcache">
> 
> 
> 
> 
> 60
> 
> 
> 
> 
> 1
> 
> 
> 
> java.lang.String
> java.io.Serializable
> 
> 
> 
> 
> 1000
> 10
> 
> 
> 
> {code}
> resulting in:
> {code}
> Caused by: org.ehcache.StateTransitionException: Couldn't lock rootDir: 
> /var/folders/gf/6psxkr_n7vl_qbhw8mktqqwwgn/T/ehcache
>   at 
> org.ehcache.core.StatusTransitioner$Transition.failed(StatusTransitioner.java:235)
>  ~[ehcache-3.2.2.jar:3.2.2 892e5c56c2a7100866de90dc7c2099a62fb6198b]
>   at org.ehcache.core.EhcacheManager.init(EhcacheManager.java:588) 
> ~[ehcache-3.2.2.jar:3.2.2 892e5c56c2a7100866de90dc7c2099a62fb6198b]
>   at 
> org.apache.camel.component.ehcache.EhcacheManager.start(EhcacheManager.java:66)
>  ~[camel-ehcache-2.19.0.jar:2.19.0]
>   at 
> org.apache.camel.component.ehcache.EhcacheEndpoint.doStart(EhcacheEndpoint.java:65)
>  ~[camel-ehcache-2.19.0.jar:2.19.0]
>   at 
> org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61) 
> ~[camel-core-2.19.0.jar:2.19.0]
>   at 
> org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:75) 
> ~[camel-core-2.19.0.jar:2.19.0]
>   at 
> org.apache.camel.processor.SendProcessor.doStart(SendProcessor.java:236) 
> ~[camel-core-2.19.0.jar:2.19.0]
>   at 
> org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61) 
> ~[camel-core-2.19.0.jar:2.19.0]
>   at 
> org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:75) 
> ~[camel-core-2.19.0.jar:2.19.0]
>   at 
> org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:60) 
> ~[camel-core-2.19.0.jar:2.19.0]
>   at 
> org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:104) 
> ~[camel-core-2.19.0.jar:2.19.0]
>   at 
> org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:90) 
> ~[camel-core-2.19.0.jar:2.19.0]
>   at 
> org.apache.camel.processor.RedeliveryErrorHandler.doStart(RedeliveryErrorHandler.java:1447)
>  ~[camel-core-2.19.0.jar:2.19.0]
>   at 
> org.apache.camel.support.ChildServiceSupport.start(ChildServiceSupport.java:44)
>  ~[camel-core-2.19.0.jar:2.19.0]
>   at 
> org.apache.camel.support.ChildServiceSupport.start(ChildServiceSupport.java:31)
>  ~[camel-core-2.19.0.jar:2.19.0]
>   at 
> org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:75) 
> ~[camel-core-2.19.0.jar:2.19.0]
>   at 
> org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:60) 
> ~[camel-core-2.19.0.jar:2.19.0]
>   at 
> org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:104) 
> ~[camel-core-2.19.0.jar:2.19.0]
>   at 
> org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:90) 
> ~[camel-core-2.19.0.jar:2.19.0]
>   at 
> org.apache.camel.processor.interceptor.DefaultChannel.doStart(DefaultChannel.java:156)
>  ~[camel-core-2.19.0.jar:2.19.0]
>   at 
> org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61) 
> ~[camel-core-2.19.0.jar:2.19.0]
>   at 
> 

[jira] [Commented] (CAMEL-11187) Java 9 - building camel-spring has a maven WARN

2017-05-17 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CAMEL-11187:


GitHub user johnpoth opened a pull request:

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

CAMEL-11187 fix Maven WARN message on Java 9

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

Thanks!

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

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

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

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

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

This closes #1700


commit 5caa6cffe7b7bf48baf6469c32dc789ff9008d19
Author: jpoth 
Date:   2017-05-17T12:05:09Z

CAMEL-11187 fix Maven WARN message on Java 9




> Java 9 - building camel-spring has a maven WARN
> ---
>
> Key: CAMEL-11187
> URL: https://issues.apache.org/jira/browse/CAMEL-11187
> Project: Camel
>  Issue Type: Task
>  Components: build system
>Reporter: Claus Ibsen
>Assignee: John Poth
>Priority: Minor
> Fix For: 2.20.0
>
>
> davsclaus:/Users/davsclaus/workspace/camel/components/camel-spring (master)/$ 
> mvn clean install -P fastinstall
> [INFO] Scanning for projects...
> [WARNING]
> [WARNING] Some problems were encountered while building the effective model 
> for org.apache.camel:camel-spring:jar:2.19.0-SNAPSHOT
> [WARNING] 'profiles.profile[jdk9-build].plugins.plugin.(groupId:artifactId)' 
> must be unique but found duplicate declaration of plugin 
> org.apache.maven.plugins:maven-antrun-plugin @ 
> org.apache.camel:camel-spring:[unknown-version], 
> /Users/davsclaus/workspace/camel/components/camel-spring/pom.xml, line 676, 
> column 19
> [WARNING]
> [WARNING] It is highly recommended to fix these problems because they 
> threaten the stability of your build.
> [WARNING]
> [WARNING] For this reason, future Maven versions might no longer support 
> building such malformed projects.
> [WARNING]



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Work started] (CAMEL-11291) spring boot starters:

2017-05-17 Thread Luca Burgazzoli (JIRA)

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

Work on CAMEL-11291 started by Luca Burgazzoli.
---
> spring boot starters: 
> --
>
> Key: CAMEL-11291
> URL: https://issues.apache.org/jira/browse/CAMEL-11291
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-spring-boot, camel-spring-boot-starters
>Reporter: Luca Burgazzoli
>Assignee: Luca Burgazzoli
>Priority: Minor
> Fix For: 2.20.0
>
>
> as today the camel-package-maven-plugin is responsible to generate
> component starters but sometimes you need to hook into the auto configuration 
> process and with generated started it may be problematic as changes may be 
> overridden by the next camel-package-maven-plugin run.
> So it would be nice to have the auto generation code to collect some bean 
> post configurer and apply them to the component being created.
> For reference see:
> https://lists.apache.org/thread.html/04816521e7eb0c52f0e87488ac0d3a87d8941b3fc180308b07b03aab@%3Cdev.camel.apache.org%3E



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Created] (CAMEL-11291) spring boot starters:

2017-05-17 Thread Luca Burgazzoli (JIRA)
Luca Burgazzoli created CAMEL-11291:
---

 Summary: spring boot starters: 
 Key: CAMEL-11291
 URL: https://issues.apache.org/jira/browse/CAMEL-11291
 Project: Camel
  Issue Type: Improvement
  Components: camel-spring-boot, camel-spring-boot-starters
Reporter: Luca Burgazzoli
Assignee: Luca Burgazzoli
Priority: Minor
 Fix For: 2.20.0


as today the camel-package-maven-plugin is responsible to generate
component starters but sometimes you need to hook into the auto configuration 
process and with generated started it may be problematic as changes may be 
overridden by the next camel-package-maven-plugin run.

So it would be nice to have the auto generation code to collect some bean post 
configurer and apply them to the component being created.

For reference see:
https://lists.apache.org/thread.html/04816521e7eb0c52f0e87488ac0d3a87d8941b3fc180308b07b03aab@%3Cdev.camel.apache.org%3E



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CAMEL-11286) Imported Xquery modules will not resolve using classpath - Regression

2017-05-17 Thread Jeremy Gosling (JIRA)

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

Jeremy Gosling commented on CAMEL-11286:


Looks like it was introduced in 2.15.0, and has been in all subsequent 
versions, including master.  I'm a currently putting together a minimal unit 
test which will exhibit the currently observed behaviour before testing the fix 
which I will provide.

> Imported Xquery modules will not resolve using classpath - Regression
> -
>
> Key: CAMEL-11286
> URL: https://issues.apache.org/jira/browse/CAMEL-11286
> Project: Camel
>  Issue Type: Bug
>  Components: camel-saxon
>Affects Versions: 2.15.0, 2.19.0
>Reporter: Jeremy Gosling
>Priority: Minor
> Fix For: 2.20.0
>
>
> In Camel 2.15.0 the camel-saxon component was refactored to include an 
> XQueryEndpoint class which now instanciates the XQueryBuilder object in the 
> doStart() method.  It then sets the values of various properties on this 
> object, but misses out the moduleURIResolver.  This is therefore null when 
> the query is evaluated and not used by the 
> net.sf.saxon.query.XQueryExpression to resolve xquery module imports as 
> original described in CAMEL-4285. 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Comment Edited] (CAMEL-10504) Hiding an underlying exception if MongoDbBasicConverters fails to convert to DBObject

2017-05-17 Thread Damien B (JIRA)

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

Damien B edited comment on CAMEL-10504 at 5/17/17 10:05 AM:


Unfortunately it leads to another issue: when you want to use multiple inserts, 
the fromAnyObjectToDBObject always fail and the logs are polluted with:
{code}
WARN  Conversion has fallen back to generic Object -> DBObject, but unable to 
convert type org.apache.camel.impl.DefaultMessage. Returning null. 
java.lang.IllegalArgumentException: Infinite recursion (StackOverflowError) 
(through reference chain: 
org.apache.camel.impl.DefaultCamelContext["endpoints"]->java.util.ArrayList[0]->org.apache.camel.component.seda.SedaEndpoint["camelContext"]->org.apache.camel.impl.DefaultCamelContext["endpoints"]->java.util.ArrayList[0]->org.apache.camel.component.seda.SedaEndpoint["camelContext"]->org.apache.camel.impl.DefaultCamelContext["endpoints"]->java.util.ArrayList[0]->org.apache.camel.component.seda.SedaEndpoint["camelContext"]->org.apache.camel.impl.DefaultCamelContext["endpoints"]->java.util.ArrayList[0]->org.apache.camel.component.seda.SedaEndpoint["camelContext"]->org.apache.camel.impl.DefaultCamelContext["endpoints"]->java.util.ArrayList[0]->org.apache.camel.component.seda.SedaEndpoint["camelContext"]->org.apache.camel.impl.DefaultCamelContext["endpoints"]->java.util.ArrayList[0]->org.apache.camel.component.seda.SedaEndpoint["camelContext"]->org.apache.camel.impl.DefaultCamelContext["endpoints"]->java.util.ArrayList[0]->org.apache.camel.component.seda.SedaEndpoint["camelContext"]->org.apache.camel.impl.DefaultCamelContext["endpoints"]->java.util.ArrayList[0]->org.apache.camel.component.seda.SedaEndpoint["camelContext"]->org.apache.camel.impl.DefaultCamelContext["endpoints"]->java.util.ArrayList[0]->org.apache.camel.component.seda.SedaEndpoint["camelContext"]->org.apache.camel.impl.DefaultCamelContext["endpoints"]->java.util.ArrayList[0]
{code}

Context:
{code:xml}

{code}

Body content:
a java.util.List of objects that can be converted to DBObject.

Culprit:
MongoDbProducer::createDoInsert
{code:java}
boolean singleInsert = true;
Object insert = exchange1.getIn().getBody(DBObject.class);
// body could not be converted to DBObject, check to see if it's of 
type List
if (insert == null) {
insert = exchange1.getIn().getBody(List.class);
// if the body of type List was obtained, ensure that all items 
are of type DBObject and cast the List to List
if (insert != null) {
singleInsert = false;
insert = attemptConvertToList((List) insert, exchange1);
} else {
throw new CamelMongoDbException("MongoDB operation = 
insert, Body is not conversible to type DBObject nor List");
}
}
{code}

to check if this a singleInsert, the conversion is attempted on the body (the 
list, it fails) then on the whole message (because of DefaultMessage::getBody). 
And then we see the cycles between DefaultCamelContext and the Endpoints.

But of course the real problem is that we have a systematic stackoverflow when 
trying to use multiple insert on the component, we see it only now because of 
this fix :-)



was (Author: damien_b):
Unfortunately it leads to another issue: when you want to use multiple inserts, 
the fromAnyObjectToDBObject always fail and the logs are polluted with:
{code}
WARN  Conversion has fallen back to generic Object -> DBObject, but unable to 
convert type org.apache.camel.impl.DefaultMessage. Returning null. 
java.lang.IllegalArgumentException: Infinite recursion (StackOverflowError) 
(through reference chain: 

[jira] [Commented] (CAMEL-10504) Hiding an underlying exception if MongoDbBasicConverters fails to convert to DBObject

2017-05-17 Thread Andrea Cosentino (JIRA)

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

Andrea Cosentino commented on CAMEL-10504:
--

Are you able to work on PR? Thanks!

> Hiding an underlying exception if MongoDbBasicConverters fails to convert to 
> DBObject
> -
>
> Key: CAMEL-10504
> URL: https://issues.apache.org/jira/browse/CAMEL-10504
> Project: Camel
>  Issue Type: Bug
>  Components: camel-mongodb
>Affects Versions: 2.17.3, 2.18.0
>Reporter: Evgenii Lomonosov
>Assignee: Andrea Cosentino
>Priority: Minor
> Fix For: 2.18.1, 2.19.0
>
>
> If conversion fails it could be hard to understand what is a problem because 
> it returns just a message "Conversion has fallen back to generic Object -> 
> DBObject, but unable to convert type {}. Returning null" that points to a 
> class that was not converted.
> In case of, as example, if a list of objects that should be converted leads 
> to a memory error because of parent-child link are cycled for 2 objects, it 
> would take a lot of efforts to understand what is going on. And information 
> about underlying exception, stackoverflow in this case, could help to find 
> the root cause much faster than now.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Comment Edited] (CAMEL-10504) Hiding an underlying exception if MongoDbBasicConverters fails to convert to DBObject

2017-05-17 Thread Damien B (JIRA)

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

Damien B edited comment on CAMEL-10504 at 5/17/17 9:43 AM:
---

Unfortunately it leads to another issue: when you want to use multiple inserts, 
the fromAnyObjectToDBObject always fail and the logs are polluted with:
{code}
WARN  Conversion has fallen back to generic Object -> DBObject, but unable to 
convert type org.apache.camel.impl.DefaultMessage. Returning null. 
java.lang.IllegalArgumentException: Infinite recursion (StackOverflowError) 
(through reference chain: 
org.apache.camel.impl.DefaultCamelContext["endpoints"]->java.util.ArrayList[0]->org.apache.camel.component.seda.SedaEndpoint["camelContext"]->org.apache.camel.impl.DefaultCamelContext["endpoints"]->java.util.ArrayList[0]->org.apache.camel.component.seda.SedaEndpoint["camelContext"]->org.apache.camel.impl.DefaultCamelContext["endpoints"]->java.util.ArrayList[0]->org.apache.camel.component.seda.SedaEndpoint["camelContext"]->org.apache.camel.impl.DefaultCamelContext["endpoints"]->java.util.ArrayList[0]->org.apache.camel.component.seda.SedaEndpoint["camelContext"]->org.apache.camel.impl.DefaultCamelContext["endpoints"]->java.util.ArrayList[0]->org.apache.camel.component.seda.SedaEndpoint["camelContext"]->org.apache.camel.impl.DefaultCamelContext["endpoints"]->java.util.ArrayList[0]->org.apache.camel.component.seda.SedaEndpoint["camelContext"]->org.apache.camel.impl.DefaultCamelContext["endpoints"]->java.util.ArrayList[0]->org.apache.camel.component.seda.SedaEndpoint["camelContext"]->org.apache.camel.impl.DefaultCamelContext["endpoints"]->java.util.ArrayList[0]->org.apache.camel.component.seda.SedaEndpoint["camelContext"]->org.apache.camel.impl.DefaultCamelContext["endpoints"]->java.util.ArrayList[0]->org.apache.camel.component.seda.SedaEndpoint["camelContext"]->org.apache.camel.impl.DefaultCamelContext["endpoints"]->java.util.ArrayList[0]
{code}

Context:


Body content:
a java.util.List of objects that can be converted to DBObject.

Culprit:
MongoDbProducer::createDoInsert
boolean singleInsert = true;
Object insert = exchange1.getIn().getBody(DBObject.class);
// body could not be converted to DBObject, check to see if it's of 
type List
if (insert == null) {
insert = exchange1.getIn().getBody(List.class);
// if the body of type List was obtained, ensure that all items 
are of type DBObject and cast the List to List
if (insert != null) {
singleInsert = false;
insert = attemptConvertToList((List) insert, exchange1);
} else {
throw new CamelMongoDbException("MongoDB operation = 
insert, Body is not conversible to type DBObject nor List");
}
}
to check if this a singleInsert, the conversion is attempted on the body (the 
list, it fails) then on the whole message (because of DefaultMessage::getBody). 
And then we see the cycles between DefaultCamelContext and the Endpoints.

But of course the real problem is that we have a systematic stackoverflow when 
trying to use multiple insert on the component, we see it only now because of 
this fix :-)



was (Author: damien_b):
Unfortunately it leads to another issue: when you want to use multiple inserts, 
the fromAnyObjectToDBObject always fail and the logs are polluted with:
WARN  Conversion has fallen back to generic Object -> DBObject, but unable to 
convert type org.apache.camel.impl.DefaultMessage. Returning null. 
java.lang.IllegalArgumentException: Infinite recursion (StackOverflowError) 
(through reference chain: 

[jira] [Commented] (CAMEL-10504) Hiding an underlying exception if MongoDbBasicConverters fails to convert to DBObject

2017-05-17 Thread Damien B (JIRA)

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

Damien B commented on CAMEL-10504:
--

Unfortunately it leads to another issue: when you want to use multiple inserts, 
the fromAnyObjectToDBObject always fail and the logs are polluted with:
WARN  Conversion has fallen back to generic Object -> DBObject, but unable to 
convert type org.apache.camel.impl.DefaultMessage. Returning null. 
java.lang.IllegalArgumentException: Infinite recursion (StackOverflowError) 
(through reference chain: 
org.apache.camel.impl.DefaultCamelContext["endpoints"]->java.util.ArrayList[0]->org.apache.camel.component.seda.SedaEndpoint["camelContext"]->org.apache.camel.impl.DefaultCamelContext["endpoints"]->java.util.ArrayList[0]->org.apache.camel.component.seda.SedaEndpoint["camelContext"]->org.apache.camel.impl.DefaultCamelContext["endpoints"]->java.util.ArrayList[0]->org.apache.camel.component.seda.SedaEndpoint["camelContext"]->org.apache.camel.impl.DefaultCamelContext["endpoints"]->java.util.ArrayList[0]->org.apache.camel.component.seda.SedaEndpoint["camelContext"]->org.apache.camel.impl.DefaultCamelContext["endpoints"]->java.util.ArrayList[0]->org.apache.camel.component.seda.SedaEndpoint["camelContext"]->org.apache.camel.impl.DefaultCamelContext["endpoints"]->java.util.ArrayList[0]->org.apache.camel.component.seda.SedaEndpoint["camelContext"]->org.apache.camel.impl.DefaultCamelContext["endpoints"]->java.util.ArrayList[0]->org.apache.camel.component.seda.SedaEndpoint["camelContext"]->org.apache.camel.impl.DefaultCamelContext["endpoints"]->java.util.ArrayList[0]->org.apache.camel.component.seda.SedaEndpoint["camelContext"]->org.apache.camel.impl.DefaultCamelContext["endpoints"]->java.util.ArrayList[0]->org.apache.camel.component.seda.SedaEndpoint["camelContext"]->org.apache.camel.impl.DefaultCamelContext["endpoints"]->java.util.ArrayList[0]

Context:


Body content:
a java.util.List of objects that can be converted to DBObject.

Culprit:
MongoDbProducer::createDoInsert
boolean singleInsert = true;
Object insert = exchange1.getIn().getBody(DBObject.class);
// body could not be converted to DBObject, check to see if it's of 
type List
if (insert == null) {
insert = exchange1.getIn().getBody(List.class);
// if the body of type List was obtained, ensure that all items 
are of type DBObject and cast the List to List
if (insert != null) {
singleInsert = false;
insert = attemptConvertToList((List) insert, exchange1);
} else {
throw new CamelMongoDbException("MongoDB operation = 
insert, Body is not conversible to type DBObject nor List");
}
}
to check if this a singleInsert, the conversion is attempted on the body (the 
list, it fails) then on the whole message (because of DefaultMessage::getBody). 
And then we see the cycles between DefaultCamelContext and the Endpoints.

But of course the real problem is that we have a systematic stackoverflow when 
trying to use multiple insert on the component, we see it only now because of 
this fix :-)


> Hiding an underlying exception if MongoDbBasicConverters fails to convert to 
> DBObject
> -
>
> Key: CAMEL-10504
> URL: https://issues.apache.org/jira/browse/CAMEL-10504
> Project: Camel
>  Issue Type: Bug
>  Components: camel-mongodb
>Affects Versions: 2.17.3, 2.18.0
>Reporter: Evgenii Lomonosov
>Assignee: Andrea Cosentino
>Priority: Minor
> Fix For: 2.18.1, 2.19.0
>
>
> If conversion fails it could be hard to understand what is a problem because 
> it returns just a message "Conversion has fallen back to generic Object -> 
> DBObject, but unable to convert type {}. Returning null" that points to a 
> class that was not converted.
> In case of, as example, if a list of objects that should be converted leads 
> to a memory error because of parent-child link are cycled for 2 objects, it 
> would take a lot of efforts to understand what is going on. And information 
> about underlying exception, stackoverflow in this case, could help to find 
> the root cause much faster than now.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Resolved] (CAMEL-11271) Support placeholders on attributes of camelContext element

2017-05-17 Thread Zoran Regvart (JIRA)

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

Zoran Regvart resolved CAMEL-11271.
---
   Resolution: Fixed
Fix Version/s: 2.20.0

The description mentions {{autoStartup}} property not to support property 
placeholders, this was a wrong assumption it is supported.

Other thatn that, the missing placeholder support for {{managementNamePattern}} 
and {{threadNamePattern}} was added.

> Support placeholders on attributes of camelContext element
> --
>
> Key: CAMEL-11271
> URL: https://issues.apache.org/jira/browse/CAMEL-11271
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-spring
>Reporter: Zoran Regvart
>Assignee: Zoran Regvart
> Fix For: 2.20.0
>
>
> Property placeholders used in attributes of {{}} element don't 
> get replaced when being set on the {{CamelContextFactoryBean}}.
> For example:
> {code:xml}
>  xmlns="http://camel.apache.org/schema/spring;>
> ...
> 
> {code}
> the {{autoStartup}} property of {{CamelContextFactoryBean}} will be set to 
> the literal value of {{"autoStartup"}} and not 
> replaced with property value with the key of {{autoStartup}}.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CAMEL-11271) Support placeholders on attributes of camelContext element

2017-05-17 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CAMEL-11271:


Github user zregvart closed the pull request at:

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


> Support placeholders on attributes of camelContext element
> --
>
> Key: CAMEL-11271
> URL: https://issues.apache.org/jira/browse/CAMEL-11271
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-spring
>Reporter: Zoran Regvart
>Assignee: Zoran Regvart
> Fix For: 2.20.0
>
>
> Property placeholders used in attributes of {{}} element don't 
> get replaced when being set on the {{CamelContextFactoryBean}}.
> For example:
> {code:xml}
>  xmlns="http://camel.apache.org/schema/spring;>
> ...
> 
> {code}
> the {{autoStartup}} property of {{CamelContextFactoryBean}} will be set to 
> the literal value of {{"autoStartup"}} and not 
> replaced with property value with the key of {{autoStartup}}.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Resolved] (CAMEL-11290) Camel-Infinispan: Continuous Query, add support for recordUpdated event

2017-05-17 Thread Andrea Cosentino (JIRA)

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

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

> Camel-Infinispan: Continuous Query, add support for recordUpdated event
> ---
>
> Key: CAMEL-11290
> URL: https://issues.apache.org/jira/browse/CAMEL-11290
> Project: Camel
>  Issue Type: Bug
>  Components: camel-infinispan
>Reporter: Andrea Cosentino
>Assignee: Andrea Cosentino
>Priority: Minor
> Fix For: 2.20.0
>
>




--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Created] (CAMEL-11290) Camel-Infinispan: Continuous Query add support for recordUpdated event

2017-05-17 Thread Andrea Cosentino (JIRA)
Andrea Cosentino created CAMEL-11290:


 Summary: Camel-Infinispan: Continuous Query add support for 
recordUpdated event
 Key: CAMEL-11290
 URL: https://issues.apache.org/jira/browse/CAMEL-11290
 Project: Camel
  Issue Type: Bug
  Components: camel-infinispan
Reporter: Andrea Cosentino
Assignee: Andrea Cosentino
Priority: Minor
 Fix For: 2.20.0






--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (CAMEL-11290) Camel-Infinispan: Continuous Query, add support for recordUpdated event

2017-05-17 Thread Andrea Cosentino (JIRA)

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

Andrea Cosentino updated CAMEL-11290:
-
Summary: Camel-Infinispan: Continuous Query, add support for recordUpdated 
event  (was: Camel-Infinispan: Continuous Query add support for recordUpdated 
event)

> Camel-Infinispan: Continuous Query, add support for recordUpdated event
> ---
>
> Key: CAMEL-11290
> URL: https://issues.apache.org/jira/browse/CAMEL-11290
> Project: Camel
>  Issue Type: Bug
>  Components: camel-infinispan
>Reporter: Andrea Cosentino
>Assignee: Andrea Cosentino
>Priority: Minor
> Fix For: 2.20.0
>
>




--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (CAMEL-11286) Imported Xquery modules will not resolve using classpath - Regression

2017-05-17 Thread Claus Ibsen (JIRA)

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

Claus Ibsen updated CAMEL-11286:

Fix Version/s: 2.20.0

> Imported Xquery modules will not resolve using classpath - Regression
> -
>
> Key: CAMEL-11286
> URL: https://issues.apache.org/jira/browse/CAMEL-11286
> Project: Camel
>  Issue Type: Bug
>  Components: camel-saxon
>Affects Versions: 2.15.0, 2.19.0
>Reporter: Jeremy Gosling
>Priority: Minor
> Fix For: 2.20.0
>
>
> In Camel 2.15.0 the camel-saxon component was refactored to include an 
> XQueryEndpoint class which now instanciates the XQueryBuilder object in the 
> doStart() method.  It then sets the values of various properties on this 
> object, but misses out the moduleURIResolver.  This is therefore null when 
> the query is evaluated and not used by the 
> net.sf.saxon.query.XQueryExpression to resolve xquery module imports as 
> original described in CAMEL-4285. 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CAMEL-11288) camel-grpc producer incorrectly called async services

2017-05-17 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CAMEL-11288:


Github user dmvolod closed the pull request at:

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


> camel-grpc producer incorrectly called async services
> -
>
> Key: CAMEL-11288
> URL: https://issues.apache.org/jira/browse/CAMEL-11288
> Project: Camel
>  Issue Type: Bug
>  Components: camel-grpc
>Affects Versions: 2.19.0
>Reporter: Dmitry Volodin
>Assignee: Dmitry Volodin
> Fix For: 2.19.1, 2.20.0
>
>
> Error occurs when calling procedures with async (stream incoming and outgoing 
> parameters). This is not handled as expected.   



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Resolved] (CAMEL-11259) Add Distinct queries to camel-mongodb

2017-05-17 Thread Claus Ibsen (JIRA)

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

Claus Ibsen resolved CAMEL-11259.
-
Resolution: Fixed
  Assignee: Claus Ibsen

Thanks for the PR.

Maybe camel-mongodb3 also need this functionality?

> Add Distinct queries to camel-mongodb
> -
>
> Key: CAMEL-11259
> URL: https://issues.apache.org/jira/browse/CAMEL-11259
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-mongodb
>Reporter: Mark Webb
>Assignee: Claus Ibsen
>Priority: Minor
> Fix For: 2.20.0
>
> Attachments: camel-mongodb-distinct-query.patch
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> I would like to see the camel-mongodb component have the ability to query for 
> distinct fields.  



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Resolved] (CAMEL-11288) camel-grpc producer incorrectly called async services

2017-05-17 Thread Claus Ibsen (JIRA)

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

Claus Ibsen resolved CAMEL-11288.
-
Resolution: Fixed

> camel-grpc producer incorrectly called async services
> -
>
> Key: CAMEL-11288
> URL: https://issues.apache.org/jira/browse/CAMEL-11288
> Project: Camel
>  Issue Type: Bug
>  Components: camel-grpc
>Affects Versions: 2.19.0
>Reporter: Dmitry Volodin
>Assignee: Dmitry Volodin
> Fix For: 2.19.1, 2.20.0
>
>
> Error occurs when calling procedures with async (stream incoming and outgoing 
> parameters). This is not handled as expected.   



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (CAMEL-11288) camel-grpc producer incorrectly called async services

2017-05-17 Thread Claus Ibsen (JIRA)

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

Claus Ibsen updated CAMEL-11288:

Priority: Major  (was: Critical)

> camel-grpc producer incorrectly called async services
> -
>
> Key: CAMEL-11288
> URL: https://issues.apache.org/jira/browse/CAMEL-11288
> Project: Camel
>  Issue Type: Bug
>  Components: camel-grpc
>Affects Versions: 2.19.0
>Reporter: Dmitry Volodin
>Assignee: Dmitry Volodin
> Fix For: 2.19.1, 2.20.0
>
>
> Error occurs when calling procedures with async (stream incoming and outgoing 
> parameters). This is not handled as expected.   



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)