commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 36473] New: - [FTP] storeFile keeps returning false on XP only, stores nothing to FTP server
Date Fri, 02 Sep 2005 09:48:25 GMT
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: spamnot@polard.com


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: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message