Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
4.7k views
in Java FTP by (160 points)
Im seeing a lot of these errors in our server log that look like they're coming from EDT code.

Any idea why we're getting them? Can someone shed some light...

java.lang.StringIndexOutOfBoundsException: String index out of range: -27
   at java.lang.String.substring(Unknown Source)
   at com.enterprisedt.net.ftp.FTPControlSocket.D(FTPControlSocket.class:0)
   at com.enterprisedt.net.ftp.FTPControlSocket.createDataSocketPASV(FTPControlSocket.class:0)
   at com.enterprisedt.net.ftp.FTPControlSocket.A(FTPControlSocket.class:0)
   at com.enterprisedt.net.ftp.FTPClient.setupDataSocket(FTPClient.class:0)
   at com.enterprisedt.net.ftp.FTPClient.initGet(FTPClient.class:0)
   at com.enterprisedt.net.ftp.FTPClient.B(FTPClient.class:0)
   at com.enterprisedt.net.ftp.FTPClient.A(FTPClient.class:0)
   at com.enterprisedt.net.ftp.FTPClient.get(FTPClient.class:0)
   at com.cypherit.bbrad.server.jobs.FTPThread.run(FTPThread.java:894)


Line 894 of FTPThread.java is
ftp.get( currentPathname.getAbsolutePath(), currentFile.getName() );
ftp is an instance of FTPClient

Sometimes everything works fine and other times we get the above exception.

Many Thanks[/code]

2 Answers

0 votes
by (51.6k points)
It looks like the server is sending an unusual reply to the PASV message. Could you please enable EDT logging (if you haven't already done so) and post the relevant part of the log-file in your reply?

import com.enterprisedt.util.debug;
.
.
.
Logger.addFileAppender("ftp.log");
setLevel(Level.DEBUG);


- Hans (EnterpriseDT)
0 votes
by (160 points)
Okay I'll enable the logging and get it posted up as soon as possible.

It might take a few days though.
Thanks.

Categories

...