Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
11.2k views
in Java FTP by (200 points)
Hello,

I think I have found a problem with edtFTPj/PRO and Java 7. The following test-code runs well under Java 6, but crash with Java 7:

<code>
ProFTPClient ftp = null;
Logger log = Logger.getLogger(CUtility.class);
Logger.setLevel(Level.ALL);

ftp = new ProFTPClient();
ftp.setRemoteHost(strHost);
ftp.connect();

FTPMessageCollector listener = new FTPMessageCollector();
ftp.setMessageListener(listener);

log.debug("Logging in");
ftp.login(strUser, strPass);

log.debug("Setting up passive");
ftp.setConnectMode(FTPConnectMode.PASV);

log.debug("ASCII transfers");
ftp.setType(FTPTransferType.ASCII);

log.debug("change Directory");
ftp.chdir(strPath);

// get directory and print it to console
log.debug("Directory (*.*):");

String[] files = ftp.dir("*.*", false);
for (int i = 0; i < files.length; i++)
{
log.debug(files[i]);
}

log.debug("Quitting client");
ftp.quit();
</code>


The command dir() throws the following exception:
com.enterprisedt.net.ftp.ControlChannelIOException: Connection reset
at com.enterprisedt.net.ftp.FTPControlSocket.e(FTPControlSocket.java:1041)
at com.enterprisedt.net.ftp.FTPControlSocket.b(FTPControlSocket.java:1076)
at com.enterprisedt.net.ftp.FTPControlSocket.sendCommand(FTPControlSocket.java:1000)
at com.enterprisedt.net.ftp.FTPControlSocket.createDataSocketPASV(FTPControlSocket.java:830)
at com.enterprisedt.net.ftp.pro.ProFTPControlSocket.createDataSocketPASV(ProFTPControlSocket.java:156)
at com.enterprisedt.net.ftp.FTPControlSocket.a(FTPControlSocket.java:586)
at com.enterprisedt.net.ftp.FTPClient.setupDataSocket(FTPClient.java:2646)
at com.enterprisedt.net.ftp.FTPClient.a(FTPClient.java:3662)
at com.enterprisedt.net.ftp.FTPClient.dir(FTPClient.java:3754)
at com.enterprisedt.net.ftp.FTPClient.dir(FTPClient.java:3634)

5 Answers

0 votes
by (162k points)
Hi

Can you please enable logging at the ALL level and email support@enterprisedt.com with the *zipped* log file?

thanks
0 votes
by (200 points)
Hi Bruce,

I have send the log file.

greetings and thanks for your help!

Olaf
0 votes
by (162k points)
We've resolved this problem. If you are on Windows it is the Windows firewall that is blocking Java 7 when it sees certain FTP commands being sent (PASV and PORT).

Normally, the Windows firewall prompts to add a newly installed program. But in this case it doesn't seem to happen - we aren't sure why.

To resolve the problem, go to Windows Firewall Settings, and in the Exceptions tab, choose "Add Program" to add java.exe by browsing to your installation of Java 7.
0 votes
by (200 points)
Hi,

it works :D

Thanks for your help!

Olaf
0 votes
by (51.6k points)
A bug report has been submitted to Sun/Oracle - http://bugs.sun.com/bugdatabase/view_bu ... id=7077696

Categories

...