You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Alexander Kjäll <al...@alatest.com> on 2008/03/12 12:48:04 UTC

commons net ftp list command

Hi

I have a small problem getting the org.apache.commons.net.ftp.FTPClient 
to work correctly.

I attached a small test case that showcases the problem on my linux 
system running jdk1.6.0_03 from sun.

The output from the program looks like this:

listing:
exit
connected

and as can be seen it seems to do some kind of exit on line 28, it never 
reaches the println statement on line 32.

If i sniff the network traffic for the connection i notice this exchange 
after the login (full dump attached as tcpdump.txt):

me: SYST
server: 215 UNIX Type: L8
me:
server: 500 OOPS:
server: vsf_sysutil_recv_peek: no data

What i feel is strange is that the ftp client doesn't send a PASV 
command and i can't see any LIST command either.

And if the ftp client recieves an error, shouldn't it throw an exception 
instead of exiting totally?

As I'm new to this library it could maybe be that i have missunderstood 
how to use it, in that case i would appreciate some hints on where to 
read up on the usage pattern i should have.

-- 
Alexander Kj�ll
Developer
alex@alatest.com


Re: commons net ftp list command

Posted by "harbir@efficacy.com.au" <ha...@efficacy.com.au>.
Hi, I am not sure if the following text is related to your issue, but 
still I will post it:

=============================================================

To whom it may engage...
        
This is an automated request, but not an unsolicited one. For 
more information please visit http://gump.apache.org/nagged.html, 
and/or contact the folk at general@gump.apache.org.

Project commons-net has an issue affecting its community integration.
This issue affects 40 projects,
 and has been outstanding for 6 runs.
