Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
3.2k views
in Java FTP by (160 points)
I've recently discovered edtFTPj and I'm trying to use it in an application I'm developing. At first glance it looked very neat, but unfortunately I'm experiencing some trouble.

I've been trying to use v2.0.4 for downloading and uploading images to a test account. It would seem that edtFTPj and the FTP servers I've tried to work with do not play ball. Apparently edtFPTj expects different replies than the ones it gets (at least that's what I got from browsing the source lines that generated the errors).

Downloading image files works just fine, but uploading does not.

I've tried:
* FileZilla and Xlight FTP servers.
* Active and passive transfer modes.
* Uploading using a stream, and uploading a temporary file from disk.

Test class source code:
http://pastebin.com/m69949e35

Logs (with Xlight as server):

Active mode, using stream:
http://pastebin.com/m2558c043

Active mode, using temporary file:
http://pastebin.com/m67ae41a9

Passive mode, using stream:
http://pastebin.com/m751ef17b

Passive mode, using temporary file:
http://pastebin.com/m34af738c

Is it something I'm doing wrong? Or is edtFTPj not compatible with the servers I used? Which servers do work for everyone?

1 Answer

0 votes
by (160 points)
It seems I have solved the problem, and it was my own fault after all. :)

I was not closing the InputStream after reading the image. Now that I do, it appears to be working fine.

Categories

...