Where is it hanging?  What statement?

By the way, have you tried Commons VFS (or considered it) as a wrapper
around the Commons Net's FTP API?  It works great for us and it gives
you a common API to use across technologies (FTP, SFTP, WebDav, etc.).

On Fri, Jun 13, 2008 at 6:45 AM,  <[EMAIL PROTECTED]> wrote:
> Hi Thanks for replying,
>
>                                 Its not throwing any exception. Its not 
> executing the next statements because of deadlock. The system is getting 
> hanged.
>
> jwcarman wrote:
>>
>> What exactly are you having trouble with?  What is "not working on
>> linux"?  What behavior are you seeing?  Are you getting an exception?
>> If so, can you provide a stack trace, please.
>>
>> Also, some might consider it rude to append your message with
>> "solution to this.  I am in urgent need" (especially after only 2
>> minutes).
>>
>> On Fri, Jun 13, 2008 at 2:31 AM, Venkat Guru
>> <[EMAIL PROTECTED]> wrote:
>>>
>>> Hi friends,
>>>
>>> Iam using apache commons FTPClient (In "commons-net-1.4.1.jar" ). Iam
>>> using
>>> it to read files and write a file onto a FTP server.
>>>
>>> This class works fine in Windows environment, but its not working on
>>> linux (
>>> red hat linux) environment. The following snippet code is for reading a
>>> file
>>> on FTP. This piece of code results to deadlock situation at bolded code.
>>>
>>>
>>>
>>> FTPClient ftpclient = new FTPClient();
>>> ByteArrayOutputStream baos = null;
>>> ByteArrayInputStream bais = null;
>>> try {
>>> ftpclient.connect(ftpLocation.trim());
>>> // check reply code.
>>> if (!FTPReply.isPositiveCompletion(ftpclient.getReplyCode())) {
>>> ftpclient.disconnect();
>>> ;
>>> return null;
>>> } else {
>>> System.out.println("IN Positive Connection made; Reply code = "
>>> + ftpclient.getReplyCode());
>>> }
>>>
>>> ftpclient.login(ftpUserId.trim(), ftpPwd.trim());
>>> ftpclient.changeWorkingDirectory(strConfigDirectory.trim());
>>>
>>> baos = new ByteArrayOutputStream();
>>> ftpclient.retrieveFile(strConfigFileName.trim(), baos);
>>> bais = new ByteArrayInputStream(baos.toByteArray());
>>>
>>> ftpclient.logout();
>>> ftpclient.disconnect();
>>> } catch (IOException e) {
>>> e.getMessage();
>>> } catch (Exception e) {
>>> e.getMessage();
>>> }
>>>
>>>
>>> ---------------------
>>> Hi friends, did anyone face this kind of problem. Please provide me a
>>> solution to this. Iam in urgent need.
>>>
>>> Thanks in advance,
>>> Venkat
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Apache-Commons-FTPClient-not-wokring-in-Red-Hat-Linux-tp17816000p17816000.html
>>> Sent from the Commons - Dev mailing list archive at Nabble.com.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
> Quoted from:
> http://www.nabble.com/Apache-Commons-FTPClient-not-wokring-in-Red-Hat-Linux-tp17816000p17820662.html
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to