[jira] [Commented] (CAMEL-13712) If a javax.mail.Session gets referred to using the "session" URL parameter, Apache Camel Mail ignored its hostnames.

2019-07-01 Thread Claus Ibsen (JIRA)


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

Claus Ibsen commented on CAMEL-13712:
-

You are welcome to attempt to provide a PR that uses the hostname from the 
existing session, and add that into the documentation

> If a javax.mail.Session gets referred to using the "session" URL parameter, 
> Apache Camel Mail ignored its hostnames.
> 
>
> Key: CAMEL-13712
> URL: https://issues.apache.org/jira/browse/CAMEL-13712
> Project: Camel
>  Issue Type: New Feature
>  Components: camel-mail
>Affects Versions: 2.22.1
>Reporter: Philipp Bachmann
>Priority: Minor
>
> {color:#658aba}A javax.mail.Session injected using JNDI can refer to one host 
> per protocol. Referring to such a session using the URL query string 
> parameter session=#jndiName seems to ignore the hosts the session is bound 
> to:{color}
> {color:#658aba}My first try was simply e.g. "smtp://?session=#jndiName". Now 
> Apache Camel Mail complains about a missing hostname.{color}
> {color:#658aba}So I tried "smtp://localhost?session=#jndiName" expecting that 
> "localhost" would have been overridden using the SMTP host the session refers 
> to, which is not the case. Camel complains that no SMTP server was listening 
> on the host named "localhost".{color}
> {color:#658aba}The workaround that works – but is somehow redundant in my 
> opinion – is:{color}
> {{{color:#3381ff}@Resource{color}(mappedName = 
> {color:#658aba}"jndiName"{color})}}
>  {{ {color:#80}private {color}Session {color:#1948a6}mySession{color};}}
> {{{color:#658aba}...to("smtp://"+{color}{color:#1948a6}mySession{color}.getProperty({color:#658aba}"mail.smtp.host"{color})+"{color:#658aba}?session=#jndiName")...{color}}}
> {color:#658aba}The same also applies to the IMAP server (and likely to the 
> other protocols supported by Java Mail as well).{color}
> {color:#658aba}It would be nice iff referring to a JNDI injected session 
> would take the session as-is to simplify the URL.{color}
> {color:#658aba}I found an example for using the "session" parameter: 
> "MailUsingCustomSessionTest". It would be helpful to have another example at 
> hand that either takes the hostname from the session as my example above or 
> that does not contain a hostname at all, given, Apache Camel Mail will 
> support that in the future.{color}



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


[jira] [Updated] (CAMEL-13712) If a javax.mail.Session gets referred to using the "session" URL parameter, Apache Camel Mail ignored its hostnames.

2019-07-01 Thread Claus Ibsen (JIRA)


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

Claus Ibsen updated CAMEL-13712:

Issue Type: Improvement  (was: New Feature)

> If a javax.mail.Session gets referred to using the "session" URL parameter, 
> Apache Camel Mail ignored its hostnames.
> 
>
> Key: CAMEL-13712
> URL: https://issues.apache.org/jira/browse/CAMEL-13712
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-mail
>Affects Versions: 2.22.1
>Reporter: Philipp Bachmann
>Priority: Minor
>
> {color:#658aba}A javax.mail.Session injected using JNDI can refer to one host 
> per protocol. Referring to such a session using the URL query string 
> parameter session=#jndiName seems to ignore the hosts the session is bound 
> to:{color}
> {color:#658aba}My first try was simply e.g. "smtp://?session=#jndiName". Now 
> Apache Camel Mail complains about a missing hostname.{color}
> {color:#658aba}So I tried "smtp://localhost?session=#jndiName" expecting that 
> "localhost" would have been overridden using the SMTP host the session refers 
> to, which is not the case. Camel complains that no SMTP server was listening 
> on the host named "localhost".{color}
> {color:#658aba}The workaround that works – but is somehow redundant in my 
> opinion – is:{color}
> {{{color:#3381ff}@Resource{color}(mappedName = 
> {color:#658aba}"jndiName"{color})}}
>  {{ {color:#80}private {color}Session {color:#1948a6}mySession{color};}}
> {{{color:#658aba}...to("smtp://"+{color}{color:#1948a6}mySession{color}.getProperty({color:#658aba}"mail.smtp.host"{color})+"{color:#658aba}?session=#jndiName")...{color}}}
> {color:#658aba}The same also applies to the IMAP server (and likely to the 
> other protocols supported by Java Mail as well).{color}
> {color:#658aba}It would be nice iff referring to a JNDI injected session 
> would take the session as-is to simplify the URL.{color}
> {color:#658aba}I found an example for using the "session" parameter: 
> "MailUsingCustomSessionTest". It would be helpful to have another example at 
> hand that either takes the hostname from the session as my example above or 
> that does not contain a hostname at all, given, Apache Camel Mail will 
> support that in the future.{color}



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


[jira] [Resolved] (CAMEL-13687) NotifyBuilder not working as expected

2019-07-01 Thread Claus Ibsen (JIRA)


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

Claus Ibsen resolved CAMEL-13687.
-
   Resolution: Fixed
 Assignee: Claus Ibsen
Fix Version/s: 3.0.0.M4
   2.25.0
   2.24.2
   2.23.4
   3.0.0

> NotifyBuilder not working as expected
> -
>
> Key: CAMEL-13687
> URL: https://issues.apache.org/jira/browse/CAMEL-13687
> Project: Camel
>  Issue Type: Bug
>  Components: came-core
>Affects Versions: 2.23.1
>Reporter: Sreejesh
>Assignee: Claus Ibsen
>Priority: Major
> Fix For: 3.0.0, 2.23.4, 2.24.2, 2.25.0, 3.0.0.M4
>
> Attachments: camel-spring-boot-sample.zip
>
>
> am trying to test an error handling route. The {{NotificationBuilder}} does 
> not work as expected (it always returns false).
> Created a main route and a test route to test the main route. I used Spring 
> Boot - all other tests work fine, so there is no problem with the setup I 
> guess.
>  
> I have attached the sample project. Please uncomment the @Ignore method to 
> test the method. Please read the README.md attached in the project



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


[jira] [Commented] (CAMEL-13687) NotifyBuilder not working as expected

2019-07-01 Thread Claus Ibsen (JIRA)


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

Claus Ibsen commented on CAMEL-13687:
-

This is working as designed as the fromRoute is from the original route as its 
stated in the javadoc.

To do what you want we need a new fromCurrentRoute that I am adding.

> NotifyBuilder not working as expected
> -
>
> Key: CAMEL-13687
> URL: https://issues.apache.org/jira/browse/CAMEL-13687
> Project: Camel
>  Issue Type: Bug
>  Components: came-core
>Affects Versions: 2.23.1
>Reporter: Sreejesh
>Priority: Major
> Attachments: camel-spring-boot-sample.zip
>
>
> am trying to test an error handling route. The {{NotificationBuilder}} does 
> not work as expected (it always returns false).
> Created a main route and a test route to test the main route. I used Spring 
> Boot - all other tests work fine, so there is no problem with the setup I 
> guess.
>  
> I have attached the sample project. Please uncomment the @Ignore method to 
> test the method. Please read the README.md attached in the project



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


[jira] [Closed] (CAMEL-13703) camel-example-cdi-osgi doesn't run in Karaf

2019-07-01 Thread Babak Vahdat (JIRA)


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

Babak Vahdat closed CAMEL-13703.

Resolution: Won't Fix

> camel-example-cdi-osgi doesn't run in Karaf
> ---
>
> Key: CAMEL-13703
> URL: https://issues.apache.org/jira/browse/CAMEL-13703
> Project: Camel
>  Issue Type: Task
>  Components: examples
>Affects Versions: 3.0.0-M3
>Reporter: Babak Vahdat
>Priority: Major
>
> Following the instructions in \{{README.md}} by this example, using Karaf 
> {{4.2.6}} I end up with:
> {code}
> (base) ~/Downloads/apache-karaf-4.2.6/bin>./karaf 
> __ __    
>/ //_/ __ _/ __/  
>   / ,<  / __ `/ ___/ __ `/ /_
>  / /| |/ /_/ / /  / /_/ / __/
> /_/ |_|\__,_/_/   \__,_/_/ 
>   Apache Karaf (4.2.6)
> Hit '' for a list of available commands
> and '[cmd] --help' for help on a specific command.
> Hit '' or type 'system:shutdown' or 'logout' to shutdown Karaf.
> karaf@root()> repo-add camel  3.0.0-SNAPSHOT
> Adding feature url 
> mvn:org.apache.camel.karaf/apache-camel/3.0.0-SNAPSHOT/xml/features
> karaf@root()> repo-add activemq 5.15.9
> Adding feature url mvn:org.apache.activemq/activemq-karaf/5.15.9/xml/features
> karaf@root()> feature:install activemq-broker-noweb pax-cdi-weld camel-sjms 
> camel-cdi
> org.apache.felix.resolver.reason.ReasonException: Unable to resolve root: 
> missing requirement [root] osgi.identity; osgi.identity=camel-cdi; 
> type=karaf.feature; version="[3.0.0.SNAPSHOT,3.0.0.SNAPSHOT]"; 
> filter:="(&(osgi.identity=camel-cdi)(type=karaf.feature)(version>=3.0.0.SNAPSHOT)(version<=3.0.0.SNAPSHOT))"
>  [caused by: Unable to resolve camel-cdi/3.0.0.SNAPSHOT: missing requirement 
> [camel-cdi/3.0.0.SNAPSHOT] osgi.identity; 
> osgi.identity=org.apache.camel.camel-cdi; type=osgi.bundle; 
> version="[3.0.0.SNAPSHOT,3.0.0.SNAPSHOT]"; resolution:=mandatory [caused by: 
> Unable to resolve org.apache.camel.camel-cdi/3.0.0.SNAPSHOT: missing 
> requirement [org.apache.camel.camel-cdi/3.0.0.SNAPSHOT] osgi.wiring.package; 
> filter:="(&(osgi.wiring.package=javax.enterprise.context)(version>=2.0.0)(!(version>=3.0.0)))"]]
>   at 
> org.apache.felix.resolver.Candidates$MissingRequirementError.toException(Candidates.java:1343)
>   at 
> org.apache.felix.resolver.ResolverImpl.doResolve(ResolverImpl.java:392)
>   at org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:378)
>   at org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:332)
>   at 
> org.apache.karaf.features.internal.region.SubsystemResolver.resolve(SubsystemResolver.java:257)
>   at 
> org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:393)
>   at 
> org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1062)
>   at 
> org.apache.karaf.features.internal.service.FeaturesServiceImpl.lambda$doProvisionInThread$13(FeaturesServiceImpl.java:998)
>   at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>   at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>   at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>   at java.lang.Thread.run(Thread.java:748)
> Caused by: org.apache.felix.resolver.reason.ReasonException: Unable to 
> resolve camel-cdi/3.0.0.SNAPSHOT: missing requirement 
> [camel-cdi/3.0.0.SNAPSHOT] osgi.identity; 
> osgi.identity=org.apache.camel.camel-cdi; type=osgi.bundle; 
> version="[3.0.0.SNAPSHOT,3.0.0.SNAPSHOT]"; resolution:=mandatory [caused by: 
> Unable to resolve org.apache.camel.camel-cdi/3.0.0.SNAPSHOT: missing 
> requirement [org.apache.camel.camel-cdi/3.0.0.SNAPSHOT] osgi.wiring.package; 
> filter:="(&(osgi.wiring.package=javax.enterprise.context)(version>=2.0.0)(!(version>=3.0.0)))"]
>   at 
> org.apache.felix.resolver.Candidates$MissingRequirementError.toException(Candidates.java:1343)
>   ... 12 more
> Caused by: org.apache.felix.resolver.reason.ReasonException: Unable to 
> resolve org.apache.camel.camel-cdi/3.0.0.SNAPSHOT: missing requirement 
> [org.apache.camel.camel-cdi/3.0.0.SNAPSHOT] osgi.wiring.package; 
> filter:="(&(osgi.wiring.package=javax.enterprise.context)(version>=2.0.0)(!(version>=3.0.0)))"
>   at 
> org.apache.felix.resolver.Candidates$MissingRequirementError.toException(Candidates.java:1343)
>   ... 13 more
> Error executing command: Unable to resolve root: missing requirement [root] 
> osgi.identity; osgi.identity=camel-cdi; type=karaf.feature; 
> version="[3.0.0.SNAPSHOT,3.0.0.SNAPSHOT]"; 
> filter:="(&(osgi.identity=camel-cdi)(type=karaf.feature)(version>=3.0.0.SNAPSHOT)(version<=3.0.0.SNAPSHOT))"
>  [caused by: Unable to resolve camel-cdi/3.0.0.SNAPSHOT: 

[jira] [Updated] (CAMEL-13712) If a javax.mail.Session gets referred to using the "session" URL parameter, Apache Camel Mail ignored its hostnames.

2019-07-01 Thread Philipp Bachmann (JIRA)


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

Philipp Bachmann updated CAMEL-13712:
-
Description: 
{color:#658aba}A javax.mail.Session injected using JNDI can refer to one host 
per protocol. Referring to such a session using the URL query string parameter 
session=#jndiName seems to ignore the hosts the session is bound to:{color}

{color:#658aba}My first try was simply e.g. "smtp://?session=#jndiName". Now 
Apache Camel Mail complains about a missing hostname.{color}

{color:#658aba}So I tried "smtp://localhost?session=#jndiName" expecting that 
"localhost" would have been overridden using the SMTP host the session refers 
to, which is not the case. Camel complains that no SMTP server was listening on 
the host named "localhost".{color}

{color:#658aba}The workaround that works – but is somehow redundant in my 
opinion – is:{color}

{{{color:#3381ff}@Resource{color}(mappedName = 
{color:#658aba}"jndiName"{color})}}
 {{ {color:#80}private {color}Session {color:#1948a6}mySession{color};}}

{{{color:#658aba}...to("smtp://"+{color}{color:#1948a6}mySession{color}.getProperty({color:#658aba}"mail.smtp.host"{color})+"{color:#658aba}?session=#jndiName")...{color}}}

{color:#658aba}The same also applies to the IMAP server (and likely to the 
other protocols supported by Java Mail as well).{color}

{color:#658aba}It would be nice iff referring to a JNDI injected session would 
take the session as-is to simplify the URL.{color}

{color:#658aba}I found an example for using the "session" parameter: 
"MailUsingCustomSessionTest". It would be helpful to have another example at 
hand that either takes the hostname from the session as my example above or 
that does not contain a hostname at all, given, Apache Camel Mail will support 
that in the future.{color}

  was:
{color:#658aba}A javax.mail.Session injected using JNDI can refer to one host 
per protocol. Referring to such a session using the URL query string parameter 
session=#jndiName seems to ignore the hosts the session is bound to:
{color}

{color:#658aba}My first try was simply e.g. "smtp://?session=#jndiName". Now 
Apache Camel Mail complains about a missing hostname.{color}

{color:#658aba}So I tried "smtp://localhost?session=#jndiName" expecting that 
"ignored" would have been overridden using the SMTP host the session refers to, 
which is not the case. Camel complains that no SMTP server was listening on the 
host named "localhost".{color}

{color:#658aba}The workaround that works – but is somehow redundant in my 
opinion – is:{color}

{{{color:#3381ff}@Resource{color}(mappedName = 
{color:#658aba}"jndiName"{color})}}
{{ {color:#80}private {color}Session {color:#1948a6}mySession{color};}}

{{{color:#658aba}...to("smtp://"+{color}{color:#1948a6}mySession{color}.getProperty({color:#658aba}"mail.smtp.host"{color})+"{color:#658aba}?session=#jndiName")...{color}}}

{color:#658aba}The same also applies to the IMAP server (and likely to the 
other protocols supported by Java Mail as well).{color}

{color:#658aba}It would be nice iff referring to a JNDI injected session would 
take the session as-is to simplify the URL.{color}

{color:#658aba}I found an example for using the "session" parameter: 
"MailUsingCustomSessionTest". It would be helpful to have another example at 
hand that either takes the hostname from the session as my example above or 
that does not contain a hostname at all, given, Apache Camel Mail will support 
that in the future.{color}


> If a javax.mail.Session gets referred to using the "session" URL parameter, 
> Apache Camel Mail ignored its hostnames.
> 
>
> Key: CAMEL-13712
> URL: https://issues.apache.org/jira/browse/CAMEL-13712
> Project: Camel
>  Issue Type: New Feature
>  Components: camel-mail
>Affects Versions: 2.22.1
>Reporter: Philipp Bachmann
>Priority: Minor
>
> {color:#658aba}A javax.mail.Session injected using JNDI can refer to one host 
> per protocol. Referring to such a session using the URL query string 
> parameter session=#jndiName seems to ignore the hosts the session is bound 
> to:{color}
> {color:#658aba}My first try was simply e.g. "smtp://?session=#jndiName". Now 
> Apache Camel Mail complains about a missing hostname.{color}
> {color:#658aba}So I tried "smtp://localhost?session=#jndiName" expecting that 
> "localhost" would have been overridden using the SMTP host the session refers 
> to, which is not the case. Camel complains that no SMTP server was listening 
> on the host named "localhost".{color}
> {color:#658aba}The workaround that works – but is somehow redundant in my 
> opinion – is:{color}
> {{{color:#3381ff}@Resource{color}(mappedName = 
> 

[jira] [Assigned] (CAMEL-13711) Files.createTempFile not equivalent to File.createTempFile

2019-07-01 Thread Thomas Diesler (JIRA)


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

Thomas Diesler reassigned CAMEL-13711:
--

Assignee: Thomas Diesler

> Files.createTempFile not equivalent to File.createTempFile
> --
>
> Key: CAMEL-13711
> URL: https://issues.apache.org/jira/browse/CAMEL-13711
> Project: Camel
>  Issue Type: Bug
>  Components: camel-hdfs2
>Reporter: Thomas Diesler
>Assignee: Thomas Diesler
>Priority: Major
> Fix For: 3.0.0
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> It seems that Files.createTempFile is NOT equivalent to File.createTempFile.
> With this debug code 
> {code}
> private File getHfdsFileToTmpFile(String hdfsPath, HdfsConfiguration 
> configuration) {
> try {
> String fname = hdfsPath.substring(hdfsPath.lastIndexOf('/'));
> System.out.println("fname: " + fname);
> 
> File outputDest;
> try {
> System.out.println("First trying: Files.createTempFile");
> outputDest = Files.createTempFile(fname, 
> ".hdfs").toFile();
> } catch (Exception ex) {
> 
> ex.printStackTrace();
> System.out.println("Now trying: File.createTempFile");
> outputDest = File.createTempFile(fname, ".hdfs");
> }
> 
> System.out.println("outputDest: " + outputDest);
>  
>...
> }
> },
> {code}
> I see ...
> {code}
> {12:29:50,180 INFO  [stdout]  fname: /ID-MacBook-1561976987280-0-1.opened
> 12:29:50,180 INFO  [stdout]  First trying: Files.createTempFile
> 12:29:50,189 ERROR [stderr]  java.lang.IllegalArgumentException: Invalid 
> prefix or suffix
> 12:29:50,189 ERROR [stderr]   at 
> java.nio.file.TempFileHelper.generatePath(TempFileHelper.java:63)
> 12:29:50,190 ERROR [stderr]   at 
> java.nio.file.TempFileHelper.create(TempFileHelper.java:127)
> 12:29:50,190 ERROR [stderr]   at 
> java.nio.file.TempFileHelper.createTempFile(TempFileHelper.java:161)
> 12:29:50,190 ERROR [stderr]   at 
> java.nio.file.Files.createTempFile(Files.java:897)
> 12:29:50,190 ERROR [stderr]   at 
> org.apache.camel.component.hdfs2.HdfsFileType$1.getHfdsFileToTmpFile(HdfsFileType.java:147)
> 12:29:50,190 ERROR [stderr]   at 
> org.apache.camel.component.hdfs2.HdfsFileType$1.createInputStream(HdfsFileType.java:131)
> 12:29:50,191 ERROR [stderr]   at 
> org.apache.camel.component.hdfs2.HdfsInputStream.createInputStream(HdfsInputStream.java:50)
> 12:29:50,191 ERROR [stderr]   at 
> org.apache.camel.component.hdfs2.HdfsConsumer.doPoll(HdfsConsumer.java:139)
> 12:29:50,191 ERROR [stderr]   at 
> org.apache.camel.component.hdfs2.HdfsConsumer.poll(HdfsConsumer.java:97)
> 12:29:50,191 ERROR [stderr]   at 
> org.apache.camel.support.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:170)
> 12:29:50,191 ERROR [stderr]   at 
> org.apache.camel.support.ScheduledPollConsumer.run(ScheduledPollConsumer.java:97)
> 12:29:50,191 ERROR [stderr]   at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
> 12:29:50,191 ERROR [stderr]   at 
> java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
> 12:29:50,192 ERROR [stderr]   at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
> 12:29:50,192 ERROR [stderr]   at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
> 12:29:50,192 ERROR [stderr]   at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> 12:29:50,192 ERROR [stderr]   at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> 12:29:50,192 ERROR [stderr]   at java.lang.Thread.run(Thread.java:748)
> 12:29:50,192 INFO  [stdout]  Now trying: File.createTempFile
> 12:29:50,193 INFO  [stdout]  outputDest: 
> /var/folders/11/lsh29g8s2msbx_sv1j2zzg5cgn/T/ID-MacBook-1561976987280-0-1.opened3105164072945824679.hdfs
> {code}
> CrossRef: https://github.com/wildfly-extras/wildfly-camel/issues/2838



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


[jira] [Resolved] (CAMEL-13705) Properties component should work with Eclipse MicroProfile Config

2019-07-01 Thread Claus Ibsen (JIRA)


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

Claus Ibsen resolved CAMEL-13705.
-
Resolution: Fixed

> Properties component should work with Eclipse MicroProfile Config
> -
>
> Key: CAMEL-13705
> URL: https://issues.apache.org/jira/browse/CAMEL-13705
> Project: Camel
>  Issue Type: New Feature
>Reporter: Claus Ibsen
>Assignee: Claus Ibsen
>Priority: Major
> Fix For: 3.0.0, 3.0.0.M4
>
>
> We should integrate with MP Config so you can build MP apps and have Camel's 
> properties component use their properties.
> We should allow to auto-detect this if eg a camel-microprofile-config is on 
> the classpath and then setup this bridge automatic.



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


[jira] [Created] (CAMEL-13712) If a javax.mail.Session gets referred to using the "session" URL parameter, Apache Camel Mail ignored its hostnames.

2019-07-01 Thread Philipp Bachmann (JIRA)
Philipp Bachmann created CAMEL-13712:


 Summary: If a javax.mail.Session gets referred to using the 
"session" URL parameter, Apache Camel Mail ignored its hostnames.
 Key: CAMEL-13712
 URL: https://issues.apache.org/jira/browse/CAMEL-13712
 Project: Camel
  Issue Type: New Feature
  Components: camel-mail
Affects Versions: 2.22.1
Reporter: Philipp Bachmann


{color:#658aba}A javax.mail.Session injected using JNDI can refer to one host 
per protocol. Referring to such a session using the URL query string parameter 
session=#jndiName seems to ignore the hosts the session is bound to:
{color}

{color:#658aba}My first try was simply e.g. "smtp://?session=#jndiName". Now 
Apache Camel Mail complains about a missing hostname.{color}

{color:#658aba}So I tried "smtp://localhost?session=#jndiName" expecting that 
"ignored" would have been overridden using the SMTP host the session refers to, 
which is not the case. Camel complains that no SMTP server was listening on the 
host named "localhost".{color}

{color:#658aba}The workaround that works – but is somehow redundant in my 
opinion – is:{color}

{{{color:#3381ff}@Resource{color}(mappedName = 
{color:#658aba}"jndiName"{color})}}
{{ {color:#80}private {color}Session {color:#1948a6}mySession{color};}}

{{{color:#658aba}...to("smtp://"+{color}{color:#1948a6}mySession{color}.getProperty({color:#658aba}"mail.smtp.host"{color})+"{color:#658aba}?session=#jndiName")...{color}}}

{color:#658aba}The same also applies to the IMAP server (and likely to the 
other protocols supported by Java Mail as well).{color}

{color:#658aba}It would be nice iff referring to a JNDI injected session would 
take the session as-is to simplify the URL.{color}

{color:#658aba}I found an example for using the "session" parameter: 
"MailUsingCustomSessionTest". It would be helpful to have another example at 
hand that either takes the hostname from the session as my example above or 
that does not contain a hostname at all, given, Apache Camel Mail will support 
that in the future.{color}



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


[jira] [Resolved] (CAMEL-13709) Properties component - Optimise to not call loadProperties to frequently

2019-07-01 Thread Claus Ibsen (JIRA)


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

Claus Ibsen resolved CAMEL-13709.
-
   Resolution: Fixed
 Assignee: Claus Ibsen
Fix Version/s: 3.0.0.M4

> Properties component - Optimise to not call loadProperties to frequently
> 
>
> Key: CAMEL-13709
> URL: https://issues.apache.org/jira/browse/CAMEL-13709
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-core
>Reporter: Claus Ibsen
>Assignee: Claus Ibsen
>Priority: Major
> Fix For: 3.0.0, 3.0.0.M4
>
>
> The camel-properties calls loadProperties to load all the properties. But it 
> tend to do this for each parseUri for custom PropertiesSource and other means 
> which can be optimised.
> The cache is based on properties location only.



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


[jira] [Work logged] (CAMEL-13711) Files.createTempFile not equivalent to File.createTempFile

2019-07-01 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/CAMEL-13711?focusedWorklogId=270079=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-270079
 ]

ASF GitHub Bot logged work on CAMEL-13711:
--

Author: ASF GitHub Bot
Created on: 01/Jul/19 10:49
Start Date: 01/Jul/19 10:49
Worklog Time Spent: 10m 
  Work Description: tdiesler commented on pull request #3008: [CAMEL-13711] 
Files.createTempFile not equivalent to File.createTempFile
URL: https://github.com/apache/camel/pull/3008
 
 
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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


Issue Time Tracking
---

Worklog Id: (was: 270079)
Time Spent: 10m
Remaining Estimate: 0h

> Files.createTempFile not equivalent to File.createTempFile
> --
>
> Key: CAMEL-13711
> URL: https://issues.apache.org/jira/browse/CAMEL-13711
> Project: Camel
>  Issue Type: Bug
>  Components: camel-hdfs2
>Reporter: Thomas Diesler
>Priority: Major
> Fix For: 3.0.0
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> It seems that Files.createTempFile is NOT equivalent to File.createTempFile.
> With this debug code 
> {code}
> private File getHfdsFileToTmpFile(String hdfsPath, HdfsConfiguration 
> configuration) {
> try {
> String fname = hdfsPath.substring(hdfsPath.lastIndexOf('/'));
> System.out.println("fname: " + fname);
> 
> File outputDest;
> try {
> System.out.println("First trying: Files.createTempFile");
> outputDest = Files.createTempFile(fname, 
> ".hdfs").toFile();
> } catch (Exception ex) {
> 
> ex.printStackTrace();
> System.out.println("Now trying: File.createTempFile");
> outputDest = File.createTempFile(fname, ".hdfs");
> }
> 
> System.out.println("outputDest: " + outputDest);
>  
>...
> }
> },
> {code}
> I see ...
> {code}
> {12:29:50,180 INFO  [stdout]  fname: /ID-MacBook-1561976987280-0-1.opened
> 12:29:50,180 INFO  [stdout]  First trying: Files.createTempFile
> 12:29:50,189 ERROR [stderr]  java.lang.IllegalArgumentException: Invalid 
> prefix or suffix
> 12:29:50,189 ERROR [stderr]   at 
> java.nio.file.TempFileHelper.generatePath(TempFileHelper.java:63)
> 12:29:50,190 ERROR [stderr]   at 
> java.nio.file.TempFileHelper.create(TempFileHelper.java:127)
> 12:29:50,190 ERROR [stderr]   at 
> java.nio.file.TempFileHelper.createTempFile(TempFileHelper.java:161)
> 12:29:50,190 ERROR [stderr]   at 
> java.nio.file.Files.createTempFile(Files.java:897)
> 12:29:50,190 ERROR [stderr]   at 
> org.apache.camel.component.hdfs2.HdfsFileType$1.getHfdsFileToTmpFile(HdfsFileType.java:147)
> 12:29:50,190 ERROR [stderr]   at 
> org.apache.camel.component.hdfs2.HdfsFileType$1.createInputStream(HdfsFileType.java:131)
> 12:29:50,191 ERROR [stderr]   at 
> org.apache.camel.component.hdfs2.HdfsInputStream.createInputStream(HdfsInputStream.java:50)
> 12:29:50,191 ERROR [stderr]   at 
> org.apache.camel.component.hdfs2.HdfsConsumer.doPoll(HdfsConsumer.java:139)
> 12:29:50,191 ERROR [stderr]   at 
> org.apache.camel.component.hdfs2.HdfsConsumer.poll(HdfsConsumer.java:97)
> 12:29:50,191 ERROR [stderr]   at 
> org.apache.camel.support.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:170)
> 12:29:50,191 ERROR [stderr]   at 
> org.apache.camel.support.ScheduledPollConsumer.run(ScheduledPollConsumer.java:97)
> 12:29:50,191 ERROR [stderr]   at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
> 12:29:50,191 ERROR [stderr]   at 
> java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
> 12:29:50,192 ERROR [stderr]   at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
> 12:29:50,192 ERROR [stderr]   at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
> 12:29:50,192 ERROR [stderr]   at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> 12:29:50,192 ERROR [stderr]   at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> 12:29:50,192 ERROR [stderr]   at java.lang.Thread.run(Thread.java:748)
> 12:29:50,192 INFO  [stdout]  Now trying: File.createTempFile
> 12:29:50,193 

[jira] [Updated] (CAMEL-13711) Files.createTempFile not equivalent to File.createTempFile

2019-07-01 Thread Thomas Diesler (JIRA)


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

Thomas Diesler updated CAMEL-13711:
---
Description: 
It seems that Files.createTempFile is NOT equivalent to File.createTempFile.

With this debug code 

{code}
private File getHfdsFileToTmpFile(String hdfsPath, HdfsConfiguration 
configuration) {
try {
String fname = hdfsPath.substring(hdfsPath.lastIndexOf('/'));

System.out.println("fname: " + fname);

File outputDest;
try {
System.out.println("First trying: Files.createTempFile");
outputDest = Files.createTempFile(fname, ".hdfs").toFile();
} catch (Exception ex) {

ex.printStackTrace();

System.out.println("Now trying: File.createTempFile");
outputDest = File.createTempFile(fname, ".hdfs");
}

System.out.println("outputDest: " + outputDest);
 
   ...
}
},
{code}

I see ...

{code}
{12:29:50,180 INFO  [stdout]  fname: /ID-MacBook-1561976987280-0-1.opened
12:29:50,180 INFO  [stdout]  First trying: Files.createTempFile
12:29:50,189 ERROR [stderr]  java.lang.IllegalArgumentException: Invalid prefix 
or suffix
12:29:50,189 ERROR [stderr] at 
java.nio.file.TempFileHelper.generatePath(TempFileHelper.java:63)
12:29:50,190 ERROR [stderr] at 
java.nio.file.TempFileHelper.create(TempFileHelper.java:127)
12:29:50,190 ERROR [stderr] at 
java.nio.file.TempFileHelper.createTempFile(TempFileHelper.java:161)
12:29:50,190 ERROR [stderr] at 
java.nio.file.Files.createTempFile(Files.java:897)
12:29:50,190 ERROR [stderr] at 
org.apache.camel.component.hdfs2.HdfsFileType$1.getHfdsFileToTmpFile(HdfsFileType.java:147)
12:29:50,190 ERROR [stderr] at 
org.apache.camel.component.hdfs2.HdfsFileType$1.createInputStream(HdfsFileType.java:131)
12:29:50,191 ERROR [stderr] at 
org.apache.camel.component.hdfs2.HdfsInputStream.createInputStream(HdfsInputStream.java:50)
12:29:50,191 ERROR [stderr] at 
org.apache.camel.component.hdfs2.HdfsConsumer.doPoll(HdfsConsumer.java:139)
12:29:50,191 ERROR [stderr] at 
org.apache.camel.component.hdfs2.HdfsConsumer.poll(HdfsConsumer.java:97)
12:29:50,191 ERROR [stderr] at 
org.apache.camel.support.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:170)
12:29:50,191 ERROR [stderr] at 
org.apache.camel.support.ScheduledPollConsumer.run(ScheduledPollConsumer.java:97)
12:29:50,191 ERROR [stderr] at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
12:29:50,191 ERROR [stderr] at 
java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
12:29:50,192 ERROR [stderr] at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
12:29:50,192 ERROR [stderr] at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
12:29:50,192 ERROR [stderr] at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
12:29:50,192 ERROR [stderr] at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
12:29:50,192 ERROR [stderr] at java.lang.Thread.run(Thread.java:748)
12:29:50,192 INFO  [stdout]  Now trying: File.createTempFile
12:29:50,193 INFO  [stdout]  outputDest: 
/var/folders/11/lsh29g8s2msbx_sv1j2zzg5cgn/T/ID-MacBook-1561976987280-0-1.opened3105164072945824679.hdfs
{code}

CrossRef: https://github.com/wildfly-extras/wildfly-camel/issues/2838

  was:
It seems that Files.createTempFile is NOT equivalent to File.createTempFile.

With this debug code 

{code}
private File getHfdsFileToTmpFile(String hdfsPath, HdfsConfiguration 
configuration) {
try {
String fname = hdfsPath.substring(hdfsPath.lastIndexOf('/'));

System.out.println("fname: " + fname);

File outputDest;
try {
System.out.println("First trying: Files.createTempFile");
outputDest = Files.createTempFile(fname, ".hdfs").toFile();
} catch (Exception ex) {

ex.printStackTrace();

System.out.println("Now trying: File.createTempFile");
outputDest = File.createTempFile(fname, ".hdfs");
}

System.out.println("outputDest: " + outputDest);
 
   ...
}
},
{code}

I see ...

{code}
{12:29:50,180 INFO  [stdout]  fname: /ID-MacBook-1561976987280-0-1.opened
12:29:50,180 INFO  [stdout]  First trying: Files.createTempFile
12:29:50,189 ERROR [stderr]  

[jira] [Commented] (CAMEL-13711) Files.createTempFile not equivalent to File.createTempFile

2019-07-01 Thread Thomas Diesler (JIRA)


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

Thomas Diesler commented on CAMEL-13711:


See github comment
https://github.com/apache/camel/commit/bdc882a2031df73fdf48d5c22ff8c0014ceec82d#r34138795

> Files.createTempFile not equivalent to File.createTempFile
> --
>
> Key: CAMEL-13711
> URL: https://issues.apache.org/jira/browse/CAMEL-13711
> Project: Camel
>  Issue Type: Bug
>  Components: camel-hdfs2
>Reporter: Thomas Diesler
>Priority: Major
> Fix For: 3.0.0
>
>
> It seems that Files.createTempFile is NOT equivalent to File.createTempFile.
> With this debug code 
> {code}
> private File getHfdsFileToTmpFile(String hdfsPath, HdfsConfiguration 
> configuration) {
> try {
> String fname = hdfsPath.substring(hdfsPath.lastIndexOf('/'));
> System.out.println("fname: " + fname);
> 
> File outputDest;
> try {
> System.out.println("First trying: Files.createTempFile");
> outputDest = Files.createTempFile(fname, 
> ".hdfs").toFile();
> } catch (Exception ex) {
> 
> ex.printStackTrace();
> System.out.println("Now trying: File.createTempFile");
> outputDest = File.createTempFile(fname, ".hdfs");
> }
> 
> System.out.println("outputDest: " + outputDest);
>  
>...
> }
> },
> {code}
> I see ...
> {code}
> {12:29:50,180 INFO  [stdout]  fname: /ID-MacBook-1561976987280-0-1.opened
> 12:29:50,180 INFO  [stdout]  First trying: Files.createTempFile
> 12:29:50,189 ERROR [stderr]  java.lang.IllegalArgumentException: Invalid 
> prefix or suffix
> 12:29:50,189 ERROR [stderr]   at 
> java.nio.file.TempFileHelper.generatePath(TempFileHelper.java:63)
> 12:29:50,190 ERROR [stderr]   at 
> java.nio.file.TempFileHelper.create(TempFileHelper.java:127)
> 12:29:50,190 ERROR [stderr]   at 
> java.nio.file.TempFileHelper.createTempFile(TempFileHelper.java:161)
> 12:29:50,190 ERROR [stderr]   at 
> java.nio.file.Files.createTempFile(Files.java:897)
> 12:29:50,190 ERROR [stderr]   at 
> org.apache.camel.component.hdfs2.HdfsFileType$1.getHfdsFileToTmpFile(HdfsFileType.java:147)
> 12:29:50,190 ERROR [stderr]   at 
> org.apache.camel.component.hdfs2.HdfsFileType$1.createInputStream(HdfsFileType.java:131)
> 12:29:50,191 ERROR [stderr]   at 
> org.apache.camel.component.hdfs2.HdfsInputStream.createInputStream(HdfsInputStream.java:50)
> 12:29:50,191 ERROR [stderr]   at 
> org.apache.camel.component.hdfs2.HdfsConsumer.doPoll(HdfsConsumer.java:139)
> 12:29:50,191 ERROR [stderr]   at 
> org.apache.camel.component.hdfs2.HdfsConsumer.poll(HdfsConsumer.java:97)
> 12:29:50,191 ERROR [stderr]   at 
> org.apache.camel.support.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:170)
> 12:29:50,191 ERROR [stderr]   at 
> org.apache.camel.support.ScheduledPollConsumer.run(ScheduledPollConsumer.java:97)
> 12:29:50,191 ERROR [stderr]   at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
> 12:29:50,191 ERROR [stderr]   at 
> java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
> 12:29:50,192 ERROR [stderr]   at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
> 12:29:50,192 ERROR [stderr]   at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
> 12:29:50,192 ERROR [stderr]   at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> 12:29:50,192 ERROR [stderr]   at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> 12:29:50,192 ERROR [stderr]   at java.lang.Thread.run(Thread.java:748)
> 12:29:50,192 INFO  [stdout]  Now trying: File.createTempFile
> 12:29:50,193 INFO  [stdout]  outputDest: 
> /var/folders/11/lsh29g8s2msbx_sv1j2zzg5cgn/T/ID-MacBook-1561976987280-0-1.opened3105164072945824679.hdfs
> {code}



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


[jira] [Updated] (CAMEL-13711) Files.createTempFile not equivalent to File.createTempFile

2019-07-01 Thread Thomas Diesler (JIRA)


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

Thomas Diesler updated CAMEL-13711:
---
Description: 
It seems that Files.createTempFile is NOT equivalent to File.createTempFile.

With this debug code 

{code}
private File getHfdsFileToTmpFile(String hdfsPath, HdfsConfiguration 
configuration) {
try {
String fname = hdfsPath.substring(hdfsPath.lastIndexOf('/'));

System.out.println("fname: " + fname);

File outputDest;
try {
System.out.println("First trying: Files.createTempFile");
outputDest = Files.createTempFile(fname, ".hdfs").toFile();
} catch (Exception ex) {

ex.printStackTrace();

System.out.println("Now trying: File.createTempFile");
outputDest = File.createTempFile(fname, ".hdfs");
}

System.out.println("outputDest: " + outputDest);
 
   ...
}
},
{code}

I see ...

{code}
{12:29:50,180 INFO  [stdout]  fname: /ID-MacBook-1561976987280-0-1.opened
12:29:50,180 INFO  [stdout]  First trying: Files.createTempFile
12:29:50,189 ERROR [stderr]  java.lang.IllegalArgumentException: Invalid prefix 
or suffix
12:29:50,189 ERROR [stderr] at 
java.nio.file.TempFileHelper.generatePath(TempFileHelper.java:63)
12:29:50,190 ERROR [stderr] at 
java.nio.file.TempFileHelper.create(TempFileHelper.java:127)
12:29:50,190 ERROR [stderr] at 
java.nio.file.TempFileHelper.createTempFile(TempFileHelper.java:161)
12:29:50,190 ERROR [stderr] at 
java.nio.file.Files.createTempFile(Files.java:897)
12:29:50,190 ERROR [stderr] at 
org.apache.camel.component.hdfs2.HdfsFileType$1.getHfdsFileToTmpFile(HdfsFileType.java:147)
12:29:50,190 ERROR [stderr] at 
org.apache.camel.component.hdfs2.HdfsFileType$1.createInputStream(HdfsFileType.java:131)
12:29:50,191 ERROR [stderr] at 
org.apache.camel.component.hdfs2.HdfsInputStream.createInputStream(HdfsInputStream.java:50)
12:29:50,191 ERROR [stderr] at 
org.apache.camel.component.hdfs2.HdfsConsumer.doPoll(HdfsConsumer.java:139)
12:29:50,191 ERROR [stderr] at 
org.apache.camel.component.hdfs2.HdfsConsumer.poll(HdfsConsumer.java:97)
12:29:50,191 ERROR [stderr] at 
org.apache.camel.support.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:170)
12:29:50,191 ERROR [stderr] at 
org.apache.camel.support.ScheduledPollConsumer.run(ScheduledPollConsumer.java:97)
12:29:50,191 ERROR [stderr] at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
12:29:50,191 ERROR [stderr] at 
java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
12:29:50,192 ERROR [stderr] at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
12:29:50,192 ERROR [stderr] at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
12:29:50,192 ERROR [stderr] at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
12:29:50,192 ERROR [stderr] at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
12:29:50,192 ERROR [stderr] at java.lang.Thread.run(Thread.java:748)
12:29:50,192 INFO  [stdout]  Now trying: File.createTempFile
12:29:50,193 INFO  [stdout]  outputDest: 
/var/folders/11/lsh29g8s2msbx_sv1j2zzg5cgn/T/ID-MacBook-1561976987280-0-1.opened3105164072945824679.hdfs
}

  was:
It seems that Files.createTempFile is NOT equivalent to File.createTempFile.

With this debug code 

{code}
private File getHfdsFileToTmpFile(String hdfsPath, HdfsConfiguration 
configuration) {
try {
String fname = hdfsPath.substring(hdfsPath.lastIndexOf('/'));

System.out.println("fname: " + fname);

File outputDest;
try {
outputDest = Files.createTempFile(fname, ".hdfs").toFile();
} catch (Exception ex) {

ex.printStackTrace();

System.out.println("Now trying: File.createTempFile");
outputDest = File.createTempFile(fname, ".hdfs");
}

System.out.println("outputDest: " + outputDest);
 
   ...
}
},
{code}

I see ...

{code}
{12:29:50,180 INFO  [stdout]  fname: /ID-MacBook-1561976987280-0-1.opened
12:29:50,180 INFO  [stdout]  First trying: Files.createTempFile
12:29:50,189 ERROR [stderr]  java.lang.IllegalArgumentException: Invalid prefix 
or suffix
12:29:50,189 ERROR [stderr] at 

[jira] [Updated] (CAMEL-13711) Files.createTempFile not equivalent to File.createTempFile

2019-07-01 Thread Thomas Diesler (JIRA)


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

Thomas Diesler updated CAMEL-13711:
---
Description: 
It seems that Files.createTempFile is NOT equivalent to File.createTempFile.

With this debug code 

{code}
private File getHfdsFileToTmpFile(String hdfsPath, HdfsConfiguration 
configuration) {
try {
String fname = hdfsPath.substring(hdfsPath.lastIndexOf('/'));

System.out.println("fname: " + fname);

File outputDest;
try {
System.out.println("First trying: Files.createTempFile");
outputDest = Files.createTempFile(fname, ".hdfs").toFile();
} catch (Exception ex) {

ex.printStackTrace();

System.out.println("Now trying: File.createTempFile");
outputDest = File.createTempFile(fname, ".hdfs");
}

System.out.println("outputDest: " + outputDest);
 
   ...
}
},
{code}

I see ...

{code}
{12:29:50,180 INFO  [stdout]  fname: /ID-MacBook-1561976987280-0-1.opened
12:29:50,180 INFO  [stdout]  First trying: Files.createTempFile
12:29:50,189 ERROR [stderr]  java.lang.IllegalArgumentException: Invalid prefix 
or suffix
12:29:50,189 ERROR [stderr] at 
java.nio.file.TempFileHelper.generatePath(TempFileHelper.java:63)
12:29:50,190 ERROR [stderr] at 
java.nio.file.TempFileHelper.create(TempFileHelper.java:127)
12:29:50,190 ERROR [stderr] at 
java.nio.file.TempFileHelper.createTempFile(TempFileHelper.java:161)
12:29:50,190 ERROR [stderr] at 
java.nio.file.Files.createTempFile(Files.java:897)
12:29:50,190 ERROR [stderr] at 
org.apache.camel.component.hdfs2.HdfsFileType$1.getHfdsFileToTmpFile(HdfsFileType.java:147)
12:29:50,190 ERROR [stderr] at 
org.apache.camel.component.hdfs2.HdfsFileType$1.createInputStream(HdfsFileType.java:131)
12:29:50,191 ERROR [stderr] at 
org.apache.camel.component.hdfs2.HdfsInputStream.createInputStream(HdfsInputStream.java:50)
12:29:50,191 ERROR [stderr] at 
org.apache.camel.component.hdfs2.HdfsConsumer.doPoll(HdfsConsumer.java:139)
12:29:50,191 ERROR [stderr] at 
org.apache.camel.component.hdfs2.HdfsConsumer.poll(HdfsConsumer.java:97)
12:29:50,191 ERROR [stderr] at 
org.apache.camel.support.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:170)
12:29:50,191 ERROR [stderr] at 
org.apache.camel.support.ScheduledPollConsumer.run(ScheduledPollConsumer.java:97)
12:29:50,191 ERROR [stderr] at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
12:29:50,191 ERROR [stderr] at 
java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
12:29:50,192 ERROR [stderr] at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
12:29:50,192 ERROR [stderr] at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
12:29:50,192 ERROR [stderr] at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
12:29:50,192 ERROR [stderr] at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
12:29:50,192 ERROR [stderr] at java.lang.Thread.run(Thread.java:748)
12:29:50,192 INFO  [stdout]  Now trying: File.createTempFile
12:29:50,193 INFO  [stdout]  outputDest: 
/var/folders/11/lsh29g8s2msbx_sv1j2zzg5cgn/T/ID-MacBook-1561976987280-0-1.opened3105164072945824679.hdfs
{code}

  was:
It seems that Files.createTempFile is NOT equivalent to File.createTempFile.

With this debug code 

{code}
private File getHfdsFileToTmpFile(String hdfsPath, HdfsConfiguration 
configuration) {
try {
String fname = hdfsPath.substring(hdfsPath.lastIndexOf('/'));

System.out.println("fname: " + fname);

File outputDest;
try {
System.out.println("First trying: Files.createTempFile");
outputDest = Files.createTempFile(fname, ".hdfs").toFile();
} catch (Exception ex) {

ex.printStackTrace();

System.out.println("Now trying: File.createTempFile");
outputDest = File.createTempFile(fname, ".hdfs");
}

System.out.println("outputDest: " + outputDest);
 
   ...
}
},
{code}

I see ...

{code}
{12:29:50,180 INFO  [stdout]  fname: /ID-MacBook-1561976987280-0-1.opened
12:29:50,180 INFO  [stdout]  First trying: Files.createTempFile
12:29:50,189 ERROR [stderr]  java.lang.IllegalArgumentException: Invalid prefix 
or suffix
12:29:50,189 

[jira] [Created] (CAMEL-13711) Files.createTempFile not equivalent to File.createTempFile

2019-07-01 Thread Thomas Diesler (JIRA)
Thomas Diesler created CAMEL-13711:
--

 Summary: Files.createTempFile not equivalent to File.createTempFile
 Key: CAMEL-13711
 URL: https://issues.apache.org/jira/browse/CAMEL-13711
 Project: Camel
  Issue Type: Bug
  Components: camel-hdfs2
Reporter: Thomas Diesler
 Fix For: 3.0.0


It seems that Files.createTempFile is NOT equivalent to File.createTempFile.

With this debug code 

{code}
private File getHfdsFileToTmpFile(String hdfsPath, HdfsConfiguration 
configuration) {
try {
String fname = hdfsPath.substring(hdfsPath.lastIndexOf('/'));

System.out.println("fname: " + fname);

File outputDest;
try {
outputDest = Files.createTempFile(fname, ".hdfs").toFile();
} catch (Exception ex) {

ex.printStackTrace();

System.out.println("Now trying: File.createTempFile");
outputDest = File.createTempFile(fname, ".hdfs");
}

System.out.println("outputDest: " + outputDest);
 
   ...
}
},
{code}

I see ...

{code}
{12:29:50,180 INFO  [stdout]  fname: /ID-MacBook-1561976987280-0-1.opened
12:29:50,180 INFO  [stdout]  First trying: Files.createTempFile
12:29:50,189 ERROR [stderr]  java.lang.IllegalArgumentException: Invalid prefix 
or suffix
12:29:50,189 ERROR [stderr] at 
java.nio.file.TempFileHelper.generatePath(TempFileHelper.java:63)
12:29:50,190 ERROR [stderr] at 
java.nio.file.TempFileHelper.create(TempFileHelper.java:127)
12:29:50,190 ERROR [stderr] at 
java.nio.file.TempFileHelper.createTempFile(TempFileHelper.java:161)
12:29:50,190 ERROR [stderr] at 
java.nio.file.Files.createTempFile(Files.java:897)
12:29:50,190 ERROR [stderr] at 
org.apache.camel.component.hdfs2.HdfsFileType$1.getHfdsFileToTmpFile(HdfsFileType.java:147)
12:29:50,190 ERROR [stderr] at 
org.apache.camel.component.hdfs2.HdfsFileType$1.createInputStream(HdfsFileType.java:131)
12:29:50,191 ERROR [stderr] at 
org.apache.camel.component.hdfs2.HdfsInputStream.createInputStream(HdfsInputStream.java:50)
12:29:50,191 ERROR [stderr] at 
org.apache.camel.component.hdfs2.HdfsConsumer.doPoll(HdfsConsumer.java:139)
12:29:50,191 ERROR [stderr] at 
org.apache.camel.component.hdfs2.HdfsConsumer.poll(HdfsConsumer.java:97)
12:29:50,191 ERROR [stderr] at 
org.apache.camel.support.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:170)
12:29:50,191 ERROR [stderr] at 
org.apache.camel.support.ScheduledPollConsumer.run(ScheduledPollConsumer.java:97)
12:29:50,191 ERROR [stderr] at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
12:29:50,191 ERROR [stderr] at 
java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
12:29:50,192 ERROR [stderr] at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
12:29:50,192 ERROR [stderr] at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
12:29:50,192 ERROR [stderr] at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
12:29:50,192 ERROR [stderr] at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
12:29:50,192 ERROR [stderr] at java.lang.Thread.run(Thread.java:748)
12:29:50,192 INFO  [stdout]  Now trying: File.createTempFile
12:29:50,193 INFO  [stdout]  outputDest: 
/var/folders/11/lsh29g8s2msbx_sv1j2zzg5cgn/T/ID-MacBook-1561976987280-0-1.opened3105164072945824679.hdfs
}



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


[jira] [Commented] (CAMEL-13710) Camel kafka with Spring FileStateRepository example

2019-07-01 Thread Ramu (JIRA)


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

Ramu commented on CAMEL-13710:
--

[~davsclaus] sure ,I will add details in readme file

> Camel kafka with Spring FileStateRepository example
> ---
>
> Key: CAMEL-13710
> URL: https://issues.apache.org/jira/browse/CAMEL-13710
> Project: Camel
>  Issue Type: Task
>  Components: camel-kafka
>Affects Versions: 3.x
>Reporter: Ramu
>Assignee: Ramu
>Priority: Major
>  Labels: examples
>
> Provide an example to write offset,partition to a file using 
> 'offsetRepository'  



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


[jira] [Updated] (CAMEL-13710) Camel kafka with Spring FileStateRepository example

2019-07-01 Thread Ramu (JIRA)


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

Ramu updated CAMEL-13710:
-
Affects Version/s: 3.x

> Camel kafka with Spring FileStateRepository example
> ---
>
> Key: CAMEL-13710
> URL: https://issues.apache.org/jira/browse/CAMEL-13710
> Project: Camel
>  Issue Type: Task
>  Components: camel-kafka
>Affects Versions: 3.x
>Reporter: Ramu
>Assignee: Ramu
>Priority: Major
>  Labels: examples
>
> Provide an example to write offset,partition to a file using 
> 'offsetRepository'  



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


[jira] [Commented] (CAMEL-13710) Camel kafka with Spring FileStateRepository example

2019-07-01 Thread Claus Ibsen (JIRA)


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

Claus Ibsen commented on CAMEL-13710:
-

Looks good, and add details in the readme file about this offset repository and 
how it works in principle.

> Camel kafka with Spring FileStateRepository example
> ---
>
> Key: CAMEL-13710
> URL: https://issues.apache.org/jira/browse/CAMEL-13710
> Project: Camel
>  Issue Type: Task
>  Components: camel-kafka
>Reporter: Ramu
>Assignee: Ramu
>Priority: Major
>  Labels: examples
>
> Provide an example to write offset,partition to a file using 
> 'offsetRepository'  



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


[jira] [Assigned] (CAMEL-13710) Camel kafka with Spring FileStateRepository example

2019-07-01 Thread Ramu (JIRA)


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

Ramu reassigned CAMEL-13710:


Assignee: Ramu

> Camel kafka with Spring FileStateRepository example
> ---
>
> Key: CAMEL-13710
> URL: https://issues.apache.org/jira/browse/CAMEL-13710
> Project: Camel
>  Issue Type: Task
>  Components: camel-kafka
>Reporter: Ramu
>Assignee: Ramu
>Priority: Major
>  Labels: examples
>
> Provide an example to write offset,partition to a file using 
> 'offsetRepository'  



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


[jira] [Created] (CAMEL-13710) Camel kafka with Spring FileStateRepository example

2019-07-01 Thread Ramu (JIRA)
Ramu created CAMEL-13710:


 Summary: Camel kafka with Spring FileStateRepository example
 Key: CAMEL-13710
 URL: https://issues.apache.org/jira/browse/CAMEL-13710
 Project: Camel
  Issue Type: Task
  Components: camel-kafka
Reporter: Ramu


Provide an example to write offset,partition to a file using 'offsetRepository' 
 



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


[jira] [Created] (CAMEL-13709) Properties component - Optimise to not call loadProperties to frequently

2019-07-01 Thread Claus Ibsen (JIRA)
Claus Ibsen created CAMEL-13709:
---

 Summary: Properties component - Optimise to not call 
loadProperties to frequently
 Key: CAMEL-13709
 URL: https://issues.apache.org/jira/browse/CAMEL-13709
 Project: Camel
  Issue Type: Improvement
  Components: camel-core
Reporter: Claus Ibsen
 Fix For: 3.0.0


The camel-properties calls loadProperties to load all the properties. But it 
tend to do this for each parseUri for custom PropertiesSource and other means 
which can be optimised.

The cache is based on properties location only.



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


[jira] [Created] (CAMEL-13708) PropertiesSource to resolve a single property

2019-07-01 Thread Luca Burgazzoli (JIRA)
Luca Burgazzoli created CAMEL-13708:
---

 Summary: PropertiesSource to resolve a single property
 Key: CAMEL-13708
 URL: https://issues.apache.org/jira/browse/CAMEL-13708
 Project: Camel
  Issue Type: Improvement
  Components: camel-core
Reporter: Luca Burgazzoli
 Fix For: 3.0.0


CAMEL-13705 introduces support for property sources such as MP Config and 
others and at the moment it does require to load all the properties upfront on 
source initialization.

It would be nice to have an additional method to resolve a single property as 
some back-and may perform some I/O to resolve properties and get alll of them 
could be expensive.

So the properties component should:

- leverage PropertiesSource::loadPropertiers() when is is required to know all 
the properties (i.e. when auto configure components in camel main)
- leverage a new PropertiesSource::resolveProperty(String) when it just need to 
resolve a single property




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


[jira] [Created] (CAMEL-13707) Query string issues

2019-07-01 Thread Eloy Coto (JIRA)
Eloy Coto created CAMEL-13707:
-

 Summary: Query string issues
 Key: CAMEL-13707
 URL: https://issues.apache.org/jira/browse/CAMEL-13707
 Project: Camel
  Issue Type: Bug
Reporter: Eloy Coto


Test environment:

 

[https://github.com/zregvart/camel-netty-proxy]

running the readme, all ok,

 

running the following command, no connection and the following error message: 
{code:java}

$ http_proxy=http://localhost:8080 curl -v "http://neverssl.co?user=123m; * 
Uses proxy env variable http_proxy == 'http://localhost:8080' * Trying ::1... * 
TCP_NODELAY set * Connected to localhost (::1) port 8080 (#0) > GET 
http://neverssl.co/?user=123m HTTP/1.1 > Host: neverssl.co > User-Agent: 
curl/7.64.0 > Accept: */* > Proxy-Connection: Keep-Alive > ^C {code}

Log output:
{code:java}
2019-07-01 08:23:55 [Camel Thread #11 - NettyClientTCPWorker] WARN 
i.n.util.concurrent.DefaultPromise - An exception was thrown by 
org.apache.camel.component.netty4.NettyProducer$ChannelConnectedListener.operationComplete()
 io.netty.util.IllegalReferenceCountException: refCnt: 0, decrement: 1 at 
io.netty.util.internal.ReferenceCountUpdater.toLiveRealRefCnt(ReferenceCountUpdater.java:74)
 at 
io.netty.util.internal.ReferenceCountUpdater.release(ReferenceCountUpdater.java:138)
 at 
io.netty.buffer.AbstractReferenceCountedByteBuf.release(AbstractReferenceCountedByteBuf.java:100)
 at 
io.netty.handler.codec.http.HttpObjectAggregator$AggregatedFullHttpMessage.release(HttpObjectAggregator.java:386)
 at io.netty.util.ReferenceCountUtil.release(ReferenceCountUtil.java:88) at 
org.apache.camel.component.netty4.NettyProducer$BodyReleaseCallback.done(NettyProducer.java:663)
 at 
org.apache.camel.component.netty4.NettyProducer$ChannelConnectedListener.operationComplete(NettyProducer.java:631)
 at 
org.apache.camel.component.netty4.NettyProducer$ChannelConnectedListener.operationComplete(NettyProducer.java:612)
 at 
io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:502)
 at 
io.netty.util.concurrent.DefaultPromise.notifyListeners0(DefaultPromise.java:495)
 at 
io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:474)
 at 
io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:415)
 at io.netty.util.concurrent.DefaultPromise.setValue0(DefaultPromise.java:540) 
at io.netty.util.concurrent.DefaultPromise.setFailure0(DefaultPromise.java:533) 
at io.netty.util.concurrent.DefaultPromise.setFailure(DefaultPromise.java:106) 
at 
io.netty.channel.DefaultChannelPromise.setFailure(DefaultChannelPromise.java:89)
 at io.netty.bootstrap.Bootstrap.doResolveAndConnect0(Bootstrap.java:216) at 
io.netty.bootstrap.Bootstrap.access$000(Bootstrap.java:49) at 
io.netty.bootstrap.Bootstrap$1.operationComplete(Bootstrap.java:188) at 
io.netty.bootstrap.Bootstrap$1.operationComplete(Bootstrap.java:174) at 
io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:502)
 at 
io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:476)
 at 
io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:415)
 at io.netty.util.concurrent.DefaultPromise.setValue0(DefaultPromise.java:540) 
at io.netty.util.concurrent.DefaultPromise.setSuccess0(DefaultPromise.java:529) 
at io.netty.util.concurrent.DefaultPromise.trySuccess(DefaultPromise.java:101) 
at 
io.netty.channel.DefaultChannelPromise.trySuccess(DefaultChannelPromise.java:84)
 at 
io.netty.channel.AbstractChannel$AbstractUnsafe.safeSetSuccess(AbstractChannel.java:1009)
 at 
io.netty.channel.AbstractChannel$AbstractUnsafe.register0(AbstractChannel.java:517)
 at 
io.netty.channel.AbstractChannel$AbstractUnsafe.access$200(AbstractChannel.java:428)
 at 
io.netty.channel.AbstractChannel$AbstractUnsafe$1.run(AbstractChannel.java:487) 
at 
io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163)
 at 
io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:405)
 at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:500) at 
io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:906)
 at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) 
at java.lang.Thread.run(Thread.java:748){code}
 



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


[jira] [Updated] (CAMEL-13706) Allow conditional exception propagation to parent RouteBuilders from DefaultErrorHandler

2019-07-01 Thread JIRA


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

Stig Rohde Døssing updated CAMEL-13706:
---
Description: 
Exception propagation between RouteBuilders is currently only possible with the 
NoErrorHandler. It would be great if the DefaultErrorHandler could be 
configured to propagate exceptions it is not configured to handle. This would 
allow more Java-like exception handling for pipelines that cross RouteBuilders.

Basically the behavior I'd like from the DefaultErrorHandler is that exceptions 
thrown from a route that are not handled, and exceptions thrown from 
onException clauses, are handled the same way they would if the NoErrorHandler 
were configured. This would cause them to propagate to handlers in the parent.

An example of how this could look:
{code:java}
class RestRouteBuilder extends RouteBuilder {
  onException(Exception.class)
.handled(true)
.process(return a 500-series code)

  onException(JsonProcessingException.class)
.handled(true)
.process(return a 400-series code)

   from(rest)
 .choice()
   .when(the request is type A)
 .to(type A route)
   .otherwise()
 .to(type B route)
}

class TypeARouteBuilder extends RouteBuilder {
   setErrorHandlerBuilder(defaultErrorHandler().propagateUncaughtExceptions());

  onException(SomeRouteSpecificException.class)
 .handled(true)
 //Any exception thrown here is propagated to the RestRouteBuilder's 
onException clauses

  from(type A route)
 //SomeRouteSpecificException gets handled by the onException clause above
 //Anything else is propagated to the RestRouteBuilder's onException clauses
.to(write to DB route)
}

class TypeBRouteBuilder extends RouteBuilder {

  setErrorHandlerBuilder(defaultErrorHandler().propagateUncaughtExceptions());
  
  onException(SomeOtherRouteSpecificException.class)
 .handled(true)
  //Any exception thrown here is propagated to the RestRouteBuilder's 
onException clauses

  from(type B route)
 //SomeOtherRouteSpecificException gets handled by the onException clause 
above
 //Anything else is propagated to the RestRouteBuilder's onException clauses
.to(write to DB route)
}

class DBRouteBuilder extends RouteBuilder {
  setErrorHandlerBuilder(defaultErrorHandler().propagateUncaughtExceptions());

  onException(AuthenticationException.class)
 .redeliveryPolicy(new RedeliveryPolicy().maximumRedeliveries(10))

  from(type A route)
 //AuthenticationException gets handled by the onException clause above
 //Anything else is propagated to either TypeA or TypeB onException 
clauses, and possibly on to RestRouteBuilder's clauses
.to(the DB endpoint)
}
{code}
I'd be happy to work on implementing this option, assuming there isn't 
opposition to creating a feature like this.

  was:
Exception propagation between RouteBuilders is currently only possible with the 
NoErrorHandler. It would be great if the DefaultErrorHandler could be 
configured to propagate exceptions it is not configured to handle. This would 
allow more Java-like exception handling for pipelines that cross RouteBuilders.

Basically the behavior I'd like from the DefaultErrorHandler is that exceptions 
thrown from a route that are not handled, and exceptions thrown from 
onException clauses, are handled the same way they would if the NoErrorHandler 
were configured. This would cause them to propagate to handlers in the parent.

An example of how this could look:

{code}
class RestRouteBuilder extends RouteBuilder {
  onException(Exception.class)
.handled(true)
.process(return a 500-series code)

  onException(JsonProcessingException.class)
.handled(true)
.process(return a 400-series code)

   from(rest)
 .choice()
   .when(the request is type A)
 .to(type A route)
   .otherwise()
 .to(type B route)
}

class TypeARouteBuilder extends RouteBuilder {
   setErrorHandlerBuilder(defaultErrorHandler().propagateUnknownExceptions());

  onException(SomeRouteSpecificException.class)
 .handled(true)
 //Any exception thrown here is propagated to the RestRouteBuilder's 
onException clauses

  from(type A route)
 //SomeRouteSpecificException gets handled by the onException clause above
 //Anything else is propagated to the RestRouteBuilder's onException clauses
.to(write to DB route)
}

class TypeBRouteBuilder extends RouteBuilder {

  setErrorHandlerBuilder(defaultErrorHandler().propagateUnknownExceptions());
  
  onException(SomeOtherRouteSpecificException.class)
 .handled(true)
  //Any exception thrown here is propagated to the RestRouteBuilder's 
onException clauses

  from(type B route)
 //SomeOtherRouteSpecificException gets handled by the onException clause 
above
 //Anything else is propagated to the RestRouteBuilder's onException clauses
.to(write to DB route)
}

class 

[jira] [Created] (CAMEL-13706) Allow conditional exception propagation to parent RouteBuilders from DefaultErrorHandler

2019-07-01 Thread JIRA
Stig Rohde Døssing created CAMEL-13706:
--

 Summary: Allow conditional exception propagation to parent 
RouteBuilders from DefaultErrorHandler
 Key: CAMEL-13706
 URL: https://issues.apache.org/jira/browse/CAMEL-13706
 Project: Camel
  Issue Type: New Feature
Reporter: Stig Rohde Døssing


Exception propagation between RouteBuilders is currently only possible with the 
NoErrorHandler. It would be great if the DefaultErrorHandler could be 
configured to propagate exceptions it is not configured to handle. This would 
allow more Java-like exception handling for pipelines that cross RouteBuilders.

Basically the behavior I'd like from the DefaultErrorHandler is that exceptions 
thrown from a route that are not handled, and exceptions thrown from 
onException clauses, are handled the same way they would if the NoErrorHandler 
were configured. This would cause them to propagate to handlers in the parent.

An example of how this could look:

{code}
class RestRouteBuilder extends RouteBuilder {
  onException(Exception.class)
.handled(true)
.process(return a 500-series code)

  onException(JsonProcessingException.class)
.handled(true)
.process(return a 400-series code)

   from(rest)
 .choice()
   .when(the request is type A)
 .to(type A route)
   .otherwise()
 .to(type B route)
}

class TypeARouteBuilder extends RouteBuilder {
   setErrorHandlerBuilder(defaultErrorHandler().propagateUnknownExceptions());

  onException(SomeRouteSpecificException.class)
 .handled(true)
 //Any exception thrown here is propagated to the RestRouteBuilder's 
onException clauses

  from(type A route)
 //SomeRouteSpecificException gets handled by the onException clause above
 //Anything else is propagated to the RestRouteBuilder's onException clauses
.to(write to DB route)
}

class TypeBRouteBuilder extends RouteBuilder {

  setErrorHandlerBuilder(defaultErrorHandler().propagateUnknownExceptions());
  
  onException(SomeOtherRouteSpecificException.class)
 .handled(true)
  //Any exception thrown here is propagated to the RestRouteBuilder's 
onException clauses

  from(type B route)
 //SomeOtherRouteSpecificException gets handled by the onException clause 
above
 //Anything else is propagated to the RestRouteBuilder's onException clauses
.to(write to DB route)
}

class DBRouteBuilder extends RouteBuilder {
  setErrorHandlerBuilder(defaultErrorHandler().propagateUnknownExceptions());

  onException(AuthenticationException.class)
 .redeliveryPolicy(new RedeliveryPolicy().maximumRedeliveries(10))

  from(type A route)
 //AuthenticationException gets handled by the onException clause above
 //Anything else is propagated to either TypeA or TypeB onException 
clauses, and possibly on to RestRouteBuilder's clauses
.to(the DB endpoint)
}
{code}

I'd be happy to work on implementing this option, assuming there isn't 
opposition to creating a feature like this.



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


[jira] [Created] (CAMEL-13705) Properties component should work with Eclipse MicroProfile Config

2019-07-01 Thread Claus Ibsen (JIRA)
Claus Ibsen created CAMEL-13705:
---

 Summary: Properties component should work with Eclipse 
MicroProfile Config
 Key: CAMEL-13705
 URL: https://issues.apache.org/jira/browse/CAMEL-13705
 Project: Camel
  Issue Type: New Feature
Reporter: Claus Ibsen
Assignee: Claus Ibsen
 Fix For: 3.0.0, 3.0.0.M4


We should integrate with MP Config so you can build MP apps and have Camel's 
properties component use their properties.

We should allow to auto-detect this if eg a camel-microprofile-config is on the 
classpath and then setup this bridge automatic.





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


[jira] [Commented] (CAMEL-13704) Add github pull request template for PR instruction

2019-07-01 Thread Claus Ibsen (JIRA)


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

Claus Ibsen commented on CAMEL-13704:
-

Yeah sounds good to me too

I would also refer people to our contribution guideline at
https://github.com/apache/camel/blob/master/CONTRIBUTING.md

> Add github pull request template for PR instruction
> ---
>
> Key: CAMEL-13704
> URL: https://issues.apache.org/jira/browse/CAMEL-13704
> Project: Camel
>  Issue Type: Task
>Reporter: Willem Jiang
>Priority: Major
>
> It's standard procedure to accept the big contribution with iCLA granted in 
> ASF.
> We should list this information when the contributor send the PR by 
> specifying a PR template for github.  It could be annoying for the 
> experienced contributors, but it could save us some time for the new 
> contributors. 
> Here is a draft I have, please add comment for it.
> {code}
>  - [ ] Make sure there is a [JIRA 
> issue](https://issues.apache.org/jira/browse/CAMEL) filed for the change 
> (usually before you start working on it).  Trivial changes like typos do not 
> require a JIRA issue.  Your pull request should address just this issue, 
> without pulling in other changes.
>  - [ ] Each commit in the pull request should have a meaningful subject line 
> and body.
>  - [ ] Format the pull request title like `[CAMEL-XXX] Fixes bug in 
> camel-file component`, where you replace `CAMEL-XXX` with the appropriate 
> JIRA issue.
>  - [ ] Write a pull request description that is detailed enough to understand 
> what the pull request does, how, and why.
>  - [ ] Run `mvn clean install` in your module to make sure basic checks pass. 
> A more thorough check will be performed on your pull request automatically.
>  - [ ] If this contribution is large, please file an Apache [Individual 
> Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
> {code}



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


[jira] [Comment Edited] (CAMEL-13704) Add github pull request template for PR instruction

2019-07-01 Thread Luca Burgazzoli (JIRA)


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

Luca Burgazzoli edited comment on CAMEL-13704 at 7/1/19 7:11 AM:
-

A commend about "Make sure there is a [JIRA issue]" : I would rework it as for 
camel-k and camel-quarkus we have activated github issues so a JIRA issue is 
not required (the subsequent requirement need to be amended as well)


was (Author: lb):
A commend about "Make sure there is a [JIRA issue]" : I would rework it as for 
camel-k and camel-quarkus we have activated github issues so a JIRA issue is 
not required

> Add github pull request template for PR instruction
> ---
>
> Key: CAMEL-13704
> URL: https://issues.apache.org/jira/browse/CAMEL-13704
> Project: Camel
>  Issue Type: Task
>Reporter: Willem Jiang
>Priority: Major
>
> It's standard procedure to accept the big contribution with iCLA granted in 
> ASF.
> We should list this information when the contributor send the PR by 
> specifying a PR template for github.  It could be annoying for the 
> experienced contributors, but it could save us some time for the new 
> contributors. 
> Here is a draft I have, please add comment for it.
> {code}
>  - [ ] Make sure there is a [JIRA 
> issue](https://issues.apache.org/jira/browse/CAMEL) filed for the change 
> (usually before you start working on it).  Trivial changes like typos do not 
> require a JIRA issue.  Your pull request should address just this issue, 
> without pulling in other changes.
>  - [ ] Each commit in the pull request should have a meaningful subject line 
> and body.
>  - [ ] Format the pull request title like `[CAMEL-XXX] Fixes bug in 
> camel-file component`, where you replace `CAMEL-XXX` with the appropriate 
> JIRA issue.
>  - [ ] Write a pull request description that is detailed enough to understand 
> what the pull request does, how, and why.
>  - [ ] Run `mvn clean install` in your module to make sure basic checks pass. 
> A more thorough check will be performed on your pull request automatically.
>  - [ ] If this contribution is large, please file an Apache [Individual 
> Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
> {code}



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


[jira] [Commented] (CAMEL-13704) Add github pull request template for PR instruction

2019-07-01 Thread Andrea Cosentino (JIRA)


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

Andrea Cosentino commented on CAMEL-13704:
--

thanks [~njiang] that sound great. [~davsclaus] does this sound good for you 
too? We can apply this to camel, camel-k, camel-quarkus.

> Add github pull request template for PR instruction
> ---
>
> Key: CAMEL-13704
> URL: https://issues.apache.org/jira/browse/CAMEL-13704
> Project: Camel
>  Issue Type: Task
>Reporter: Willem Jiang
>Priority: Major
>
> It's standard procedure to accept the big contribution with iCLA granted in 
> ASF.
> We should list this information when the contributor send the PR by 
> specifying a PR template for github.  It could be annoying for the 
> experienced contributors, but it could save us some time for the new 
> contributors. 
> Here is a draft I have, please add comment for it.
> {code}
>  - [ ] Make sure there is a [JIRA 
> issue](https://issues.apache.org/jira/browse/CAMEL) filed for the change 
> (usually before you start working on it).  Trivial changes like typos do not 
> require a JIRA issue.  Your pull request should address just this issue, 
> without pulling in other changes.
>  - [ ] Each commit in the pull request should have a meaningful subject line 
> and body.
>  - [ ] Format the pull request title like `[CAMEL-XXX] Fixes bug in 
> camel-file component`, where you replace `CAMEL-XXX` with the appropriate 
> JIRA issue.
>  - [ ] Write a pull request description that is detailed enough to understand 
> what the pull request does, how, and why.
>  - [ ] Run `mvn clean install` in your module to make sure basic checks pass. 
> A more thorough check will be performed on your pull request automatically.
>  - [ ] If this contribution is large, please file an Apache [Individual 
> Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
> {code}



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


[jira] [Commented] (CAMEL-13704) Add github pull request template for PR instruction

2019-07-01 Thread Willem Jiang (JIRA)


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

Willem Jiang commented on CAMEL-13704:
--

[~acosentino] Actually we can do it by committing the file into .github 
directory.

> Add github pull request template for PR instruction
> ---
>
> Key: CAMEL-13704
> URL: https://issues.apache.org/jira/browse/CAMEL-13704
> Project: Camel
>  Issue Type: Task
>Reporter: Willem Jiang
>Priority: Major
>
> It's standard procedure to accept the big contribution with iCLA granted in 
> ASF.
> We should list this information when the contributor send the PR by 
> specifying a PR template for github.  It could be annoying for the 
> experienced contributors, but it could save us some time for the new 
> contributors. 
> Here is a draft I have, please add comment for it.
> {code}
>  - [ ] Make sure there is a [JIRA 
> issue](https://issues.apache.org/jira/browse/CAMEL) filed for the change 
> (usually before you start working on it).  Trivial changes like typos do not 
> require a JIRA issue.  Your pull request should address just this issue, 
> without pulling in other changes.
>  - [ ] Each commit in the pull request should have a meaningful subject line 
> and body.
>  - [ ] Format the pull request title like `[CAMEL-XXX] Fixes bug in 
> camel-file component`, where you replace `CAMEL-XXX` with the appropriate 
> JIRA issue.
>  - [ ] Write a pull request description that is detailed enough to understand 
> what the pull request does, how, and why.
>  - [ ] Run `mvn clean install` in your module to make sure basic checks pass. 
> A more thorough check will be performed on your pull request automatically.
>  - [ ] If this contribution is large, please file an Apache [Individual 
> Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
> {code}



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


[jira] [Resolved] (CAMEL-13702) camel-main-maven-plugin - Only download sources JAR if really neesed

2019-07-01 Thread Claus Ibsen (JIRA)


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

Claus Ibsen resolved CAMEL-13702.
-
Resolution: Fixed

> camel-main-maven-plugin - Only download sources JAR if really neesed
> 
>
> Key: CAMEL-13702
> URL: https://issues.apache.org/jira/browse/CAMEL-13702
> Project: Camel
>  Issue Type: Improvement
>  Components: tooling
>Reporter: Claus Ibsen
>Assignee: Claus Ibsen
>Priority: Major
> Fix For: 3.0.0, 3.0.0.M4
>
>
> We can improve the logic to detect if there are new components and then only 
> if so, download sources jar if needed for options that need documentation.



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