[VFS] Why do I get "FileSystemException: Could not determine the type of file" ?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[VFS] Why do I get "FileSystemException: Could not determine the type of file" ?

J-Pro
  Good afternoon, dear VFS gurus!

I am currently testing FTPS from vfs-2.0-snapshot and I've managed to
successfully connect to FTPS server, but when I try to check if a file
exists, I'm getting an exception with strange message:

    *org.apache.commons.vfs.FileSystemException: Could not determine the
    type of file*
    "ftps://193.44.23.12:9001/archive/,AMCPROD,derivative_pricing_ssb_cds_20100910_00.xml.pgp,U,20100910A00012022189.txt".
         at
    org.apache.commons.vfs.provider.AbstractFileObject.getType(AbstractFileObject.java:476)
         at
    org.apache.commons.vfs.provider.AbstractFileObject.exists(AbstractFileObject.java:448)

My code for checking if the file exists is:

    FileObject dir = null;
    String fileName =
    ",AMCPROD,derivative_pricing_ssb_cds_20100910_00.xml.pgp,U,20100910A00012022189.txt";
    // .... dir initialization
    FileObject neededFile = dir.resolveFile(fileName);
    return neededFile.exists();

I must say this code works perfect for FTP and SFTP. The problem appears
only with FTPS.

Maybe I've forgot to do something(like enter in passive mode or
something else), or is it a bug in this FTPS
patch(https://issues.apache.org/jira/browse/VFS-264)?

Please advise, it's very important for me.

Thank you very much in advance!


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [VFS] Why do I get "FileSystemException: Could not determine the type of file" ?

J-Pro
I'm sorry, I've forgot to add which was the cause of this exception,
maybe it will be useful:

Caused by:
org.apache.commons.net.ftp.parser.ParserInitializationException: Parser
key cannot be null
    at
org.apache.commons.net.ftp.parser.DefaultFTPFileEntryParserFactory.createFileEntryParser(DefaultFTPFileEntryParserFactory.java:82)
    at
org.apache.commons.net.ftp.FTPClient.initiateListParsing(FTPClient.java:2263)
    at org.apache.commons.net.ftp.FTPClient.listFiles(FTPClient.java:2046)
    at
org.apache.commons.vfs.provider.ftps.FtpsClientWrapper.listFiles(FtpsClientWrapper.java:116)
    at
org.apache.commons.vfs.provider.ftp.FtpFileObject.doGetChildren(FtpFileObject.java:140)
    at
org.apache.commons.vfs.provider.ftp.FtpFileObject.getChildFile(FtpFileObject.java:110)
    at
org.apache.commons.vfs.provider.ftp.FtpFileObject.getInfo(FtpFileObject.java:198)
    at
org.apache.commons.vfs.provider.ftp.FtpFileObject.doGetType(FtpFileObject.java:321)
    at
org.apache.commons.vfs.provider.AbstractFileObject.getType(AbstractFileObject.java:467)

I hope it will help you to solve this problem. I think it's a bug in
FTPS implementation.

Thanks.

J-Pro wrote:

>  Good afternoon, dear VFS gurus!
>
> I am currently testing FTPS from vfs-2.0-snapshot and I've managed to
> successfully connect to FTPS server, but when I try to check if a file
> exists, I'm getting an exception with strange message:
>
>    *org.apache.commons.vfs.FileSystemException: Could not determine the
>    type of file*
>    
> "ftps://193.44.23.12:9001/archive/,AMCPROD,derivative_pricing_ssb_cds_20100910_00.xml.pgp,U,20100910A00012022189.txt".
>
>         at
>    
> org.apache.commons.vfs.provider.AbstractFileObject.getType(AbstractFileObject.java:476)
>
>         at
>    
> org.apache.commons.vfs.provider.AbstractFileObject.exists(AbstractFileObject.java:448)
>
>
> My code for checking if the file exists is:
>
>    FileObject dir = null;
>    String fileName =
>    
> ",AMCPROD,derivative_pricing_ssb_cds_20100910_00.xml.pgp,U,20100910A00012022189.txt";
>
>    // .... dir initialization
>    FileObject neededFile = dir.resolveFile(fileName);
>    return neededFile.exists();
>
> I must say this code works perfect for FTP and SFTP. The problem
> appears only with FTPS.
>
> Maybe I've forgot to do something(like enter in passive mode or
> something else), or is it a bug in this FTPS
> patch(https://issues.apache.org/jira/browse/VFS-264)?
>
> Please advise, it's very important for me.
>
> Thank you very much in advance!
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]