The current state of this project is 'Failed', with reason 'Build Failed'.
For reference only, the following projects are affected by this:
    - antbook-diary-core :  Examples to go with Java Development with Ant
    - antbook-sections :  Examples to go with Java Development with Ant
    - apache-ldapber-provider :  Apache Directory Project
    - apacheds-core :  Apache Directory Server
    - apacheds-main :  Apache Directory Server
    - apacheds-shared :  Apache Directory Server
    - asn1-ber :  Apache ASN.1 Tools
    - asn1-codec :  Apache ASN.1 Tools
    - cddlm :  Configuration and Deployment of Grid Applications and System...
    - commons-net :  Commons Net
    - commons-vfs :  Apache Commons
    - commons-vfs-sandbox :  Apache Commons
    - excalibur-fortress-bean :  Repository of reusable components.
    - excalibur-fortress-container-impl :  Repository of reusable components.
    - excalibur-fortress-container-test :  Repository of reusable components.
    - excalibur-fortress-examples :  Repository of reusable components.
    - excalibur-fortress-migration :  Repository of reusable components.
    - excalibur-fortress-platform :  Repository of reusable components.
    - excalibur-fortress-testcase :  Repository of reusable components.
    - excalibur-monitor :  Repository of reusable components.
    - excalibur-sourceresolve :  Repository of reusable components.
    - excalibur-xmlutil :  Repository of reusable components.
    - ivy :  Ivy Core
    - ivy-tests :  Ivy is a tool for managing (recording, tracking, resolving a...
    - jakarta-jmeter-svn :  Pure Java load testing and performance measurement tool.
   ...
    - jakarta-jmeter-test :  Pure Java load testing and performance measurement tool.
   ...
    - kerberos-common :  Apache Directory Project
    - kerberos-protocol :  Apache Kerberos Server
    - ldap-common :  Apache Directory Project
    - ldap-protocol :  Apache Directory Server
    - ldap-snacc-provider :  Apache Directory Project
    - logging-log4j-chainsaw :  Chainsaw log viewer
    - maven-directory-plugin :  Apache Directory Server
    - mina :  A Multipurpose Infrastrusture for Network Applications
    - smartfrog :  Smartfrog: Application Deployment from HP Laboratories
    - smartfrog-components :  Smartfrog: Application Deployment from HP Laboratories
    - smartfrog-tasks :  Smartfrog: Application Deployment from HP Laboratories
    - smartfrog-tasks-test :  Smartfrog: Application Deployment from HP Laboratories
    - smartfrog-test :  Smartfrog: Application Deployment from HP Laboratories
    - smartfrog-testharness :  Smartfrog: Application Deployment from HP Laboratories


Full details are available at:
    http://vmgump.apache.org/gump/public/apache-commons/commons-net/index.html

That said, some information snippets are provided here.

The following annotations (debug/informational/warning/error messages) were provided:
 -DEBUG- Sole output [commons-net-12032008.jar] identifier set to project name
 -INFO- Made directory [/srv/gump/public/workspace/apache-commons/net/target/classes]
 -INFO- Made directory [/srv/gump/public/workspace/apache-commons/net/target/test-classes]
 -INFO- Failed with reason build failed
 -INFO- Failed to extract fallback artifacts from Gump Repository



The following work was performed:
http://vmgump.apache.org/gump/public/apache-commons/commons-net/gump_work/build_apache-commons_commons-net.html
Work Name: build_apache-commons_commons-net (Type: Build)
Work ended in a state of : Failed
Elapsed: 1 min 15 secs
Command Line: /usr/lib/jvm/java-1.5.0-sun/bin/java -Djava.awt.headless=true -Dant.build.clonevm=true -Xbootclasspath/p:/srv/gump/public/workspace/xml-xerces2/build/xercesImpl.jar:/srv/gump/public/workspace/xml-commons/java/external/build/xml-apis.jar org.apache.tools.ant.Main -Dgump.merge=/srv/gump/public/gump/work/merge.xml -Dbuild.sysclasspath=only -Dfinal.name=commons-net-12032008 dist 
[Working Directory: /srv/gump/public/workspace/apache-commons/net]
CLASSPATH: /usr/lib/jvm/java-1.5.0-sun/lib/tools.jar:/srv/gump/public/workspace/apache-commons/net/target/classes:/srv/gump/public/workspace/apache-commons/net/target/test-classes:/srv/gump/public/workspace/ant/dist/lib/ant-jmf.jar:/srv/gump/public/workspace/ant/dist/lib/ant-swing.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-resolver.jar:/srv/gump/public/workspace/ant/dist/lib/ant-trax.jar:/srv/gump/public/workspace/ant/dist/lib/ant-junit.jar:/srv/gump/public/workspace/ant/dist/lib/ant-launcher.jar:/srv/gump/public/workspace/ant/dist/lib/ant-nodeps.jar:/srv/gump/public/workspace/ant/dist/lib/ant.jar:/srv/gump/packages/junit3.8.1/junit.jar:/srv/gump/public/workspace/xml-commons/java/build/resolver.jar:/srv/gump/public/workspace/xml-commons/java/external/build/xml-apis-ext.jar:/srv/gump/public/workspace/jakarta-oro/jakarta-oro-12032008.jar:/srv/gump/public/workspace/junit/dist/junit-12032008.jar
---------------------------------------------
    [junit] 
    [junit] Testcase: testConstructors took 0.008 sec
    [junit] Testcase: testStartSubnegotiation took 0.001 sec
    [junit] Testcase: testAnswerSubnegotiation took 0 sec
    [junit] Testcase: testWill took 0.001 sec
    [junit] Testcase: testDo took 0.001 sec
    [junit] Running org.apache.commons.net.telnet.TelnetClientTest
    [junit] Testsuite: org.apache.commons.net.telnet.TelnetClientTest
    [junit] Tests run: 8, Failures: 0, Errors: 0, Time elapsed: 44.331 sec
    [junit] Tests run: 8, Failures: 0, Errors: 0, Time elapsed: 44.331 sec
    [junit] 
    [junit] Testcase: testInitial took 5.172 sec
    [junit] Testcase: testOptionNegotiation took 9.096 sec
    [junit] Testcase: testOptionRenegotiation took 5.068 sec
    [junit] Testcase: testNotification took 4.57 sec
    [junit] Testcase: testDeleteOptionHandler took 5.069 sec
    [junit] Testcase: testAYT took 5.068 sec
    [junit] Testcase: testSpy took 5.07 sec
    [junit] Testcase: testSetReaderThread took 5.068 sec
    [junit] Running org.apache.commons.net.telnet.TelnetOptionTest
    [junit] Testsuite: org.apache.commons.net.telnet.TelnetOptionTest
    [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.163 sec
    [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.163 sec
    [junit] 
    [junit] Testcase: testisValidOption took 0.02 sec
    [junit] Testcase: testGetOption took 0.002 sec
    [junit] Running org.apache.commons.net.telnet.TerminalTypeOptionHandlerTest
    [junit] Testsuite: org.apache.commons.net.telnet.TerminalTypeOptionHandlerTest
    [junit] Tests run: 5, Failures: 0, Errors: 0, Time elapsed: 0.135 sec
    [junit] Tests run: 5, Failures: 0, Errors: 0, Time elapsed: 0.135 sec
    [junit] 
    [junit] Testcase: testConstructors took 0.007 sec
    [junit] Testcase: testStartSubnegotiation took 0 sec
    [junit] Testcase: testAnswerSubnegotiation took 0 sec
    [junit] Testcase: testWill took 0.001 sec
    [junit] Testcase: testDo took 0.001 sec
    [junit] Running org.apache.commons.net.time.TimeTCPClientTest
    [junit] Testsuite: org.apache.commons.net.time.TimeTCPClientTest
    [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 1.187 sec
    [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 1.187 sec
    [junit] 
    [junit] Testcase: testInitial took 0.007 sec
    [junit] Testcase: testCompareTimes took 1.052 sec

test:

BUILD FAILED
/srv/gump/public/workspace/apache-commons/net/build.xml:87: There were test failures.

Total time: 1 minute 14 seconds
---------------------------------------------

To subscribe to this information via syndicated feeds:
- RSS: http://vmgump.apache.org/gump/public/apache-commons/commons-net/rss.xml
- Atom: http://vmgump.apache.org/gump/public/apache-commons/commons-net/atom.xml

============================== Gump Tracking Only ===
Produced by Gump version 2.3.
Gump Run 12010012032008, vmgump:vmgump-public:12010012032008
Gump E-mail Identifier (unique within run) #10.

--
Apache Gump
http://gump.apache.org/ [Instance: vmgump]




==============================================================

Alexander Kjäll wrote:
>
> Hi
>
> I have a small problem getting the 
> org.apache.commons.net.ftp.FTPClient to work correctly.
>
> I attached a small test case that showcases the problem on my linux 
> system running jdk1.6.0_03 from sun.
>
> The output from the program looks like this:
>
> listing:
> exit
> connected
>
> and as can be seen it seems to do some kind of exit on line 28, it 
> never reaches the println statement on line 32.
>
> If i sniff the network traffic for the connection i notice this 
> exchange after the login (full dump attached as tcpdump.txt):
>
> me: SYST
> server: 215 UNIX Type: L8
> me:
> server: 500 OOPS:
> server: vsf_sysutil_recv_peek: no data
>
> What i feel is strange is that the ftp client doesn't send a PASV 
> command and i can't see any LIST command either.
>
> And if the ftp client recieves an error, shouldn't it throw an 
> exception instead of exiting totally?
>
> As I'm new to this library it could maybe be that i have 
> missunderstood how to use it, in that case i would appreciate some 
> hints on where to read up on the usage pattern i should have.
>
> ------------------------------------------------------------------------
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org