commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Todd Brewer" <tbre...@knowlysis.com>
Subject [COMMONS.NET.FTP] How to resolve an Out of Memory Error on connect
Date Tue, 06 Dec 2005 17:47:22 GMT
I am getting the following error message, just by trying to connect to an
FTP server:
 
Exception in thread "main" java.lang.OutOfMemoryError: unable to create new
native thread
 at java.lang.Thread.start0(Native Method)
 at java.lang.Thread.start(Unknown Source)
 at
org.apache.commons.net.telnet.TelnetInputStream._start(TelnetInputStream.jav
a:97)
 at
org.apache.commons.net.telnet.TelnetClient._connectAction_(TelnetClient.java
:104)
 at org.apache.commons.net.ftp.FTP._connectAction_(FTP.java:328)
 at org.apache.commons.net.ftp.FTPClient._connectAction_(FTPClient.java:550)
 at org.apache.commons.net.SocketClient.connect(SocketClient.java:163)
 at org.apache.commons.net.SocketClient.connect(SocketClient.java:250)
 at FTPUtils.main(FTPUtils.java:25)
 
My code is very simple:
 
   try 
   {
       FTPClient ftp = new FTPClient();    
        <ftp://ftp.connect(> ftp.connect("ftp.download.com");
   } 
   catch (exception e) 
   {
       e.printStackTrace();
   }
   System.out.print( <ftp://ftp.getReplyString> ftp.getReplyString());
 
 
The error occurs on the ftp.connect() line.  
 
I am using Java 1.5.0_04, but have verified the same error on 1.3.1_16.  I
am using Eclipse on Windows XP.  I have tried changing some of the memory
parameters, with no luck.
 
Any help in resolving this would be appreciated!

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message