You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by "Daniel F. Savarese" <df...@savarese.org> on 2005/11/24 23:45:59 UTC

Re: ftp.setSoTimeout throwing NullPointer Exception

In message <43...@virage.com>, Noah White writes:
>Code in question:
>
>    FTPClient ftp = new FTPClient();
>    try {
>       ftp.setDefaultTimeout(60000);
>       ftp.setSoTimeout(60000);
>       ...
>
>Generates -
>
>java.lang.NullPointerException
>    at 
>org.apache.commons.net.SocketClient.setSoTimeout(SocketClient.java:354)

http://jakarta.apache.org/commons/net/apidocs/org/apache/commons/net/SocketClient.html#setSoTimeout(int)

  "Set the timeout in milliseconds of a currently open connection. Only call
   this method after a connection has been opened by connect()."

daniel

-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-
    s a v a r e s e      # In distant lands, I hear the call of my home.
   software research     # Yet my work is not done.  My journey's just begun.
http://www.savarese.com/ #  -- http://www.sleepandthetraveller.com/


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