camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From watcher <patr...@daly.ws>
Subject SFTP rename problems
Date Thu, 15 Apr 2010 11:37:45 GMT

Apache Camel 2.2
Windows Server 2003

I'm running an application that polls an SFTP server. I works to a point but
after some time the applications fails trying to get an exclusive lock on
the file. Whick seems to indicate that it is a permission problem. However
restarting the application (camel) fixes the issue. Could it be a fault with
camel?

[code]

<camel:camelContext xmlns="http://camel.apache.org/schema/spring">
 <camel:routeBuilder ref="myRouter"/> 	
 	<camel:endpoint id="printerIncoming"
uri="sftp://${printerIncoming}@${ipaddress}?password=password&amp;binary=true&amp;recursive=true&amp;delay=10000&amp;initialDelay=2000&amp;move=.done&amp;knownHostsFile=c://known_host&amp;filter=#myAntFilter"/>
</camel:camelContext>


	<!-- we use the AntPathMatcherRemoteFileFilter to use ant paths for
includes and exlucde --> 	
	<bean id="myAntFilter"
class="org.apache.camel.component.file.AntPathMatcherGenericFileFilter">
	    <property name="includes" value="**/incoming/*.PDF,**/incoming/*.pdf"/>
	    <property name="excludes" value="**/outgoing/**"/>

	</bean>
[/code]

[code]
15 Apr 2010 10:17:57,077 ERROR [Camel thread 0: SftpComponent]
SftpConsumer.log(248) | Caused by:
[org.apache.camel.component.file.GenericFileOperationFailedException -
Cannot rename file from: user/incoming/test_file.pdf to:
test_file.pdf.camelExclusiveReadLock]
org.apache.camel.component.file.GenericFileOperationFailedException: Cannot
rename file from: user/incoming/test_file.pdf to:
test_file.pdf.camelExclusiveReadLock
	at
org.apache.camel.component.file.remote.SftpOperations.renameFile(SftpOperations.java:205)
	at
org.apache.camel.component.file.strategy.GenericFileRenameExclusiveReadLockStrategy.acquireExclusiveReadLock(GenericFileRenameExclusiveReadLockStrategy.java:68)
	at
org.apache.camel.component.file.strategy.GenericFileProcessStrategySupport.begin(GenericFileProcessStrategySupport.java:44)
	at
org.apache.camel.component.file.strategy.GenericFileRenameProcessStrategy.begin(GenericFileRenameProcessStrategy.java:38)
	at
org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:221)
	at
org.apache.camel.component.file.GenericFileConsumer.processBatch(GenericFileConsumer.java:137)
	at
org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:103)
	at
org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:106)
	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
	at java.util.concurrent.FutureTask$Sync.innerRunAndReset(Unknown Source)
	at java.util.concurrent.FutureTask.runAndReset(Unknown Source)
	at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(Unknown
Source)
	at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(Unknown
Source)
	at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown
Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
Caused by: 3: 
	at com.jcraft.jsch.ChannelSftp.throwStatusError(ChannelSftp.java:2287)
	at com.jcraft.jsch.ChannelSftp.rename(ChannelSftp.java:1479)
	at
org.apache.camel.component.file.remote.SftpOperations.renameFile(SftpOperations.java:202)
	... 16 more
[/code]
-- 
View this message in context: http://old.nabble.com/SFTP-rename-problems-tp28254146p28254146.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Mime
View raw message