RE: Seconds since 1970

2015-04-17 Thread Hans Orbaan
Hi,

Try java.lang.System


-Oorspronkelijk bericht-
Van: angelo.rlcosta [mailto:angelo.rlco...@gmail.com] 
Verzonden: Friday 17 April 2015 16:49
Aan: users@camel.apache.org
Onderwerp: Re: Seconds since 1970

Hi Guys,

I'm doing as you told me but i am now getting a No bean could be found in the 
registry for: java.lang:
org.apache.camel.NoSuchBea
nException: No bean could be found in the registry for: java.lang


Any idea?



--
View this message in context: 
http://camel.465427.n5.nabble.com/Seconds-since-1970-tp5765942p5765963.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel SFTP,quartz2 component gives:Cannot retrieve file :caused by GenericFileOperationFailedException,when polling multiple files from sftp

2016-04-23 Thread Hans Orbaan
Hi,

Does the issue also occur when you use a delay and not a quartz2 schedule?
If it does not occur with a delay it could be because of an already fixed 
issue: https://issues.apache.org/jira/browse/CAMEL-9752



Van: nikhilesh 
Verzonden: vrijdag 22 april 2016 21:56
Aan: users@camel.apache.org
Onderwerp: Camel SFTP,quartz2 component gives:Cannot retrieve file :caused by 
GenericFileOperationFailedException,when polling multiple files from sftp

*I'm trying to poll files from sftp location using the below camel route and
using quartz2 scheduler, after polling couple of files i'm getting a
GenricFileOpertaionFailedException caused by java.io.IOException: Pipe
closed*
JaxbDataFormat dataFormat = new JaxbDataFormat();
dataFormat.setContext(JAXBContext.newInstance(MyBean.class));
from(sftphost + sourcedirpath +   "?password=" +
password+ "&username=" + userName
+ "&include=" + filePattern  +
"&localWorkDirectory=" + localWorkingDirectory  +
"&flatten=true"  + "&delete=true"
+ "&scheduler=quartz2"  + "&scheduler.cron=0/45 * *
* * ?"   + "&stepwise=false"
+ "&disconnect=true")  .onException(Exception.class)
.to(sftphost + errdirpath + "?password=" + password + "&username=" +
userName+"&disconnect=true")  .handled(true)
.end()  .log(LoggingLevel.INFO, "Processing File :
${file:onlyname}").log(LoggingLevel.INFO, "Before Unmarshalling
XML").unmarshal(dataFormat)  .log(LoggingLevel.INFO, "after
UnMarshalling the XML").beanRef("service", "processData(${body},
${file:name})")  .to(sftphost + processedDirPAth +
"?password=" + password + "&username=" + userName+ "&disconnect=true");
*I face this issue only when I use the quartz2 Scheduler. The above camel
route works completely fine when I use the '&delay=1' parameter in the
camel route.*
Error Stacktrace:2016-04-22 10:33:15,634 | WARN  | terface_Worker-1 |
SftpConsumer]| ?
? | 264 - 1.0.0.SNAPSHOT | Error processing file
RemoteFile[/home/source/file_one.XML] due to Cannot retrieve file:
/home/source/file_one.XML. Caused by:
[org.apache.camel.component.file.GenericFileOperationFailedException -
Cannot retrieve file: /home/source/file_one.XML]
org.apache.camel.component.file.GenericFileOperationFailedException: Cannot
retrieve file: /home/source/file_one.XMLat
org.apache.camel.component.file.remote.SftpOperations.retrieveFileToFileInLocalWorkDirectory(SftpOperations.java:735)[264:myBundle:1.0.0.SNAPSHOT]
at
org.apache.camel.component.file.remote.SftpOperations.retrieveFile(SftpOperations.java:591)[264:myBundle:1.0.0.SNAPSHOT]
at
org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:396)[264:myBundle:1.0.0.SNAPSHOT]
at
org.apache.camel.component.file.remote.RemoteFileConsumer.processExchange(RemoteFileConsumer.java:137)[264:myBundle:1.0.0.SNAPSHOT]
at
org.apache.camel.component.file.GenericFileConsumer.processBatch(GenericFileConsumer.java:211)[264:myBundle:1.0.0.SNAPSHOT]
at
org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:175)[264:myBundle:1.0.0.SNAPSHOT]
at
org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:174)[264:myBundle:1.0.0.SNAPSHOT]
at
org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:101)[264:myBundle:1.0.0.SNAPSHOT]
at
org.apache.camel.pollconsumer.quartz2.QuartzScheduledPollConsumerJob.execute(QuartzScheduledPollConsumerJob.java:59)[264:myBundle:1.0.0.SNAPSHOT]
at org.quartz.core.JobRunShell.run(JobRunShell.java:202)[264:myBundle
:1.0.0.SNAPSHOT]at
org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)[264:myBundle:1.0.0.SNAPSHOT]
Caused by: 4:at
com.jcraft.jsch.ChannelSftp._get(ChannelSftp.java:1160)[264:myBundle:1.0.0.SNAPSHOT]
at
com.jcraft.jsch.ChannelSftp.get(ChannelSftp.java:1006)[264:myBundle:1.0.0.SNAPSHOT]
at com.jcraft.jsch.ChannelSftp.get(ChannelSftp.java:984)[264:myBundle
:1.0.0.SNAPSHOT]at
org.apache.camel.component.file.remote.SftpOperations.retrieveFileToFileInLocalWorkDirectory(SftpOperations.java:724)[264:myBundle:1.0.0.SNAPSHOT]
... 10 moreCaused by: java.io.IOException: Pipe closedat
java.io.PipedInputStream.read(PipedInputStream.java:307)[:1.8.0_45]
at java.io.PipedInputStream.read(PipedInputStream.java:377)[:1.8.0_45]
at
com.jcraft.jsch.ChannelSftp.fill(ChannelSftp.java:2882)[264:myBundle:1.0.0.SNAPSHOT]
at
com.jcraft.jsch.ChannelSftp.header(ChannelSftp.java:2908)[264:myBundle:1.0.0.SNAPSHOT]
at
com.jcraft.jsch.ChannelSftp._get(ChannelSftp.java:1025)[264:myBundle:1.0.0.SNAPSHOT]
... 13 moreI have not used any other IO streams which are to be closed in
the camel route. Help is much Appreciated, Thanks.




RE: Manually trigger a scheduled route for testing

2016-05-20 Thread Hans Orbaan
HI,

Using a direct and not a quartz schedule just for testing is your best option.
You could however use this to kick of a route that uses a quartz schedule: 
ftp://bla?cron.scheduler=quartz2
I could however not configure a triggerId on a quartz2:// route (did also not 
look too thoroughly I must admit), so that might not work, and I do not know if 
it works during testing.
But this is how you would kick off a scheduler:

{code}

import org.quartz.JobKey;
import org.quartz.Scheduler;
import org.quartz.Trigger;
import org.quartz.TriggerKey;

private String trigger(Exchange exchange, String triggerId) {
try {
TriggerKey triggerKey = new TriggerKey(triggerId, 
"QuartzScheduledPollConsumerScheduler");
Trigger trigger = this.getTrigger(exchange, triggerKey);
JobKey jobKey = trigger.getJobKey();
this.scheduler.triggerJob(jobKey);
LOGGER.warn("Manually executed trigger: " + triggerId);
} catch (Exception e) {
LOGGER.error("Could not manually executed trigger: " + triggerId);
return "FAIL";
}
return "OK";
}

private Trigger getTrigger(Exchange exchange, TriggerKey triggerKey) throws 
Exception {
try {
Trigger result = this.getScheduler(exchange).getTrigger(triggerKey);
if (null != result) {
return result;
}
} catch (Exception e) {
throw new ConfigurationException("Could not find trigger: " + 
triggerKey.getName(), e);
}
throw new ConfigurationException("Could not find trigger: " + 
triggerKey.getName());
}

private Scheduler getScheduler(Exchange exchange) {
if (null == this.scheduler) {
QuartzComponent quartz = 
exchange.getContext().getComponent("quartz2", QuartzComponent.class);
this.scheduler = quartz.getScheduler();
}
return this.scheduler;
}
{code}



Met vriendelijke groet,
Docdata Commerce B.V.
Hans Orbaan
Developer
Docdata Commerce
Energieweg 2
5145 NW Waalwijk
t
+31 (0)416 - 674 169
m
+31 (0)6 - 469 543 23
 
 
e
hans.orb...@docdata.eu
i
www.docdata.nl
Docdata Commerce B.V. is part of DOCDATA N.V., listed at the NYSE Euronext 
Amsterdam (ticker symbol DOCD).
All information contained within this e-mail, including any attachments, is 
confidential. If you have received this e-mail in error, please delete it 
immediately and remove the attachments from your system. Do not use, disclose 
or spread the information in any way and notify the sender immediately. Any 
views and opinions expressed in this e-mail may not represent those of Docdata.

-Oorspronkelijk bericht-
Van: henricao [mailto:henrique.li...@outlook.com] 
Verzonden: Friday 20 May 2016 12:11
Aan: users@camel.apache.org
Onderwerp: Re: Manually trigger a scheduled route for testing

Hi Claus,

  First of all, thanks for the response.

  I'm afraid the advice option won't work for me, since the original from part 
is part of the scope of my test.  And to clarify, it is not really a unit test, 
but more of a integration test.

  The property place holder however works for me and I started using a similar 
approach before your answer (concatenating the cron expression instead of a 
proper placeholder, but the same principle).

  Ideally, my idea was to have something like this:

  from("direct: realroute").from("fille...").to("sftp:...") 

  from("quartz2:...").to("direct: realroute") //the real scheduled route used 
