Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
7.3k views
in Java FTP by (220 points)
Hi

I'm getting this error

DEBUG [FTPControlSocket] 12 ene 2011 10:59:21.937 : 220 Microsoft FTP Service
DEBUG [FTPControlSocket] 12 ene 2011 10:59:21.937 : ---> USER XXXXX
DEBUG [FTPControlSocket] 12 ene 2011 10:59:22.078 : 331 Password required for XXXX.
DEBUG [FTPControlSocket] 12 ene 2011 10:59:22.093 : ---> PASS ********
DEBUG [FTPControlSocket] 12 ene 2011 10:59:22.234 : 230 User XXXXXX logged
in.
DEBUG [FTPControlSocket] 12 ene 2011 10:59:22.234 : ---> CWD imagenes
DEBUG [FTPControlSocket] 12 ene 2011 10:59:22.390 : 250 CWD command successful.
DEBUG [FTPControlSocket] 12 ene 2011 10:59:22.390 : ---> PWD
DEBUG [FTPControlSocket] 12 ene 2011 10:59:22.593 : 257 "/xxxxxx/imagenes"
is current directory.
DEBUG [FTPClient] 12 ene 2011 10:59:22.593 : Attempt #1
DEBUG [FTPControlSocket] 12 ene 2011 10:59:22.609 : ---> PASV
DEBUG [FTPControlSocket] 12 ene 2011 10:59:22.765 : 227 Entering Passive Mode (2
00,26,147,83,13,173)
INFO [FTPControlSocket] 12 ene 2011 10:59:22.765 : Substituting server supplied
IP (XXXXXX) with remote host IP (XXXXXX)
DEBUG [FTPControlSocket] 12 ene 2011 10:59:22.953 : ---> STOR imagenes
DEBUG [FTPControlSocket] 12 ene 2011 10:59:23.093 : 125 Data connection already
open; Transfer starting.
ERROR [FTPClient] 12 ene 2011 10:59:23.109 : Caught and rethrowing exception in
initPut() : Invalid reply code ' 12'
com.enterprisedt.net.ftp.MalformedReplyException: Invalid reply code ' 12'
at com.enterprisedt.net.ftp.FTPReply.validateCode(FTPReply.java:178)
at com.enterprisedt.net.ftp.FTPReply.<init>(FTPReply.java:99)
at com.enterprisedt.net.ftp.FTPControlSocket.readReply(FTPControlSocket.java:1120)
at com.enterprisedt.net.ftp.FTPControlSocket.sendCommand(FTPControlSocket.java:988)
at com.enterprisedt.net.ftp.FTPClient.initPut(FTPClient.java:2636)
at com.enterprisedt.net.ftp.FTPClient.putData(FTPClient.java:2700)
at com.enterprisedt.net.ftp.FTPClient.putStream(FTPClient.java:2439)
at com.enterprisedt.net.ftp.FTPClient.put(FTPClient.java:2407)
at com.enterprisedt.net.ftp.FTPClient.put(FTPClient.java:2368)
at com.enterprisedt.net.ftp.test.FTPClientTest2.main(FTPClientTest2.java
:48)


com.enterprisedt.net.ftp.MalformedReplyException: Invalid reply code ' 12'
at com.enterprisedt.net.ftp.FTPReply.validateCode(FTPReply.java:178)
at com.enterprisedt.net.ftp.FTPReply.<init>(FTPReply.java:99)
at com.enterprisedt.net.ftp.FTPControlSocket.readReply(FTPControlSocket.java:1120)
at com.enterprisedt.net.ftp.FTPControlSocket.sendCommand(FTPControlSocket.java:988)
at com.enterprisedt.net.ftp.FTPClient.initPut(FTPClient.java:2636)
at com.enterprisedt.net.ftp.FTPClient.putData(FTPClient.java:2700)
at com.enterprisedt.net.ftp.FTPClient.putStream(FTPClient.java:2439)
at com.enterprisedt.net.ftp.FTPClient.put(FTPClient.java:2407)
at com.enterprisedt.net.ftp.FTPClient.put(FTPClient.java:2368)
at com.enterprisedt.net.ftp.test.FTPClientTest2.main(FTPClientTest2.java:48)
DEBUG [FTPClient] 12 ene 2011 10:59:23.156 : Transferred 0 bytes to remote host
Caught exception: Invalid reply code ' 12'

After that on the server the files to be transferred are created but with 0 KBytes.

I also used FileZilla and command ftp (Microsoft FTP Service) on the same PC and the files are trasferred succesfully.


What could be the problem?

5 Answers

0 votes
by (162k points)
I can see a place in the code where this could happen - the server has an additional space before the reply code.

I've made a fix ... please email us at support at enterprisedt dot com for a new jar file. Will be tomorrow sometime before it arrives as it is COB in Australia now.
0 votes
by (220 points)
Hi


New JAR fixes the problem!!!!!


Tks
0 votes
by (162k points)
FYI we've released 3.6.1 which contains this fix.
0 votes
by (140 points)
Hi, jAlbum's founder here. We're using edtftpj-2.4.0.jar (the free edition). Doesn't that edition contain this fix? I have a user's ftp server that seemingly randomly returns odd reply codes.
0 votes
by (162k points)
Hi David

Yes, 2.4.0 has this fix. What reply codes are you getting? Can you post any logging?

Categories

...