Hi,
I have an FTPSender components that receives multiple invocation.
The first file transfer seem to go well, the following file transfers
create a 0 byte lenght file. If try to remove the files but they are
locked, as if the connection has not been closed.
Raising the log levels I found this exception:
DEBUG - AbstractFlow.doRouting(165) | Called Flow doRouting
DEBUG - SedaQueue$1.run(219) |
[EMAIL PROTECTED] dequeued
exchange: [EMAIL PROTECTED]
DEBUG - AbstractFlow.doRouting(165) | Called Flow doRouting
DEBUG - OutBinding.onMessageExchange(52) | Exchange failed
java.io.IOException: No output stream available for output name:
esempio.xml. Maybe the file already exists?
at
org.apache.servicemix.components.net.FTPSender.process(FTPSender.java:122)
at
org.apache.servicemix.components.util.OutBinding.onMessageExchange(OutBinding.java:48)
at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:636)
at
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:171)
at org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue
$1.run(SedaQueue.java:221)
at
org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.java:291)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor
$Worker.run(Unknown Source)
at java.lang.Thread.run(Thread.java:595)
DEBUG - AbstractFlow.send(116) | Called Flow send
DEBUG - SedaQueue$1.run(219) |
[EMAIL PROTECTED] dequeued
exchange: [EMAIL PROTECTED]
DEBUG - AbstractFlow.doRouting(165) | Called Flow doRouting
looking at the code seems that the exception is raised if the FTPSender
is not able to correctly create the file on the ftp server. Unlukily the
underlying reason of the problem is not logged.
I'm not able to build servicemix with maven so I can't do further
debugging, so I had a look at the FTPClient API form commons-net, one
thing stroke me: the documentation says that to correclty ends a flie
transfer one should call the completePendingCommand method. This method
seems not to be called bye the FTPSender. I cannot say much further, my
guess is that not finalizing correclty the firts call and reusing the
same connection taken by the connection pool, causes the creation of the
following file to abort.
Do you have any soggestion on how to debug deeper or how to force the
connection pool to give every time a newly created connection ?
thaks
bye.