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][333387949.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

Reply via email to