commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wade Chandler <wchand...@redesetgrow.com>
Subject Re: [net] Some FTP servers causing ParserInitializationException.
Date Wed, 15 Dec 2004 18:58:09 GMT
Shaan wrote:
> 
> Hi,
> 
>                I am new to this forum as well as to this software. I was
> trying my attached code with multiple of FTP servers. I don't know, after
> connecting to some of FTP servers, I receive following exception when i use
> ftp.listFiles() method.
> 
> 
> 
> =============================================================================
> 
> 
> org.apache.commons.net.ftp.parser.ParserInitializationException: Error
> initializing parser
> 
>         at org.apache.commons.net.ftp.parser
> DefaultFTPFileEntryParserFactory
> createFileEntryParser(DefaultFTPFileEntryParserFactory.java:115)
> 
>         at org.apache.commons.net.ftp.FTPClient
> initiateListParsing(FTPClient.java:2306)
> 
>         at org.apache.commons.net.ftp.FTPClient.listFiles(FTPClient
> java:2055)
> 
>         at org.apache.commons.net.ftp.FTPClient.listFiles(FTPClient
> java:2106)
> 
>         at FTPTrial.main(FTPTrial.java:47)
> 
> Error :org.apache.commons.net.ftp.parser.ParserInitializationException:
> Error initializing parser
> 
> =============================================================================
> 
> 
> 
> 
> 
> 
> I am attaching my code, its very simple.  
> 
> 
> 
> I have noticed one thing, if ftp.getSystemName() method returns "null", then
> only i receive this error, otherwise my code works fine.
> 
> 
> 
> 
> 
> Need to have pointer, where I am going wrong.
> 
> 
> 
> Thanks and regards,
> 
> Shahnaz Ali.
> 
> 
> ------------------------------------------------------------------------
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org

Are you trying to access the same type of ftp servers?  It's been a 
while since I had to change my code and read the docs, but you should 
notice in the documentation a note about the listFiles method and using 
globs (I think).  It talks about differences between servers.  Me, I had 
an issue with Windows servers when I tried to use the NT parser.  I 
changed it to use the unix parser and it worked.  Basically it boils 
down to the formatting of the list information when you have issues with 
that call and you use a glob or an * in your name.  Is this what you are 
doing?

Wade


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message