commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Fortner <>
Subject Re: [vfs] Out of Memory Exception when making an SFTP connection
Date Wed, 01 Feb 2006 19:29:22 GMT
I don't explicitly use a FileCache.  But I do use VFS.getManager(), so 
it must be creating a cache automatically.  I resolve the file like this:

        FileSystemManager fsManager;
        FileObject file = null;
        fsManager = VFS.getManager();
        file = fsManager.resolveFile( url );

I use the FileObject to get a list of the children which initializes a 
Vector in a table model.  The list of files is fairly small though, so 
it shouldn't be running out of memory.

I've been running this through Eclipse, and also in stand alone mode and 
I've allocated 512Mb of memory, but I'm still running out of memory.


Mario Ivankovits wrote:
> Hi Mark!
>> My question is, are there configuration settings, or other parameters
>> that I must use to access the SFTP directory?  The documentation is a
>> little light on examples.  Currently, all I'm doing is resolving the
>> URL to a FileObject and then getting all children of that directory. 
>> The URL I'm using follows the pattern specified in the documentation. 
>> (i.e. "s" ).
> Sounds good, there isnt much additional magic.
> Do you use set a FilesCache? You should use the VFS default. You do this
> if you simply use VFS.getManager().
> Do you hold a list to the resolved FileObjects somewhere around? So that
> VFS cant release the memory.
> At least maybe SFTP needs a little more memory (dont know) so you could
> try to add the -Xmx parameter to the java command.
> Ciao,
> Mario
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message