in production

  from("http:...").to("direct: realroute") // a http entrypoint that you could 
trigger from the test or manually runs

  I googled about this and couldn't find any evidence that this could work.
It seems that: 
  - the file component has a internal scheduler than can be disabled
  - I can't have a route with two from parts (like the real route above)

  Are these assumptions correct?

  I will use the property placeholder solution if I can't implement this idea, 
but I can see this last approach providing some extra benefits that I really 
would like to have.

Thanks again for the support,
Henrique

  



--
View this message in context: 
http://camel.465427.n5.nabble.com/Manually-trigger-a-scheduled-route-for-testing-tp5782791p5782822.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Error in smtp/mail documentation

2016-05-24 Thread Hans Orbaan
Hi all,

The documentation at http://camel.apache.org/mail.html sais multiple addresses 
in the TO need to be separated by a comma ( , ). It seems that it needs to be a 
semi colon ( ; ).
Is there anyone who can check and fix that documentation? I guess this also 
applies to other address lists like cc and bcc

With kind regards,

Hans Orbaan


RE: File Consumer Exchange

2016-06-02 Thread Hans Orbaan
Hi,

You can use the "no operation" functionality. See noop=true @ 
http://camel.apache.org/file2.html


-Oorspronkelijk bericht-
Van: bwest [mailto:bwesterfi...@gmail.com] 
Verzonden: Friday 3 June 2016 1:19
Aan: users@camel.apache.org
Onderwerp: File Consumer Exchange

Can I ignore an exchange that's been picked up by a file consumer?  In other 
words, I don't want the file to be moved or deleted.  I'd like to remain in the 
directory for other subsequent polls.  

Thanks!





--
View this message in context: 
http://camel.465427.n5.nabble.com/File-Consumer-Exchange-tp5783404.html
Sent from the Camel - Users mailing list archive at Nabble.com.


RE: Problem transfer from SMB to FTP OutMemory Java Heap Space

2016-06-03 Thread Hans Orbaan
Hi,

You should mount your share and use the file:// component to avoid out of 
memory errors. There is something wrong with camel-jcifs. It will go out of 
memory (threads I guess, not memory, but system resources) will retrieving a 
file.
This already happens from 5 MB or more we found. Could not really locate the 
issue though.

With kind regards,

Hans Orbaan


-Oorspronkelijk bericht-
Van: Pontus Ullgren [mailto:ullg...@gmail.com] 
Verzonden: Friday 3 June 2016 13:15
Aan: users@camel.apache.org
Onderwerp: Re: Problem transfer from SMB to FTP OutMemory Java Heap Space

localWorkDirectory is a directory on the server where your camel route run (in 
Fuse as you say),

localWorkDirectory is also supported in camel-jcifs ( 
http://camel.apache.org/jcifs.html).


// Pontus

On Fri, 3 Jun 2016 at 08:12 Daniel Pompa  wrote:

> Hi Pontus, sorry Im new in Fuse. The Camel version is 2.12.0
>
> how I can defined the heap size to the Java Process?
>
> I add localWorkDirectory into the URI, but fail again, this 
> localWorkDirectory is a directory in Fuse or in the smb server? I put 
> in the localWorkDirectory  in smb.
>
> I saw localWorkDirectory is just for FTP.
>
> Thanks.
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Problem-transfer-from-SMB-to-FTP-Out
> Memory-Java-Heap-Space-tp5783383p5783388.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>


RE: FileFilter to error queue

2016-06-15 Thread Hans Orbaan
Hi,

You could not filter and then use a bean to throw an exception if they need to 
move to failed.

-Oorspronkelijk bericht-
Van: redpower1989 [mailto:redpower1...@hotmail.com] 
Verzonden: Wednesday 15 June 2016 16:02
Aan: users@camel.apache.org
Onderwerp: FileFilter to error queue

Hello

According to  http://camel.apache.org/file2   

I can use GenericFileFilter to either accept file with some conditions when 
filter returns true or false reject them?

Is there any way to move those files to error queue?

Thanks



--
View this message in context: 
http://camel.465427.n5.nabble.com/FileFilter-to-error-queue-tp5784091.html
Sent from the Camel - Users mailing list archive at Nabble.com.


failing move to processed, processing over and over again

2016-06-29 Thread Hans Orbaan
Hi All,

When a file has been processed correctly, it can be moved to a processed folder 
(?move=processed). If this move fails, files will be processed over and over 
again. Is there something that can be done about this?
A solution in Camel could be to automatically start using the idempotent 
repository so they won't be processed as many times.

Does anyone have a workable solution to prevent processing over and over again 
which can be used with current versions? Any solution that is feasible for 
future releases?

Thanks for any help!!1

With kind regards,

Hans Orbaan


RE: failing move to processed, processing over and over again

2016-06-29 Thread Hans Orbaan
Hi,

I did not see Camel trying to move the files to the failed folder when a move 
to the processed folder has failed. Of course I could move them myself/manually 
but we had sudden permission issues on those folders at night when no one was 
looking.

Also I think our error handler did not get triggered. We do have one and it did 
not notify anyone. 
But like I said... the route finished successfully just the move to processed 
did not.

Thanks!



-Oorspronkelijk bericht-
Van: Claus Ibsen [mailto:claus.ib...@gmail.com] 
Verzonden: Wednesday 29 June 2016 12:01
Aan: users@camel.apache.org
Onderwerp: Re: failing move to processed, processing over and over again

You can move the failed files to an error folder. But you need to think 
generally about error handling and how you want to deal with that.



On Wed, Jun 29, 2016 at 11:43 AM, Hans Orbaan  wrote:
> Hi All,
>
> When a file has been processed correctly, it can be moved to a processed 
> folder (?move=processed). If this move fails, files will be processed over 
> and over again. Is there something that can be done about this?
> A solution in Camel could be to automatically start using the idempotent 
> repository so they won't be processed as many times.
>
> Does anyone have a workable solution to prevent processing over and over 
> again which can be used with current versions? Any solution that is feasible 
> for future releases?
>
> Thanks for any help!!1
>
> With kind regards,
>
> Hans Orbaan



--
Claus Ibsen
-
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2


Re: FTP Consumer Issue - File operation failed: 227

2016-07-24 Thread Hans Orbaan
Did you try disconnect=true?

Op 24 jul. 2016 1:16 p.m. schreef Michele :
Hi everyone,

I have these routes (Read several file from FTP folder and process each of
them)


   ftp://username@host?password=x&readLock=changed&delete=true&&passiveMode=true";
/>
   



   

   


After several successful processing, I see in log this exception:
org.apache.camel.component.file.GenericFileOperationFailedException: File
operation failed: 227 Entering Passive Mode Too many open files (Attacched
log file log.txt 
)

Any idea?

Thanks in advance

Best Regards

Michele



--
View this message in context: 
http://camel.465427.n5.nabble.com/FTP-Consumer-Issue-File-operation-failed-227-tp5785356.html
Sent from the Camel - Users mailing list archive at Nabble.com.



Re: PollEnrich with file language

2016-09-08 Thread Hans Orbaan
Hi,


Can you try 
$simple{file:onlyname.noext}_$simple{date:now:yyyMMddHHmmssSSS}.$simple{file:name.ext}.
 Not sure if it will work though.


With kind regards,


Hans Orbaan



Van: souciance 
Verzonden: donderdag 8 september 2016 20:16
Aan: users@camel.apache.org
Onderwerp: PollEnrich with file language

Hi,

Does pollEnrich work properly with the file language?

I have written a simple statement that moves the file after polling and adds
a timestamp to the file. However the output is that it creates a folder with
the timestamp name and ignores the filename and file extension.
This is my statement..

.pollEnrich("...&move=importArchive/${file:name.noext}-${date:now:MMddHHmmssSSS}.${file:ext}")

Instead it creates a folder inside importArchive with the name based on
-${date:now:MMddHHmmssSSS}

Best
Souciance



--
View this message in context: 
http://camel.465427.n5.nabble.com/PollEnrich-with-file-language-tp5787380.html
Camel - Users - PollEnrich with file 
language<http://camel.465427.n5.nabble.com/PollEnrich-with-file-language-tp5787380.html>
camel.465427.n5.nabble.com
PollEnrich with file language. Hi, Does pollEnrich work properly with the file 
language? I have written a simple statement that moves the file after polling 
and adds a timestamp to the file



Sent from the Camel - Users mailing list archive at Nabble.com.


Re: PollEnrich with file language

2016-09-09 Thread Hans Orbaan
What os are you using? Your test worked Fine on windows

Op 9 sep. 2016 3:12 p.m. schreef souciance :
The strange thing is, it does not matter what expression I use, anything
after &move= turns into a folder. I think pollEnrich with dynamic endpoints
has an issue with move.

Basically this fails:

pollEnrich().simple("file:" + folder +
"?fileName=${header.File}&charset=iso-8859-1&move=archive/${file:name.noext}-${date:now:MMddHHmmssSSS}.${file:ext}")

It simply creates a folder with the timestamp name and ignores the File
expressions.

My workaround was to use a Processor and a ConsumerTemplate and send in the
file URI. That worked.

On Fri, Sep 9, 2016 at 11:29 AM, souciance [via Camel] <
ml-node+s465427n5787409...@n5.nabble.com> wrote:

> I am on 2.17.0 and for the life of me cannot get it to work.
>
> I am using this:
>
>.pollEnrich().simple("file:" + location + 
> "?fileName=${header.File}&charset=iso-8859-1&"
> +
> 
> "move=../archive/${file:name.noext}-${date:now:MMddHHmm}.${file:ext}")
>
>
> All it does is create the archive folder and then it seems to ignore the
> File language parts and just creates a folder with the name - and
> puts the filer there.
>
> --
> If you reply to this email, your message will be added to the discussion
> below:
> http://camel.465427.n5.nabble.com/PollEnrich-with-file-
> language-tp5787380p5787409.html
> To start a new topic under Camel - Users, email
> ml-node+s465427n465428...@n5.nabble.com
> To unsubscribe from PollEnrich with file language, click here
> 
> .
> NAML
> 
>




--
View this message in context: 
http://camel.465427.n5.nabble.com/PollEnrich-with-file-language-tp5787380p5787419.html
Sent from the Camel - Users mailing list archive at Nabble.com.



RE: Copy current file in a folder

2016-12-06 Thread Hans Orbaan
Use antInclude or implement a fileFilter

-Oorspronkelijk bericht-
Van: axdz [mailto:hoida...@gmail.com] 
Verzonden: Tuesday 6 December 2016 11:38
Aan: users@camel.apache.org
Onderwerp: Copy current file in a folder

Dear all,

I have a route from("file:D:\\folder1").to("file:D:\\folder2").
When route starts,  folder1 has 5 files (file1, file2, file3, file4, file5) 
While route is running, I copy 2 files (file6, file7) into folder1.So when 
route finishs, all files (7 files) were copied to folder2.

I only want to copy 5 file (file1, file2, file3, file4, file5) into folder2.
Please give me some advice.

Thanks,





--
View this message in context: 
http://camel.465427.n5.nabble.com/Copy-current-file-in-a-folder-tp5791093.html
Sent from the Camel - Users mailing list archive at Nabble.com.


RE: Copy current file in a folder

2016-12-08 Thread Hans Orbaan
You could try stuff like this:

Date now = new Date();
now.setHours(5);
//now.setHours(17);
long longTime = now.getTime();
return longTime >= file.getLastModified();

But you are asking basic Java questions which you could better google.

You could also try a cron.schedule on your "from" and only let your route be 
active during a certain schedule.

-Oorspronkelijk bericht-
Van: axdz [mailto:hoida...@gmail.com] 
Verzonden: Thursday 8 December 2016 4:22
Aan: users@camel.apache.org
Onderwerp: Re: Copy current file in a folder

Dear,

I tried to implement by using their timestamp.
Please tell me LastLastModified is timestamp or not?
With LastModified , I can not compare with 05:00.


public class FileFilters implements GenericFileFilter {

public boolean accept(GenericFile file) {
System.out.println(file.getFileName() + ":" + 
file.getLastModified());
return true;

}


}



--
View this message in context: 
http://camel.465427.n5.nabble.com/Copy-current-file-in-a-folder-tp5791093p5791215.html
Sent from the Camel - Users mailing list archive at Nabble.com.


RE: Camel Multicast behaving strangely - please help

2016-12-09 Thread Hans Orbaan
Can you try:
multicast(.)
.to("direct://route1")
.to("direct://route2")

-Oorspronkelijk bericht-
Van: nishat [mailto:nishat.dhil...@gmail.com] 
Verzonden: Friday 9 December 2016 15:36
Aan: users@camel.apache.org
Onderwerp: Camel Multicast behaving strangely - please help

Hello All 

i am getting as strange behavior from camel multicast. Looks like i am doing 
something wrong but cant point it. Need your help urgently. 

I a creating a multicast route to two endpoints as below:
Start point : direct://start
endpoint : direct://route1
endpoint : direct://route2

Routes info : 

1) from("direct://start").process(new DeepCloneRequest()).multicast(new
Aggregator()).to("direct://route1","direct://route2")

