You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by rience <mr...@gmail.com> on 2006/12/13 14:09:29 UTC

FTPSender and multiple files

Hi,

My scenario is simple - monitor (using FilePoller) some directory. If a file
shows up - then FTP this file to server. The problem is that sending of
first file is ok, however, for next files there is something wrong. File is
created on FTP server but without size (size: 0).

I figured out that I'm getting an exception "No output stream available for
output name: " + name + ". Maybe the file already exists?". However, I'm
sure that filename is unique.

The reason of that could be a fact that FTPSender is using object pool for
commons.net.FTPClient. Looking at API for FTPClient I saw that after each
operation it should be closed and opened again.

Do you have any idea how that can be configured ?
-- 
View this message in context: http://www.nabble.com/FTPSender-and-multiple-files-tf2813870s12049.html#a7852452
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: FTPSender and multiple files

Posted by rience <mr...@gmail.com>.
I already did.

http://issues.apache.org/activemq/browse/SM-775


gnodet wrote:
> 
> Could you please raise a JIRA for that ?
> 
> On 12/13/06, rience <mr...@gmail.com> wrote:
>>
>> Me again. I think I've found a reason of this behavior. When looking at
>> FTPSender.process() method I see that after OutputStream is closed there
>> is
>> no FTPClient.completePendingCommand() method invoked.
>>
>> Looking at commons.net documentation
>> (http://jakarta.apache.org/commons/net/api/org/apache/commons/net/ftp/FTPClient.html#completePendingCommand())
>> I saw that this should be invoked.
>>
>> Because there is pending operation - socket is not created for second
>> file.
>>
>>
>>
>> rience wrote:
>> >
>> > Hi,
>> >
>> > My scenario is simple - monitor (using FilePoller) some directory. If a
>> > file shows up - then FTP this file to server. The problem is that
>> sending
>> > of first file is ok, however, for next files there is something wrong.
>> > File is created on FTP server but without size (size: 0).
>> >
>> > I figured out that I'm getting an exception "No output stream available
>> > for output name: " + name + ". Maybe the file already exists?".
>> However,
>> > I'm sure that filename is unique.
>> >
>> > The reason of that could be a fact that FTPSender is using object pool
>> for
>> > commons.net.FTPClient. Looking at API for FTPClient I saw that after
>> each
>> > operation it should be closed and opened again.
>> >
>> > Do you have any idea how that can be configured ?
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/FTPSender-and-multiple-files-tf2813870s12049.html#a7855068
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> -- 
> Cheers,
> Guillaume Nodet
> 
> 

-- 
View this message in context: http://www.nabble.com/FTPSender-and-multiple-files-tf2813870s12049.html#a7855671
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: FTPSender and multiple files

Posted by Guillaume Nodet <gn...@gmail.com>.
Could you please raise a JIRA for that ?

On 12/13/06, rience <mr...@gmail.com> wrote:
>
> Me again. I think I've found a reason of this behavior. When looking at
> FTPSender.process() method I see that after OutputStream is closed there is
> no FTPClient.completePendingCommand() method invoked.
>
> Looking at commons.net documentation
> (http://jakarta.apache.org/commons/net/api/org/apache/commons/net/ftp/FTPClient.html#completePendingCommand())
> I saw that this should be invoked.
>
> Because there is pending operation - socket is not created for second file.
>
>
>
> rience wrote:
> >
> > Hi,
> >
> > My scenario is simple - monitor (using FilePoller) some directory. If a
> > file shows up - then FTP this file to server. The problem is that sending
> > of first file is ok, however, for next files there is something wrong.
> > File is created on FTP server but without size (size: 0).
> >
> > I figured out that I'm getting an exception "No output stream available
> > for output name: " + name + ". Maybe the file already exists?". However,
> > I'm sure that filename is unique.
> >
> > The reason of that could be a fact that FTPSender is using object pool for
> > commons.net.FTPClient. Looking at API for FTPClient I saw that after each
> > operation it should be closed and opened again.
> >
> > Do you have any idea how that can be configured ?
> >
>
> --
> View this message in context: http://www.nabble.com/FTPSender-and-multiple-files-tf2813870s12049.html#a7855068
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>


-- 
Cheers,
Guillaume Nodet

Re: FTPSender and multiple files

Posted by rience <mr...@gmail.com>.
Me again. I think I've found a reason of this behavior. When looking at
FTPSender.process() method I see that after OutputStream is closed there is
no FTPClient.completePendingCommand() method invoked.

Looking at commons.net documentation
(http://jakarta.apache.org/commons/net/api/org/apache/commons/net/ftp/FTPClient.html#completePendingCommand())
I saw that this should be invoked.

Because there is pending operation - socket is not created for second file.



rience wrote:
> 
> Hi,
> 
> My scenario is simple - monitor (using FilePoller) some directory. If a
> file shows up - then FTP this file to server. The problem is that sending
> of first file is ok, however, for next files there is something wrong.
> File is created on FTP server but without size (size: 0).
> 
> I figured out that I'm getting an exception "No output stream available
> for output name: " + name + ". Maybe the file already exists?". However,
> I'm sure that filename is unique.
> 
> The reason of that could be a fact that FTPSender is using object pool for
> commons.net.FTPClient. Looking at API for FTPClient I saw that after each
> operation it should be closed and opened again.
> 
> Do you have any idea how that can be configured ?
> 

-- 
View this message in context: http://www.nabble.com/FTPSender-and-multiple-files-tf2813870s12049.html#a7855068
Sent from the ServiceMix - User mailing list archive at Nabble.com.