You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Raffaele Spazzoli <rs...@imolinfo.it> on 2006/05/25 12:19:01 UTC

ftp sender creates 0 byte lenght files

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) |
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1@1a791f dequeued
exchange: org.apache.servicemix.jbi.messaging.InOnlyImpl@5da37c
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) |
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1@15863e4 dequeued
exchange: org.apache.servicemix.jbi.messaging.InOnlyImpl@6270b
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. 




Re: ftp sender creates 0 byte lenght files

Posted by Guillaume Nodet <gn...@gmail.com>.
You should try to build servicemix with maven2.
See http://servicemix.goopen.org/site/building.html
Else if you have the code, you can still associate the code to the jar from
within your IDE.
If you have a reproducible bug, please raise a JIRA, and if you can find the
problem,
attach a patch :)

Cheers,
Guillaume Nodet

On 5/25/06, Raffaele Spazzoli <rs...@imolinfo.it> wrote:
>
> 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) |
> org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1@1a791f dequeued
> exchange: org.apache.servicemix.jbi.messaging.InOnlyImpl@5da37c
> 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) |
> org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1@15863e4 dequeued
> exchange: org.apache.servicemix.jbi.messaging.InOnlyImpl@6270b
> 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.
>
>
>
>