2) from("direct://route1").setheader().process().to("rest 
processor>url1").processor().end

3) from("direct://route2").setheader().process().to("rest 
processor>url2").processor().end

what i notice is that in my route number 3 in preprocessing i got the exchange 
out of number 2 preprocessing instead of DeepCloneRequest from nulticast. 

Can someone please help explain this? I want to get same request that multicast 
receive in both route 2 and 3.




--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-Multicast-behaving-strangely-please-help-tp5791319.html
Sent from the Camel - Users mailing list archive at Nabble.com.


RE: SFTP Multiple Files Using Camel

2017-01-22 Thread Hans Orbaan
Hi,

This might help (in Java):

from(file://)
.threads(10)
.to(SFTP);


-Oorspronkelijk bericht-
Van: praneeth101 [mailto:praneeth...@yahoo.com] 
Verzonden: Friday 20 January 2017 21:27
Aan: users@camel.apache.org
Onderwerp: SFTP Multiple Files Using Camel

Hi,

  I am using spring XML for configuring routes and one of my route does 
SFTP'ing files from local to remote server. But i observed that only one file 
is transferred at a time.

  I have a requirement where i need to send all the files in a directory at 
once over sftp to remote machine.

   How do i do that!.? Help is appreciated! .

Thanks,
Sai



--
View this message in context: 
http://camel.465427.n5.nabble.com/SFTP-Multiple-Files-Using-Camel-tp5792871.html
Sent from the Camel - Users mailing list archive at Nabble.com.


RE: NoTypeConversionAvailableException

2015-05-11 Thread Hans Orbaan
Hi,

To generate @XmlRootElement annotations apparently you need to use anonymous 
inner types (unrelated example):








And not:








Other option would be to wrap it in a JAXBElement yourself and then marshal 
it:

FACTORY.createAcknowledgeOrders((OrderResults) object);


-Oorspronkelijk bericht-
Van: jainmcs03 [mailto:tojayendran.in...@gmail.com] 
Verzonden: Monday 11 May 2015 13:31
Aan: users@camel.apache.org
Onderwerp: Re: NoTypeConversionAvailableException

Hi Claus,

Yes, @XmlRootElement() missing. No class with root element annotation in my 
code generated by cxf-codegen-plugin.

Actually my payload should be like this,

http://services.equifax.com/eport/ws/schemas/1.0";>



Part of XSD is below,

   
  
 
The WS Inquiry service request message root element declaration
 
  
   

Couldnt find my mistake.

Regards
Jayendran



--
View this message in context: 
http://camel.465427.n5.nabble.com/NoTypeConversionAvailableException-tp5766952p5766976.html
Sent from the Camel - Users mailing list archive at Nabble.com.


null body after transform method exception

2015-06-14 Thread Hans Orbaan
Hello all,

When an exception is thrown from a transform method I lose the content of the 
message body. Is that intentional or a bug? Because it does not happen when an 
exception is thrown from a bean call.

.bean(ErrorBean.class, ErrorBean.METHOD)

Vs.

.transform().method(ErrorBean.class, ErrorBean.METHOD)

I have attached a testcase to demonstrate the issue.

Thanks!


RE: null body after transform method exception

2015-06-14 Thread Hans Orbaan
Testcase (attachment was removed):

package route;

import org.apache.camel.Exchange;
import org.apache.camel.LoggingLevel;
import org.apache.camel.Processor;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.test.junit4.CamelTestSupport;
import org.fest.assertions.api.Assertions;
import org.junit.Test;

public class ExceptionToErrorRouteTest extends CamelTestSupport {

private static final String START = "direct://test.start";
private static final String END = "mock://test.end";
private static final String ERROR = "mock://errors.start";
private static final String BODY = "body";

@Test
public void testBeanExceptionToErrorRoute() throws Exception {
testExceptionToErrorRoute();
}

@Test
public void testTransformExceptionToErrorRoute() throws Exception {
testExceptionToErrorRoute();
}


private void testExceptionToErrorRoute() throws Exception {

this.getMockEndpoint(ERROR).expectedMessageCount(1);
this.getMockEndpoint(ERROR).whenAnyExchangeReceived(new Processor() {

@Override
public void process(Exchange exchange) throws Exception {
Object body = exchange.getIn().getBody();
Assertions.assertThat(body).isNotNull();
Assertions.assertThat(body).isEqualTo(BODY);
}
});

this.getMockEndpoint(END).expectedMessageCount(0);

this.template.sendBody(START, BODY);

assertMockEndpointsSatisfied();
}


@Override
protected RouteBuilder[] createRouteBuilders() {
RouteBuilder builder = new RouteBuilder() {

@Override
public void configure() throws Exception {

errorHandler(deadLetterChannel(ERROR).retryAttemptedLogLevel(LoggingLevel.WARN));
if 
("testTransformExceptionToErrorRoute".equals(getTestMethodName())) {
from(START)
.routeId("exception.test.transform")
.transform().method(ErrorBean.class, ErrorBean.METHOD)
.to(END);
} else {
from(START)
.routeId("exception.test.bean")
.bean(ErrorBean.class, ErrorBean.METHOD)
.to(END);
}
}
};
return new RouteBuilder[] { builder };
}

public static class ErrorBean {
private static final String METHOD = "throwException";
public static void throwException(Exchange exchange) {
String body = exchange.getIn().getBody(String.class);
Assertions.assertThat(body).isEqualTo(BODY);
throw new AssertionError();
}
}
}



Van: Hans Orbaan [mailto:hans.orb...@docdata.eu]
Verzonden: Monday 15 June 2015 8:51
Aan: users@camel.apache.org
Onderwerp: null body after transform method exception

Hello all,

When an exception is thrown from a transform method I lose the content of the 
message body. Is that intentional or a bug? Because it does not happen when an 
exception is thrown from a bean call.

.bean(ErrorBean.class, ErrorBean.METHOD)

Vs.

.transform().method(ErrorBean.class, ErrorBean.METHOD)

I have attached a testcase to demonstrate the issue.

Thanks!


RE: null body after transform method exception

2015-06-15 Thread Hans Orbaan
Hi,

Yes, I tried a wide range of exceptions ;)
Nullpointers and such.

But still, one test fails, the other succeeds. I would expect the same behavior 
from both methods.

Thanks Claus!


-Oorspronkelijk bericht-
Van: Claus Ibsen [mailto:claus.ib...@gmail.com] 
Verzonden: Monday 15 June 2015 9:27
Aan: users@camel.apache.org
Onderwerp: Re: null body after transform method exception

Hi

Ah no that is likely not the intention.

Though as your bean uses some assertion are you sure its a regular 
java.lang.Exception and not a java.lang.Error that it throws. eg try with a 
regular exception.

But still Camel should behave the same so there is likely a little bug. But I 
suspect its because you use assertion and not a regular exception.


On Mon, Jun 15, 2015 at 8:50 AM, Hans Orbaan  wrote:
> Hello all,
>
>
>
> When an exception is thrown from a transform method I lose the content 
> of the message body. Is that intentional or a bug? Because it does not 
> happen when an exception is thrown from a bean call.
>
>
>
> .bean(ErrorBean.class, ErrorBean.METHOD)
>
> Vs.
>
>
>
> .transform().method(ErrorBean.class, ErrorBean.METHOD)
>
>
>
> I have attached a testcase to demonstrate the issue.
>
>
>
> Thanks!



--
Claus Ibsen
-
Red Hat, Inc.
Email: cib...@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/


RE: route specification in web.xml

2015-06-28 Thread Hans Orbaan
Hi,

Apparently all code snippets on camel.apache.org are invisible at the moment. I 
think it is a syntax highlighter issue.
You can still look up the code in the page source. Just right click and view 
page source

-Oorspronkelijk bericht-
Van: Tim Dudgeon [mailto:tdudgeon...@gmail.com] 
Verzonden: Sunday 28 June 2015 11:43
Aan: users@camel.apache.org
Onderwerp: Re: route specification in web.xml

Thanks. That's what I need.
But are you aware that all the code snippets are missing from that page?

Tim


On 27/06/2015 09:30, Claus Ibsen wrote:
> Hi
>
> Yes there is more documentation here
> http://camel.apache.org/servletlistener-component.html
>
> On Thu, Jun 25, 2015 at 1:40 PM, Tim Dudgeon  wrote:
>> I was trying to get some servlets working, based on the 
>> camel-example-servlet-tomcat-no-spring example.
>>
>> I'm a bit confused by this section:
>>
>> 
>>  routeBuilder-MyRoute
>>  
>>   
>> classpath:camel-config.xml
>>
>>
>> I worked out by trial and error how to specify an individual 
>> RouteBuilder implementation as a Java class:
>> foo.bar.bazMyRouteBuilderClass
>>
>> and how to do a package scan for multiple RouteBuilders:
>> packagescan:foo.bar.baz
>>
>> But is there and more detailed information on this sort of thing anywhere?
>>
>> For instance, what other options are available here, and if you 
>> needed to run multiple camel contexts (separate servlets?) how could you do 
>> this.
>>
>> Thanks
>> Tim
>
>



RE: Idempotent consumer query

2015-08-27 Thread Hans Orbaan
Hi,

You might want to consider implementing your own IdempotentRepository. You can 
increment a counter when add or confirm is called.
Then the contains method should only return true when you have reached 5.

With kind regards,

Hans Orbaan

-Oorspronkelijk bericht-
Van: gilboy [mailto:josephoto...@gmail.com] 
Verzonden: Thursday 27 August 2015 9:26
Aan: users@camel.apache.org
Onderwerp: Idempotent consumer query

Hi

I have a use case were I want to process the same message on my route up to a 
maximum of 5 times. I understand the idempotent consumer can be used to ensure 
we don't process the same messages twice. Just wondering if there exists 
already something similar to the idempotent consumer were you can specify the 
max number of times you want to attempt to process the same message on a route

Thanks
Joe 



--
View this message in context: 
http://camel.465427.n5.nabble.com/Idempotent-consumer-query-tp5771004.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Adding methods to the Route interface

2015-10-07 Thread Hans Orbaan
Hi,

Are there any (custom) implementations of the Route interface that differ from 
the DefaultRoute class?

It might be a good small enhancement to add more methods that are implemented 
in the DefaultRoute by inheritance from ServiceSupport, to the Route interface.
There is a lot of casting going on when using methods like isStarted, 
isStopped, etc.

Anyway, I think the Route interface could use more methods from the 
StatefulService interface.

With kind regards,

Hans Orbaan


move to failed folder, with onException in place

2015-10-29 Thread Hans Orbaan
Hi all,

Why is a file not moved to the failed folder when there is an onexception with 
a to-endpoint?

When I use the following the file does not show up in the failed folder:
onException(Exception.class).handled(false).to("seda:errors").end();

This does work, but is obviously not of any use:
this.onException(Exception.class).handled(false).end();

This also does work, and will be my workaround:
this.onException(Exception.class).handled(false).multicast().to("seda:errors").end().end();

There is an earlier topic about this. Where Clause says he will log a ticket. 
Has that been done, has this been fixed? 
http://camel.465427.n5.nabble.com/Component-file-move-and-moveFailed-td5685631.html

I'm using 2.16.1-SNAPSHOT at the moment.
Met vriendelijke groet,
Docdata Commerce B.V.
Hans Orbaan
Developer
Docdata Commerce
Energieweg 2
5145 NW Waalwijk
t

+31 (0)416 - 674 169

m

+31 (0)6 - 469 543 23





e

hans.orb...@docdata.com

i

www.docdata.nl

Docdata Commerce B.V. is part of DOCDATA N.V., listed at the NYSE Euronext 
Amsterdam (ticker symbol DOCD).
All information contained within this e-mail, including any attachments, is 
confidential. If you have received this e-mail in error, please delete it 
immediately and remove the attachments from your system. Do not use, disclose 
or spread the information in any way and notify the sender immediately. Any 
views and opinions expressed in this e-mail may not represent those of Docdata.



RE: Characters getting escaped when read from properties file

2015-11-02 Thread Hans Orbaan
Hi,

Use: RAW(yourPassword)

See: http://camel.apache.org/configuring-camel.html

With kind regards


-Oorspronkelijk bericht-
Van: Gustav Sinder [mailto:gustav.sin...@ferrologic.se] 
Verzonden: Monday 2 November 2015 14:46
Aan: users@camel.apache.org
Onderwerp: Characters getting escaped when read from properties file

Hi,

I've got a password in a properties file configured as (simplified):
password=H+r/GbP8

The properties file is refered to in the blueprint as:


The property is used for a bean with:


The password is read from the file but as "H+r%2FGbP8" (encoded)

How could I get the literal value from the properties file? If that's not 
possible, how do I properly escape the forward slash in the value?
I've tried backslash, double backslash and so on without any success.

Thanks
/Gustav


RE: move to failed folder, with onException in place

2015-11-04 Thread Hans Orbaan
Hi Claus,

I think the following test will show you what I mean. Apparently the issue only 
occurs with Seda.

{code}
import java.util.concurrent.TimeUnit;

import org.apache.camel.Exchange;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.test.junit4.CamelTestSupport;
import org.junit.Test;

public class MoveToFailedTest extends CamelTestSupport {

@Override
public void setUp() throws Exception {
deleteDirectory("target/test");
super.setUp();
}

@Test
public void testExceptionSeda() throws Exception {
testException();
}

@Test
public void testExceptionDirect() throws Exception {
testException();
}

private void testException() throws InterruptedException {
getMockEndpoint("mock:end").expectedMessageCount(0);
getMockEndpoint("mock:errors").expectedBodiesReceived("abc");

getMockEndpoint("mock:errors").expectedFileExists("target/test/error/file.txt");

template.sendBodyAndHeader("file:target/test", "abc", 
Exchange.FILE_NAME, "file.txt");
this.assertMockEndpointsSatisfied(1, TimeUnit.SECONDS);
}

@Override
protected RouteBuilder createRouteBuilder() throws Exception {
return new RouteBuilder() {

@Override
public void configure() throws Exception {
String errors = getTestMethodName().contains("Seda") ? 
"seda:errors" : "direct:errors";

// @formatter:off
from(errors).to("mock:errors");

from("file:target/test/?moveFailed=error/")

.onException(Exception.class).handled(false).to(errors).end()
.throwException(new RuntimeException("exception"))
.to("mock:end");
// @formatter:on
}
};
}

}


-Oorspronkelijk bericht-
Van: Claus Ibsen [mailto:claus.ib...@gmail.com] 
Verzonden: Saturday 31 October 2015 18:26
Aan: users@camel.apache.org
Onderwerp: Re: move to failed folder, with onException in place

I think you need to tell us a bit more before we can help. Maybe show a bit 
more route code what you attempt.

On Thu, Oct 29, 2015 at 2:28 PM, Hans Orbaan  wrote:
> Hi all,
>
> Why is a file not moved to the failed folder when there is an onexception 
> with a to-endpoint?
>
> When I use the following the file does not show up in the failed folder:
> onException(Exception.class).handled(false).to("seda:errors").end();
>
> This does work, but is obviously not of any use:
> this.onException(Exception.class).handled(false).end();
>
> This also does work, and will be my workaround:
> this.onException(Exception.class).handled(false).multicast().to("seda:
> errors").end().end();
>
> There is an earlier topic about this. Where Clause says he will log a 
> ticket. Has that been done, has this been fixed? 
> http://camel.465427.n5.nabble.com/Component-file-move-and-moveFailed-t
> d5685631.html
>
> I'm using 2.16.1-SNAPSHOT at the moment.



--
Claus Ibsen
-
http://davsclaus.com @davsclaus
Camel in Action 2nd edition:
https://www.manning.com/books/camel-in-action-second-edition


RE: date:command:pattern

2016-02-10 Thread Hans Orbaan
Hi,

Also you could try the more verbose way: $simple{date:now:yyyMMdd}.

This is sometimes necessary. I am not sure why. Think it had something to do 
with loading from property files.

With kind regards,

Hans Orbaan

-Oorspronkelijk bericht-
Van: Claus Ibsen [mailto:claus.ib...@gmail.com] 
Verzonden: Wednesday 10 February 2016 15:00
Aan: users@camel.apache.org
Onderwerp: Re: date:command:pattern

What version of Camel do you use?

There is some examples here
http://camel.apache.org/file-language.html

At first glance your url looks correct.

On Tue, Feb 9, 2016 at 8:03 PM, camel_ch  wrote:
> Hi
>
> I am trying the below  using camel route
>
>  uri="file:{{file.path}}?noop=true&fileExist=Append&fileName=2767_${date:now:MMdd}.txt"
> />
>
>
> But instead of 2767_20160209.txt  , it is giving
>
> 2767_now:MMdd.txt
>
> Any help is highly appreciated !
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/date-command-pattern-tp5777485.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2


RE: ampersand in ftp password

2016-03-01 Thread Hans Orbaan
Hi, try password=RAW(help&me)

-Oorspronkelijk bericht-
Van: yogu13 [mailto:yog...@gmail.com] 
Verzonden: Tuesday 1 March 2016 14:48
Aan: users@camel.apache.org
Onderwerp: Re: ampersand in ftp password

Hi,

you could try using  property placeholders
   for password

Regards,
-Yogesh



--
View this message in context: 
http://camel.465427.n5.nabble.com/ampersand-in-ftp-password-tp5778469p5778473.html
Sent from the Camel - Users mailing list archive at Nabble.com.


camel-jcifs SMB issues

2016-03-03 Thread Hans Orbaan
Hi all,

I use camel 2.16.2 with camel-jcifs 2.14.1 (There is no newer version although 
the documentation says there should be: https://camel.apache.org/jcifs.html).

This causes a lot of issues with the smb:// protocol. Work around is to have 
the shares mounted and use the file:// protocol, then all goes well.
Has there been someone who experienced this as well? Any tips and tricks? It 
looks like the system is out of resources while it is actually not. It just 
requests an amazing amount of threads to just log in and retrieve some files.

I did get it working for some small files. But it fails easily. Big files (1mb 
- 5mb) will always throw OutOfMemoryErrors because it cannot request more 
threads. It already has a ton of them though, just for 1 login and 1 file.

Routes are very easy:

from(smb://)
to(file://)

and

from (file://)
to (smb://)

2016-03-03 15:44:02,566 [thread #464] errors - WARN - Error stacktrace: 
org.apache.camel.CamelExecutionException: Exception occurred during execution 
on the exchange: 
Exchange[ID-slesb101-43053-1456936402020-0-213044][87949.jpg]
at 
org.apache.camel.util.ObjectHelper.wrapCamelExecutionException(ObjectHelper.java:1658)
at 
org.apache.camel.impl.DefaultExchange.setException(DefaultExchange.java:345)
at 
org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:64)
at 
org.apache.camel.processor.SendProcessor$2.doInAsyncProducer(SendProcessor.java:169)
at 
org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:341)
at 
org.apache.camel.processor.SendProcessor.process(SendProcessor.java:164)
at 
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:77)
at 
org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:460)
at 
org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:190)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:121)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:83)
at 
org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:190)
at 
org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:442)
at 
org.apache.camel.component.file.GenericFileConsumer.processBatch(GenericFileConsumer.java:214)
at 
org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:178)
at 
org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:174)
at 
org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:101)
at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.OutOfMemoryError: unable to create new native thread
at java.lang.Thread.start0(Native Method)
at java.lang.Thread.start(Thread.java:714)
at jcifs.UniAddress.lookupServerOrWorkgroup(UniAddress.java:173)
at jcifs.UniAddress.getAllByName(UniAddress.java:290)
at jcifs.UniAddress.getByName(UniAddress.java:245)
at jcifs.smb.Dfs.getTrustedDomains(Dfs.java:62)
at jcifs.smb.Dfs.resolve(Dfs.java:167)
at jcifs.smb.SmbFile.doConnect(SmbFile.java:902)
at jcifs.smb.SmbFile.connect(SmbFile.java:954)
at jcifs.smb.SmbFile.connect0(SmbFile.java:880)
at jcifs.smb.SmbFile.queryPath(SmbFile.java:1335)
at jcifs.smb.SmbFile.exists(SmbFile.java:1417)
at 
org.apacheextras.camel.component.jcifs.DefaultSmbClient.isExist(DefaultSmbClient.java:181)
at 
org.apacheextras.camel.component.jcifs.SmbOperations.existsFile(SmbOperations.java:79)
at 
org.apacheextras.camel.component.jcifs.SmbProducer.processExchange(SmbProducer.java:111)
at 
org.apacheextras.camel.component.jcifs.SmbProducer.process(SmbProducer.java:70)
at 
org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
... 21 more

