Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
3.4k views
in Java FTP by
When I try to print the files that are located on a local FTPServer (Cerberus 2.22) I stumple upon the following problem:

I walk recursive through the directories. This is going just fine, except for one specific directory. When I try to list the files in this directory with the dirDetails() method I get an ArrayIndexOutOfBoundsException.

I've tried to rename the directory, but that doesn't help. I can't find anything odd about the directory, so I have no idea what the problem is and that is just the point. I need to be able to trust the functioning of the application that uses this method, so I really would like to know how I can avoid this problem.

I have printed the complete errormessage below:

Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 20
    at com.enterprisedt.net.ftp.FTPFileParser.split(FTPFileParser.java:106)
    at com.enterprisedt.net.ftp.UnixFileParser.parse(UnixFileParser.java:169)
    at com.enterprisedt.net.ftp.FTPFileFactory.parse(FTPFileFactory.java:233)
    at com.enterprisedt.net.ftp.FTPClient.dirDetails(FTPClient.java:1963)
    at ediretriever.Test.main(Test.java:29)


By the way, the dir method works fine, but is doesn't provide the functionality I'm looking for.

Does anyone have an idea on how I can solve this problem?

Oscar

By the way, I'm from Holland so there might be some poor English in the text above. I hope it is understandable

2 Answers

0 votes
by
I found a topic that describes pretty much the same problem. I was able to fix the problem by increasing the value of MAX_FIELDS in FTPFileParser.java

Oscar

By the way, I'm using edtFTPj 1.5.1 under Windows XP in combination with Java 1.5.0_03. The name of the problematic directory was: De beste nederpop (compleet)\CD2\
0 votes
by (162k points)
In the next release we'll up this value or maybe even remove it.

I found a topic that describes pretty much the same problem. I was able to fix the problem by increasing the value of MAX_FIELDS in FTPFileParser.java

Oscar

By the way, I'm using edtFTPj 1.5.1 under Windows XP in combination with Java 1.5.0_03. The name of the problematic directory was: De beste nederpop (compleet)\CD2\

Categories

...