Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
31.7k views
in Java FTP by
Hello there,

if I'm listing directories with a large amount of files (here about 2000 files) by using

FTPFile[] files = ftp_client.dirDetails(".")


I get an ArrayIndexOutOfBoundsException =(

With smaller directories, there is no problem.

Someone has a suggestion to solve this?

Thank you

David

38 Answers

0 votes
by (161k points)
the next release will include the listing line in the exception

with a debugger you could maybe know for which file it occurs. or simply add a writeline of the current processed string ?

or you could send a zip file with "ls > output" content and then the support will have to recreate the dir with a "touch script" for e.g ...
0 votes
by (161k points)
1.4.4 is now released which fixes the problems in this thread.

http://www.enterprisedt.com/products/ed ... rview.html
0 votes
by
I'm getting the same problem, only it's with the new fix...

--------------------------------------------------------------

java.lang.ArrayIndexOutOfBoundsException: 20
at com.enterprisedt.net.ftp.FTPFileParser.split(FTPFileParser.java:84)
at com.enterprisedt.net.ftp.UnixFileParser.parse(UnixFileParser.java:118)
at com.enterprisedt.net.ftp.FTPFileFactory.parse(FTPFileFactory.java:159)
at com.enterprisedt.net.ftp.FTPClient.dirDetails(FTPClient.java:1735)
at FTP.clearRemote(FTP.java:147)
at RemoteBackup$1.construct(RemoteBackup.java:100)
at SwingWorker$2.run(SwingWorker.java:106)
at java.lang.Thread.run(Unknown Source)

--------------------------------------------------------------
0 votes
by (161k points)
There's such a variety of FTP servers that it will take a while make sure it works for them all. Can you isolate a listing that demonstrates the problem and post it? Thanks.

I'm getting the same problem, only it's with the new fix...
0 votes
by
I was uploading files with a lot of spaces in the names. So, now it takes the spaces out before uploading. Problem solved... or averted... or something.
0 votes
by (460 points)
Hi there,
The issue we used to have when connecting to Unix servers we now have when connecting to Windows servers.

Stack trace: java.text.ParseException: Unexpected number of fields: 0
        at com.enterprisedt.net.ftp.WindowsFileParser.parse (WindowsFileParser.java:87)
        at com.enterprisedt.net.ftp.FTPFileFactory.parse(FTPFileFactory.java:169)
        at com.enterprisedt.net.ftp.FTPClient.dirDetails(FTPClient.java:1726)
        ...(snip) 


The file listing:
-rwxr-x---  1 f_simon  users      139264 Sep 23 01:51 20040922.srv
-rwxr-x---  1 f_simon  users      138752 Sep 24 01:56 20040923.srv
-rwxr-x---  1 f_simon  users      139264 Sep 25 01:47 20040924.srv
-rwxr-x---  1 f_simon  users      139264 Sep 28 01:57 20040927.srv
-rwxr-x---  1 f_simon  users      138752 Sep 29 01:50 20040928.srv
-rwxr-x---  1 f_simon  users      139264 Sep 30 01:58 20040929.srv
-rwxr-x---  1 f_simon  users      139264 Oct  1 02:14 20040930.srv
-rwxr-x---  1 f_simon  users      138240 Oct  2 01:50 20041001.srv
-rwxr-x---  1 f_simon  users      139264 Sep 23 01:51 p16a0720040922.srv
-rwxr-x---  1 f_simon  users      138752 Sep 24 01:56 p16a0720040923.srv
-rwxr-x---  1 f_simon  users      139264 Sep 25 01:47 p16a0720040924.srv
-rwxr-x---  1 f_simon  users      139264 Sep 28 01:57 p16a0720040927.srv
-rwxr-x---  1 f_simon  users      138752 Sep 29 01:51 p16a0720040928.srv
-rwxr-x---  1 f_simon  users      139264 Sep 30 01:59 p16a0720040929.srv
-rwxr-x---  1 f_simon  users      139264 Oct  1 02:15 p16a0720040930.srv
-rwxr-x---  1 f_simon  users      138240 Oct  2 01:51 p16a0720041001.srv

________
WORLD RALLY TEAM
0 votes
by (460 points)
Additionally, we are running the 1.4.4 version (latest available) with J2SDK 1.4.2_03
________
A ride for cinderella
0 votes
by (161k points)
We'll take a look - the Windows parser probably needs the same fix as the Unix parser.

Gradually, they are becoming compatible with more & more servers!

If you email us, we'll send you a fix to test out (do we have it already??).

Additionally, we are running the 1.4.4 version (latest available) with J2SDK 1.4.2_03
0 votes
by (460 points)
If correct, my email is in your possession. To avoid any issues, I send you a mail yesterday stating the address. Thanks.
________
Coach handbags
0 votes
by (460 points)
Hi again. Sorry to bother you at this frequency, but have you been able to solve the issue with the parser on Windows? I have not yet found it in the history list, so can I assume you are still working on it?
If I can do anything to assist, please let me know.

Chris Schuit
________
BIG BROTHER FORUMS

Categories

...