commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "oliver zemann (JIRA)" <j...@apache.org>
Subject [jira] Created: (NET-247) NullPointerException after connect() in FTPClient
Date Sun, 28 Dec 2008 11:23:44 GMT
NullPointerException after connect() in FTPClient
-------------------------------------------------

                 Key: NET-247
                 URL: https://issues.apache.org/jira/browse/NET-247
             Project: Commons Net
          Issue Type: Bug
    Affects Versions: 2.0
         Environment: Linux lucymobile 2.6.28-3-generic #4-Ubuntu SMP Fri Dec 12 22:48:15
UTC 2008 i686 GNU/Linux
Netbeans IDE 6.5
java version "1.6.0_0"
IcedTea6 1.4 (6b14-0ubuntu4) Runtime Environment (build 1.6.0_0-b14)
OpenJDK Server VM (build 14.0-b08, mixed mode)

            Reporter: oliver zemann


ftpClient = new FtpClient();
ftpClient.connect("ftp.mozilla.org", Integer.parseInt(textPort.getText()));
System.out.print(ftpClient.getReplyString()); //returns null
System.out.print(ftpClient.getReplyCode()); //returns 0
ftpClient.login("anonymous", "blah@blah.ch"); //NullPointerException

when i use these values in lftp i get:
oli@lucymobile:~$ lftp 
lftp :~> open ftp.mozilla.org
lftp ftp.mozilla.org:~> USER anonymous blah@blah.ch
lftp anonymous@ftp.mozilla.org:~> ls
-rw-r--r--    1 ftp      ftp           528 Nov 01  2007 README
-rw-r--r--    1 ftp      ftp           560 Sep 28  2007 index.html
drwxr-xr-x   33 ftp      ftp          4096 Aug 12 04:00 pub
/* same happens when i try  with my application to connect to localhost (vsftpd):
Sun Dec 28 11:44:32 2008 [pid 12840] CONNECT: Client "127.0.0.1"
then it stops logging because the application returns the exception */

the complete output of the application:
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
        at org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:471)
        at org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:534)
        at wicked.FtpClient.user(FtpClient.java:74)
        at wicked.FtpClient.login(FtpClient.java:58)
        at wicked.MainWindow.buttonTestFTPServerActionPerformed(MainWindow.java:887)
        at wicked.MainWindow.access$1300(MainWindow.java:35)
        at wicked.MainWindow$14.actionPerformed(MainWindow.java:417)
        at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2012)
        at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2335)
        at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:404)
        at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
        at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:253)
        at java.awt.Component.processMouseEvent(Component.java:6108)
        at javax.swing.JComponent.processMouseEvent(JComponent.java:3276)
        at java.awt.Component.processEvent(Component.java:5873)
        at java.awt.Container.processEvent(Container.java:2105)
        at java.awt.Component.dispatchEventImpl(Component.java:4469)
        at java.awt.Container.dispatchEventImpl(Container.java:2163)
        at java.awt.Component.dispatchEvent(Component.java:4295)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4461)
        at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4125)
        at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4055)
        at java.awt.Container.dispatchEventImpl(Container.java:2149)
        at java.awt.Window.dispatchEventImpl(Window.java:2478)
        at java.awt.Component.dispatchEvent(Component.java:4295)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:604)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:275)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:200)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:185)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:177)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:138)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message