DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=36473>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=36473

           Summary: [FTP] storeFile keeps returning false on XP only, stores
                    nothing to FTP server
           Product: Commons
           Version: 4.0
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: critical
          Priority: P2
         Component: Net
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: [EMAIL PROTECTED]


Windows JRE version: j2re-1_4_2_09-windows-i586-p.exe
Linux JRE version: j2re-1_4_2_05-linux-i586-rpm.bin

FTPClient.storeFile keeps consistently returning false on XP machines
(unservicepacked, SP1 and SP2) that are tested of being capable of FTPing using
a normal FTP client. The code under discussion is defined as an applet and
called from -within IE- in XP. All relevant applet permission restrictions have
been waived for the Windows JVM by putting 

permission java.security.AllPermission;

in java.policy on all concerned Windows XP machines.

The method works perfectly in Linux as an applet under Firefox, returning true
and storing the file to the FTP server. I have traced the apparent problem to
the following line in 

commons-net-1.4.0-src.tar.gz/
commons-net-1.4.0/src/java/org/apache/commons/net/ftp/FTPClient.java Line 388:

if ((socket = _openDataConnection_(FTPCommand.RETR, remote)) == null)
            return false;

This method returns false on XP, which eventually returns false thru the
storeFile method originating call. This happens only on Windows XP machines -
three different physical machines tested, against both a local and
internet-located FTP servers, with the JRE version given above. No exceptions
are raised, the calling method being located in relevant try...catch blocks.

Code Snippet of applet code causing error inside of IE on XP:

    public boolean uploadFile (String localFile, String serverFile) 
        throws IOException, FTPConnectionClosedException,CopyStreamException {
        FileInputStream in = new FileInputStream(localFile);            
        boolean result = storeFile(serverFile, in);
        in.close();
        return result;
    }

As stated, the above works on Linux, correctly transferring a file to the
server. However, on my test XP machines, the above keeps failing with false in
the boolean variable 'result', indicating that _openDataConnection_ failed in
creating a socket for the transfer.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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

Reply via email to