commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "oliver zemann (JIRA)" <>
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
             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("", Integer.parseInt(textPort.getText()));
System.out.print(ftpClient.getReplyString()); //returns null
System.out.print(ftpClient.getReplyCode()); //returns 0
ftpClient.login("anonymous", ""); //NullPointerException

when i use these values in lftp i get:
oli@lucymobile:~$ lftp 
lftp :~> open
lftp> USER anonymous
lftp> 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 ""
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 wicked.FtpClient.user(
        at wicked.FtpClient.login(
        at wicked.MainWindow.buttonTestFTPServerActionPerformed(
        at wicked.MainWindow.access$1300(
        at wicked.MainWindow$14.actionPerformed(
        at javax.swing.AbstractButton.fireActionPerformed(
        at javax.swing.AbstractButton$Handler.actionPerformed(
        at javax.swing.DefaultButtonModel.fireActionPerformed(
        at javax.swing.DefaultButtonModel.setPressed(
        at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(
        at java.awt.Component.processMouseEvent(
        at javax.swing.JComponent.processMouseEvent(
        at java.awt.Component.processEvent(
        at java.awt.Container.processEvent(
        at java.awt.Component.dispatchEventImpl(
        at java.awt.Container.dispatchEventImpl(
        at java.awt.Component.dispatchEvent(
        at java.awt.LightweightDispatcher.retargetMouseEvent(
        at java.awt.LightweightDispatcher.processMouseEvent(
        at java.awt.LightweightDispatcher.dispatchEvent(
        at java.awt.Container.dispatchEventImpl(
        at java.awt.Window.dispatchEventImpl(
        at java.awt.Component.dispatchEvent(
        at java.awt.EventQueue.dispatchEvent(
        at java.awt.EventDispatchThread.pumpOneEventForFilters(
        at java.awt.EventDispatchThread.pumpEventsForFilter(
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(
        at java.awt.EventDispatchThread.pumpEvents(
        at java.awt.EventDispatchThread.pumpEvents(

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

View raw message