Showing posts with label ftpclient. Show all posts
Showing posts with label ftpclient. Show all posts

Sep 18, 2011

FTPClient completePendingCommand() deadlock stuck freeze

It's strange, that this method hangs or freeze for this method.

I used commons-net 2.2v, don't know if it already solved at 3v. But, i have found that my problem was:
Executing this method before closing the input stream.
Switching them, first closing the input stream and then running completePendingCommand() solved the issue.
+
There are some cases where this method isn't really necessary, beware.

Hoped it helped,
Dor

Nov 23, 2010

ParserInitializationException: Error initializing parser

Using apache commons net,
If you are trying to connect using FtpClient but it fails with the above exception.
Try this solution:
FTPClientConfig ftpClientConfig = new FTPClientConfig(FTPClientConfig.SYST_UNIX);
ftpClient.configure(ftpClientConfig);
FTPClientConfig constant list includes many types. For me, this type works.
Dor