Any help and / or pointers are appreciated!

With kind regards,

Hans Orbaan


null safe operator on exceptions

2016-03-04 Thread Hans Orbaan
Hi all,

In the simple language you can use the null safe operator (?.) to avoid null 
pointer exceptions. This does not work for the ${exception.stacktrace} like: 
${exception?.stacktrace}.

.log(LoggingLevel.WARN, "${exception?.stacktrace}")

2016-03-04 09:04:46,969 [main] 
org.apache.camel.processor.FatalFallbackErrorHandler - ERROR - Exception 
occurred while trying to handle previously thrown exception on exchangeId: 
ID-PC0480-55853-1457078686408-0-2 using: 
[Pipeline[[Channel[Log(myRoute)[g]], 
Channel[Log(myRoute)[exchangeExceptionOgnl(?.stacktrace)]], 
Channel[Multicast[[Channel[sendTo(Endpoint[mock://errors])]]]. The previous 
and the new exception will be logged in the following.
2016-03-04 09:04:46,976 [main] 
org.apache.camel.processor.FatalFallbackErrorHandler - ERROR - \--> Previous 
exception on exchangeId: ID-PC0480-55853-1457078686408-0-2
2016-03-04 09:04:46,978 [main] 
org.apache.camel.processor.FatalFallbackErrorHandler - ERROR - \--> New 
exception on exchangeId: ID-PC0480-55853-1457078686408-0-2

Is this something that could/should be fixed or are there reasons why that 
doesn't work?

With kind regards,

Hans Orbaan


Quartz schedule too many workers in route

2016-03-16 Thread Hans Orbaan
Hello all,

We have a few very busy routes that are throwing FileNotFoundExceptions when 
processing files (full stacktrace below). Searching for those filenames in the 
log it is very clear that those files have already been processed in the past 
minute and thus are not there.
After removing the 1 minute schedule and adding a 1 minute delay the problems 
have disappeared.

After testing it looks like a cron scheduler can only start 1 thread/worker per 
route and a next scheduler ping will wait for the previous one to be finished. 
Even if we manually trigger the route by its triggerId. This was tested by 
holding a thread in a debugger for a few minutes, no new threads passed the 
breakpoint until we let the first thread go. Still we are seeing what we are 
seeing but I cannot create the volume of messages and routes in a test/develop 
environment.

During low volume processing we can see multiple workers busy, but always in a 
different minute then the other. So 1 thread/worker is busy per minute but the 
worker name can differ.
During high volume processing at some point multiple workers will be 
processing, the same route, in the same second. Also there have been moments we 
can find 5 camellock files at the same time, in the same directory. There is 
only 1 route per directory so there should not be more than 1 camellock, I 
think.

Example from log (all the same routeId):
2016-03-14 23:35:38,783 [DefaultQuartzScheduler-esbContext-1_Worker-1]
2016-03-14 23:35:40,385 [DefaultQuartzScheduler-esbContext-1_Worker-7]
2016-03-14 23:35:40,620 [DefaultQuartzScheduler-esbContext-1_Worker-6]
2016-03-14 23:35:40,843 [DefaultQuartzScheduler-esbContext-1_Worker-8]
2016-03-14 23:35:41,262 [DefaultQuartzScheduler-esbContext-1_Worker-1]
2016-03-14 23:35:41,529 [DefaultQuartzScheduler-esbContext-1_Worker-2]
2016-03-14 23:35:43,200 [DefaultQuartzScheduler-esbContext-1_Worker-7]
2016-03-14 23:35:43,205 [DefaultQuartzScheduler-esbContext-1_Worker-6]
2016-03-14 23:35:44,470 [DefaultQuartzScheduler-esbContext-1_Worker-8]
2016-03-14 23:35:44,665 [DefaultQuartzScheduler-esbContext-1_Worker-1]
2016-03-14 23:35:45,503 [DefaultQuartzScheduler-esbContext-1_Worker-2]
2016-03-14 23:35:46,393 [DefaultQuartzScheduler-esbContext-1_Worker-7]
2016-03-14 23:35:47,051 [DefaultQuartzScheduler-esbContext-1_Worker-6]

The routes are very simple, from a mounted folder to a local directory with 
nothing in between except for some onException handling for retrying and 
sending to an error route (direct). Lowering maxMessagesPerPoll (250) did seem 
to decrease the problem a bit but I am not convinced yet. This should be tested 
with a number lower than 100.

from(file:///mnt/sl-nl/bij/outbox/?sortBy=ignoreCase:file:name&filter=#fileFilter&recursive=false&move=processed&moveFailed=failed&scheduler.cron=0+/1+0-23+?+*+1,2,3,4,5,6,7&scheduler=quartz2&scheduler.triggerId=nl_bij-export-to-archive-276)
to(file:///data/work/sl/work-archive/work/276/)

Is there anything we can change to make sure we have only one worker processing 
at a time, per route? We seem to have 10 workers total that are divided amongst 
the routes with schedulers. We have 250 routes total with a schedule. Most 
schedules are every minute. Also there are 250 routes with delay=5s, but they 
do not use those workers.

org.quartz.threadPool.threadCount is now at 1. We might need to increase this 
number as we have 250 routes with a 1 minute schedule. But the issue we have is 
quite the opposite of what to expect if quartz cannot trigger all jobs it 
should trigger.

-
version.camel   2.16.2

file:quartz.properties
org.quartz.scheduler.instanceName = QuartzScheduler
org.quartz.scheduler.threadsInheritContextClassLoaderOfInitializer = true
org.quartz.scheduler.skipUpdateCheck = true
org.quartz.scheduler.jmx.export = true
org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool
org.quartz.threadPool.threadCount = 1
org.quartz.jobStore.class = org.quartz.simpl.RAMJobStore

server.info
Tomcat Version   Apache Tomcat/8.0.26
JVM Version 1.8.0_60-b27
JVM Vendor Oracle Corporation
OS NameLinux
OS Version3.8.13-98.2.2.el6uek.x86_64
OS Architecture   amd64

2016-03-14 22:29:02,485 [DefaultQuartzScheduler-esbContext-1_Worker-10] errors 
- WARN - Error stacktrace: 
org.apache.camel.component.file.GenericFileOperationFailedException: Cannot 
store file: /data/work/sl/work-archive/work/276/DD_SOS2016031422110816.xml
at 
org.apache.camel.component.file.FileOperations.storeFile(FileOperations.java:292)
at 
org.apache.camel.component.file.GenericFileProducer.writeFile(GenericFileProducer.java:277)
at 
org.apache.camel.component.file.GenericFileProducer.processExchange(GenericFileProducer.java:165)
at 
org.apache.c

RE: Quartz schedule too many workers in route

2016-03-21 Thread Hans Orbaan
Hi,

Is there someone that can help a bit with the issue below?

An endpoint (file) with a quartz cronschedule is not stateful. This means an 
schedule that triggers every minute it will start processing with multiple 
threads after 1 minute if it did not finish the job. My quess is this is 
unwanted in almost all situations.

This issue does not happen when spring is used as scheduler. Also this does not 
happen when using a regular delay=1m.

I tried stuff like job.stateful=true, but that is not an allowed option.
At this point I see no other solution then to start using the timer or quartz 
component to trigger routes, but I would much rather keep using the file, ftp, 
etc components with a schedule.

Any help would be appreciated.

With kind regards,

Hans Orbaan

-Oorspronkelijk bericht-
Van: Hans Orbaan [mailto:hans.orb...@docdata.eu] 
Verzonden: Wednesday 16 March 2016 10:18
Aan: users@camel.apache.org
Onderwerp: Quartz schedule too many workers in route

Hello all,

We have a few very busy routes that are throwing FileNotFoundExceptions when 
processing files (full stacktrace below). Searching for those filenames in the 
log it is very clear that those files have already been processed in the past 
minute and thus are not there.
After removing the 1 minute schedule and adding a 1 minute delay the problems 
have disappeared.

After testing it looks like a cron scheduler can only start 1 thread/worker per 
route and a next scheduler ping will wait for the previous one to be finished. 
Even if we manually trigger the route by its triggerId. This was tested by 
holding a thread in a debugger for a few minutes, no new threads passed the 
breakpoint until we let the first thread go. Still we are seeing what we are 
seeing but I cannot create the volume of messages and routes in a test/develop 
environment.

During low volume processing we can see multiple workers busy, but always in a 
different minute then the other. So 1 thread/worker is busy per minute but the 
worker name can differ.
During high volume processing at some point multiple workers will be 
processing, the same route, in the same second. Also there have been moments we 
can find 5 camellock files at the same time, in the same directory. There is 
only 1 route per directory so there should not be more than 1 camellock, I 
think.

Example from log (all the same routeId):
2016-03-14 23:35:38,783 [DefaultQuartzScheduler-esbContext-1_Worker-1]
2016-03-14 23:35:40,385 [DefaultQuartzScheduler-esbContext-1_Worker-7]
2016-03-14 23:35:40,620 [DefaultQuartzScheduler-esbContext-1_Worker-6]
2016-03-14 23:35:40,843 [DefaultQuartzScheduler-esbContext-1_Worker-8]
2016-03-14 23:35:41,262 [DefaultQuartzScheduler-esbContext-1_Worker-1]
2016-03-14 23:35:41,529 [DefaultQuartzScheduler-esbContext-1_Worker-2]
2016-03-14 23:35:43,200 [DefaultQuartzScheduler-esbContext-1_Worker-7]
2016-03-14 23:35:43,205 [DefaultQuartzScheduler-esbContext-1_Worker-6]
2016-03-14 23:35:44,470 [DefaultQuartzScheduler-esbContext-1_Worker-8]
2016-03-14 23:35:44,665 [DefaultQuartzScheduler-esbContext-1_Worker-1]
2016-03-14 23:35:45,503 [DefaultQuartzScheduler-esbContext-1_Worker-2]
2016-03-14 23:35:46,393 [DefaultQuartzScheduler-esbContext-1_Worker-7]
2016-03-14 23:35:47,051 [DefaultQuartzScheduler-esbContext-1_Worker-6]

The routes are very simple, from a mounted folder to a local directory with 
nothing in between except for some onException handling for retrying and 
sending to an error route (direct). Lowering maxMessagesPerPoll (250) did seem 
to decrease the problem a bit but I am not convinced yet. This should be tested 
with a number lower than 100.

from(file:///mnt/sl-nl/bij/outbox/?sortBy=ignoreCase:file:name&filter=#fileFilter&recursive=false&move=processed&moveFailed=failed&scheduler.cron=0+/1+0-23+?+*+1,2,3,4,5,6,7&scheduler=quartz2&scheduler.triggerId=nl_bij-export-to-archive-276)
to(file:///data/work/sl/work-archive/work/276/)

Is there anything we can change to make sure we have only one worker processing 
at a time, per route? We seem to have 10 workers total that are divided amongst 
the routes with schedulers. We have 250 routes total with a schedule. Most 
schedules are every minute. Also there are 250 routes with delay=5s, but they 
do not use those workers.

org.quartz.threadPool.threadCount is now at 1. We might need to increase this 
number as we have 250 routes with a 1 minute schedule. But the issue we have is 
quite the opposite of what to expect if quartz cannot trigger all jobs it 
should trigger.

-
version.camel   2.16.2

file:quartz.properties
org.quartz.scheduler.instanceName = QuartzScheduler 
org.quartz.scheduler.threadsInheritContextClassLoaderOfInitializer = true 
org.quartz.scheduler.skipUpdateCheck = true org.quartz.scheduler.jmx.export = 
true org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool 
org.quartz.threadPool.threadCount =

RE: Quartz schedule too many workers in route

2016-03-21 Thread Hans Orbaan
Hi Claus,

It was in the email I forwarded. So below my new email. But here it is:

from(file:///mnt/sl-nl/bij/outbox/?sortBy=ignoreCase:file:name&filter=#fileFilter&recursive=false&move=processed&moveFailed=failed&scheduler.cron=0+0/1+0-23+?+*+1,2,3,4,5,6,7&scheduler=quartz2&scheduler.triggerId=nl_bij-export-to-archive-276)
to(file:///data/work/sl/work-archive/work/276/)

But the same goes for any component used it looks like (ftp, sftp, etc)

Thanks!!

With kind regards,

Hans Orbaan

-Oorspronkelijk bericht-
Van: Claus Ibsen [mailto:claus.ib...@gmail.com] 
Verzonden: Monday 21 March 2016 16:37
Aan: users@camel.apache.org
Onderwerp: Re: Quartz schedule too many workers in route

On Mon, Mar 21, 2016 at 3:23 PM, Hans Orbaan  wrote:
> Hi,
>
> Is there someone that can help a bit with the issue below?
>
> An endpoint (file) with a quartz cronschedule is not stateful. This means an 
> schedule that triggers every minute it will start processing with multiple 
> threads after 1 minute if it did not finish the job. My quess is this is 
> unwanted in almost all situations.
>
> This issue does not happen when spring is used as scheduler. Also this does 
> not happen when using a regular delay=1m.
>
> I tried stuff like job.stateful=true, but that is not an allowed option.
> At this point I see no other solution then to start using the timer or quartz 
> component to trigger routes, but I would much rather keep using the file, 
> ftp, etc components with a schedule.
>

Ah can you provide an example of the uri you configure for this. We could look 
into what it would take to make scheduler.job.stateful=true or something being 
supported.


> Any help would be appreciated.
>
> With kind regards,
>
> Hans Orbaan
>
> -Oorspronkelijk bericht-
> Van: Hans Orbaan [mailto:hans.orb...@docdata.eu]
> Verzonden: Wednesday 16 March 2016 10:18
> Aan: users@camel.apache.org
> Onderwerp: Quartz schedule too many workers in route
>
> Hello all,
>
> We have a few very busy routes that are throwing FileNotFoundExceptions when 
> processing files (full stacktrace below). Searching for those filenames in 
> the log it is very clear that those files have already been processed in the 
> past minute and thus are not there.
> After removing the 1 minute schedule and adding a 1 minute delay the problems 
> have disappeared.
>
> After testing it looks like a cron scheduler can only start 1 thread/worker 
> per route and a next scheduler ping will wait for the previous one to be 
> finished. Even if we manually trigger the route by its triggerId. This was 
> tested by holding a thread in a debugger for a few minutes, no new threads 
> passed the breakpoint until we let the first thread go. Still we are seeing 
> what we are seeing but I cannot create the volume of messages and routes in a 
> test/develop environment.
>
> During low volume processing we can see multiple workers busy, but always in 
> a different minute then the other. So 1 thread/worker is busy per minute but 
> the worker name can differ.
> During high volume processing at some point multiple workers will be 
> processing, the same route, in the same second. Also there have been moments 
> we can find 5 camellock files at the same time, in the same directory. There 
> is only 1 route per directory so there should not be more than 1 camellock, I 
> think.
>
> Example from log (all the same routeId):
> 2016-03-14 23:35:38,783 [DefaultQuartzScheduler-esbContext-1_Worker-1]
> 2016-03-14 23:35:40,385 [DefaultQuartzScheduler-esbContext-1_Worker-7]
> 2016-03-14 23:35:40,620 [DefaultQuartzScheduler-esbContext-1_Worker-6]
> 2016-03-14 23:35:40,843 [DefaultQuartzScheduler-esbContext-1_Worker-8]
> 2016-03-14 23:35:41,262 [DefaultQuartzScheduler-esbContext-1_Worker-1]
> 2016-03-14 23:35:41,529 [DefaultQuartzScheduler-esbContext-1_Worker-2]
> 2016-03-14 23:35:43,200 [DefaultQuartzScheduler-esbContext-1_Worker-7]
> 2016-03-14 23:35:43,205 [DefaultQuartzScheduler-esbContext-1_Worker-6]
> 2016-03-14 23:35:44,470 [DefaultQuartzScheduler-esbContext-1_Worker-8]
> 2016-03-14 23:35:44,665 [DefaultQuartzScheduler-esbContext-1_Worker-1]
> 2016-03-14 23:35:45,503 [DefaultQuartzScheduler-esbContext-1_Worker-2]
> 2016-03-14 23:35:46,393 [DefaultQuartzScheduler-esbContext-1_Worker-7]
> 2016-03-14 23:35:47,051 [DefaultQuartzScheduler-esbContext-1_Worker-6]
>
> The routes are very simple, from a mounted folder to a local directory with 
> nothing in between except for some onException handling for retrying and 
> sending to an error route (direct). Lowering maxMessagesPerPoll (250) did 
> seem to decrease the problem a bit but I am not convinced yet. This should be 
> tested with a number lower than 100.
>
> from(file:///mnt/sl-nl

RE: Not move file on custom exception thown (file component)

2016-03-22 Thread Hans Orbaan
Hi,

Can't you change the permissions of the file to avoid it being written/moved?

With kind regards,

Hans Orbaan


-Oorspronkelijk bericht-
Van: fxthomas [mailto:felix.tho...@gmail.com] 
Verzonden: Tuesday 22 March 2016 13:31
Aan: users@camel.apache.org
Onderwerp: Re: Not move file on custom exception thown (file component)

you are right Claus ! . But I stop the route to avoid that problem (if you see 
the stop processor).  There will be manual intervention to handle this 
exception , thats why i have to keep the file at the same place.



--
View this message in context: 
http://camel.465427.n5.nabble.com/Not-move-file-on-custom-exception-thown-file-component-tp5779476p5779485.html
Sent from the Camel - Users mailing list archive at Nabble.com.


RE: Quartz schedule too many workers in route

2016-03-23 Thread Hans Orbaan
Hi Claus,

Did you have a chance to check this already?
I really think file and ftp consumers should never use multiple threads unless 
explicitly defined. This means a from(file://) with a quartz schedule should be 
stateful by default. Only then would it have the same behaviour as spring 
scheduler or when using a delay.

Thanks!

With kind regards,

Hans Orbaan


-Oorspronkelijk bericht-
Van: Hans Orbaan [mailto:hans.orb...@docdata.eu] 
Verzonden: Monday 21 March 2016 16:52
Aan: users@camel.apache.org
Onderwerp: RE: Quartz schedule too many workers in route

Hi Claus,

It was in the email I forwarded. So below my new email. But here it is:

from(file:///mnt/sl-nl/bij/outbox/?sortBy=ignoreCase:file:name&filter=#fileFilter&recursive=false&move=processed&moveFailed=failed&scheduler.cron=0+0/1+0-23+?+*+1,2,3,4,5,6,7&scheduler=quartz2&scheduler.triggerId=nl_bij-export-to-archive-276)
to(file:///data/work/sl/work-archive/work/276/)

But the same goes for any component used it looks like (ftp, sftp, etc)

Thanks!!

With kind regards,

Hans Orbaan

-Oorspronkelijk bericht-
Van: Claus Ibsen [mailto:claus.ib...@gmail.com]
Verzonden: Monday 21 March 2016 16:37
Aan: users@camel.apache.org
Onderwerp: Re: Quartz schedule too many workers in route

On Mon, Mar 21, 2016 at 3:23 PM, Hans Orbaan  wrote:
> Hi,
>
> Is there someone that can help a bit with the issue below?
>
> An endpoint (file) with a quartz cronschedule is not stateful. This means an 
> schedule that triggers every minute it will start processing with multiple 
> threads after 1 minute if it did not finish the job. My quess is this is 
> unwanted in almost all situations.
>
> This issue does not happen when spring is used as scheduler. Also this does 
> not happen when using a regular delay=1m.
>
> I tried stuff like job.stateful=true, but that is not an allowed option.
> At this point I see no other solution then to start using the timer or quartz 
> component to trigger routes, but I would much rather keep using the file, 
> ftp, etc components with a schedule.
>

Ah can you provide an example of the uri you configure for this. We could look 
into what it would take to make scheduler.job.stateful=true or something being 
supported.


> Any help would be appreciated.
>
> With kind regards,
>
> Hans Orbaan
>
> -Oorspronkelijk bericht-
> Van: Hans Orbaan [mailto:hans.orb...@docdata.eu]
> Verzonden: Wednesday 16 March 2016 10:18
> Aan: users@camel.apache.org
> Onderwerp: Quartz schedule too many workers in route
>
> Hello all,
>
> We have a few very busy routes that are throwing FileNotFoundExceptions when 
> processing files (full stacktrace below). Searching for those filenames in 
> the log it is very clear that those files have already been processed in the 
> past minute and thus are not there.
> After removing the 1 minute schedule and adding a 1 minute delay the problems 
> have disappeared.
>
> After testing it looks like a cron scheduler can only start 1 thread/worker 
> per route and a next scheduler ping will wait for the previous one to be 
> finished. Even if we manually trigger the route by its triggerId. This was 
> tested by holding a thread in a debugger for a few minutes, no new threads 
> passed the breakpoint until we let the first thread go. Still we are seeing 
> what we are seeing but I cannot create the volume of messages and routes in a 
> test/develop environment.
>
> During low volume processing we can see multiple workers busy, but always in 
> a different minute then the other. So 1 thread/worker is busy per minute but 
> the worker name can differ.
> During high volume processing at some point multiple workers will be 
> processing, the same route, in the same second. Also there have been moments 
> we can find 5 camellock files at the same time, in the same directory. There 
> is only 1 route per directory so there should not be more than 1 camellock, I 
> think.
>
> Example from log (all the same routeId):
> 2016-03-14 23:35:38,783 [DefaultQuartzScheduler-esbContext-1_Worker-1]
> 2016-03-14 23:35:40,385 [DefaultQuartzScheduler-esbContext-1_Worker-7]
> 2016-03-14 23:35:40,620 [DefaultQuartzScheduler-esbContext-1_Worker-6]
> 2016-03-14 23:35:40,843 [DefaultQuartzScheduler-esbContext-1_Worker-8]
> 2016-03-14 23:35:41,262 [DefaultQuartzScheduler-esbContext-1_Worker-1]
> 2016-03-14 23:35:41,529 [DefaultQuartzScheduler-esbContext-1_Worker-2]
> 2016-03-14 23:35:43,200 [DefaultQuartzScheduler-esbContext-1_Worker-7]
> 2016-03-14 23:35:43,205 [DefaultQuartzScheduler-esbContext-1_Worker-6]
> 2016-03-14 23:35:44,470 [DefaultQuartzScheduler-esbContext-1_Worker-8]
> 2016-03-14 23:35:44,665 [DefaultQuartzScheduler-esbContext-1_Worker-1]
> 2016-03-14 23:35:45,503 [DefaultQuartzScheduler-esbC

RE: Quartz schedule too many workers in route

2016-03-23 Thread Hans Orbaan
Hi,

The only way I have found to make sure a file or ftp component does not use 
multiple threads while consuming very large batches is to annotate the 
QuartzScheduledPollConsumerJob class with @DisallowConcurrentExecution.

That’s it. It seems to work for us. I am not familiar enough with the Camelcode 
to say what side effects it has and if this would prevent any quartz job in 
camel to now be single threaded, even if the user does not want it to be.
But to me it looks like an oversight when moving from quartz to quartz2. A file 
or ftp consumer should be single threaded while retrieving.

Hope this helps...

With kind regards,

Hans Orbaan


-Oorspronkelijk bericht-
Van: Hans Orbaan [mailto:hans.orb...@docdata.eu] 
Verzonden: Wednesday 23 March 2016 9:52
Aan: users@camel.apache.org
Onderwerp: RE: Quartz schedule too many workers in route

Hi Claus,

Did you have a chance to check this already?
I really think file and ftp consumers should never use multiple threads unless 
explicitly defined. This means a from(file://) with a quartz schedule should be 
stateful by default. Only then would it have the same behaviour as spring 
scheduler or when using a delay.

Thanks!

With kind regards,

Hans Orbaan


-Oorspronkelijk bericht-
Van: Hans Orbaan [mailto:hans.orb...@docdata.eu]
Verzonden: Monday 21 March 2016 16:52
Aan: users@camel.apache.org
Onderwerp: RE: Quartz schedule too many workers in route

Hi Claus,

It was in the email I forwarded. So below my new email. But here it is:

from(file:///mnt/sl-nl/bij/outbox/?sortBy=ignoreCase:file:name&filter=#fileFilter&recursive=false&move=processed&moveFailed=failed&scheduler.cron=0+0/1+0-23+?+*+1,2,3,4,5,6,7&scheduler=quartz2&scheduler.triggerId=nl_bij-export-to-archive-276)
to(file:///data/work/sl/work-archive/work/276/)

But the same goes for any component used it looks like (ftp, sftp, etc)

Thanks!!

With kind regards,

Hans Orbaan

-Oorspronkelijk bericht-
Van: Claus Ibsen [mailto:claus.ib...@gmail.com]
Verzonden: Monday 21 March 2016 16:37
Aan: users@camel.apache.org
Onderwerp: Re: Quartz schedule too many workers in route

On Mon, Mar 21, 2016 at 3:23 PM, Hans Orbaan  wrote:
> Hi,
>
> Is there someone that can help a bit with the issue below?
>
> An endpoint (file) with a quartz cronschedule is not stateful. This means an 
> schedule that triggers every minute it will start processing with multiple 
> threads after 1 minute if it did not finish the job. My quess is this is 
> unwanted in almost all situations.
>
> This issue does not happen when spring is used as scheduler. Also this does 
> not happen when using a regular delay=1m.
>
> I tried stuff like job.stateful=true, but that is not an allowed option.
> At this point I see no other solution then to start using the timer or quartz 
> component to trigger routes, but I would much rather keep using the file, 
> ftp, etc components with a schedule.
>

Ah can you provide an example of the uri you configure for this. We could look 
into what it would take to make scheduler.job.stateful=true or something being 
supported.


> Any help would be appreciated.
>
> With kind regards,
>
> Hans Orbaan
>
> -Oorspronkelijk bericht-
> Van: Hans Orbaan [mailto:hans.orb...@docdata.eu]
> Verzonden: Wednesday 16 March 2016 10:18
> Aan: users@camel.apache.org
> Onderwerp: Quartz schedule too many workers in route
>
> Hello all,
>
> We have a few very busy routes that are throwing FileNotFoundExceptions when 
> processing files (full stacktrace below). Searching for those filenames in 
> the log it is very clear that those files have already been processed in the 
> past minute and thus are not there.
> After removing the 1 minute schedule and adding a 1 minute delay the problems 
> have disappeared.
>
> After testing it looks like a cron scheduler can only start 1 thread/worker 
> per route and a next scheduler ping will wait for the previous one to be 
> finished. Even if we manually trigger the route by its triggerId. This was 
> tested by holding a thread in a debugger for a few minutes, no new threads 
> passed the breakpoint until we let the first thread go. Still we are seeing 
> what we are seeing but I cannot create the volume of messages and routes in a 
> test/develop environment.
>
> During low volume processing we can see multiple workers busy, but always in 
> a different minute then the other. So 1 thread/worker is busy per minute but 
> the worker name can differ.
> During high volume processing at some point multiple workers will be 
> processing, the same route, in the same second. Also there have been moments 
> we can find 5 camellock files at the same time, in the same directory. There 
> is only 1 route per directory so there should not be more than 1 camellock, I 
> think.

RE: Camel ftp component : JSCH-0.1.44 Vs OpenSSH_6.6.1 issue: Leads to error : com.jcraft.jsch.JSchException: Session.connect: java.io.IOException: End of IO Stream Read

2016-03-30 Thread Hans Orbaan
HI,

I am not sure if you have the same issue with Jsch as we had, but give this a 
go:

{code}
{
// change the order of PreferredAuthentications. put gssapi-with-mic as 
last
String preferredAuthentications = 
JSch.getConfig("PreferredAuthentications").replace("gssapi-with-mic", "") 
.replace(",,", ",");
preferredAuthentications = StringUtils.strip(preferredAuthentications, 
",") + ",gssapi-with-mic";
JSch.setConfig("PreferredAuthentications", preferredAuthentications);
}
{code}

It simply makes gssapi-with-mic the last authentication that will be used when 
connecting. We had timeouts because of that authentication with a few servers...

With kind regards,

Hans Orbaan


-Oorspronkelijk bericht-
Van: Claus Ibsen [mailto:claus.ib...@gmail.com] 
Verzonden: Wednesday 30 March 2016 14:37
Aan: users@camel.apache.org
Onderwerp: Re: Camel ftp component : JSCH-0.1.44 Vs OpenSSH_6.6.1 issue: Leads 
to error : com.jcraft.jsch.JSchException: Session.connect: java.io.IOException: 
End of IO Stream Read

Give it a try. You can download the latest version and try it with Camel only 
as you desire to do.

Also mind that Camel does not do the actual SSH/JSCH implementation.
It may also be an issue with that library so upgrading it or reporting to that 
community may help.



On Wed, Mar 30, 2016 at 2:17 PM, sharma_arun_se  wrote:
> Hi Claus,
>
>
> Thanks for replying.
> We are planning to get rid of Fuse, ServiceMix and planning to use 
> Camel only solution.
> Do you think Camel latest version have SSH/JSCH issue fixed. That is 
> we do not face such issue with "Camel only" solution?
>
>
> I suppose, now I am asking question in right forum. This is what I found in:
> http://camel.apache.org/discussion-forums.html
>
> "Use the user forum for you Camel questions, and asking for help.
>
> Camel User Forum <-- Use this forum"
>
>
>
>
> -
> Regards,
>
> Arun Kumar (sharma_arun_se)
>
> Expert SOA (Fuse ESB, Camel, ActiveMQ, OSGi) and RESTful Solution Architect, 
> Open Source Contributor.
> linkedin: http://in.linkedin.com/in/aronkumar
> twitter: https://twitter.com/#!/SharmaArunKumar
> blog: http://techiesweek.blogspot.com/
> Gtalk: arun.kaun...@gmail.com
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Camel-ftp-component-JSCH-0-1-44-Vs-O
> penSSH-6-6-1-issue-Leads-to-error-com-jcraft-jsch-JSchException-d-tp57
> 79854p5780023.html Sent from the Camel - Users mailing list archive at 
> Nabble.com.



--
Claus Ibsen
-
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2


RE: Camel ftp component : JSCH-0.1.44 Vs OpenSSH_6.6.1 issue: Leads to error : com.jcraft.jsch.JSchException: Session.connect: java.io.IOException: End of IO Stream Read

2016-03-30 Thread Hans Orbaan
Hi,

The code I sent is for camel-ftp. It uses static methods to do those changes in 
JSch. But after looking at your stacktrace in a browser and not my email client 
I am sure you are facing different issues then we were.

What I did was hooking up my debugger and line for line walk with my thread 
through the connection procedure to find out what was going wrong. Starting in 
RemoteFileConsumer.

With kind regards,

Hans Orbaan

-Oorspronkelijk bericht-
Van: sharma_arun_se [mailto:arun.kaun...@gmail.com] 
Verzonden: Wednesday 30 March 2016 15:15
Aan: users@camel.apache.org
Onderwerp: RE: Camel ftp component : JSCH-0.1.44 Vs OpenSSH_6.6.1 issue: Leads 
to error : com.jcraft.jsch.JSchException: Session.connect: java.io.IOException: 
End of IO Stream Read

Hi Claus, Hans,


We are using Camel FTP component (http://camel.apache.org/ftp2.html) to connect 
with FTP server.

We are not directly using "Jsch". I understand that Camel-ftp component make 
use of "Jsch" library internally. Do we need to change something or configure 
"Jsch" internally?

We started facing this SSH/Jsch  issue once our customer applied latest fix for 
SSH. 




-
Regards,

Arun Kumar (sharma_arun_se)

Expert SOA (Fuse ESB, Camel, ActiveMQ, OSGi) and RESTful Solution Architect, 
Open Source Contributor.
linkedin: http://in.linkedin.com/in/aronkumar
twitter: https://twitter.com/#!/SharmaArunKumar
blog: http://techiesweek.blogspot.com/
Gtalk: arun.kaun...@gmail.com

--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-ftp-component-JSCH-0-1-44-Vs-OpenSSH-6-6-1-issue-Leads-to-error-com-jcraft-jsch-JSchException-d-tp5779854p5780030.html
Sent from the Camel - Users mailing list archive at Nabble.com.