[jcifs] Unable to create new native thread

Michael Schlegel lulog1 at yahoo.de
Thu Oct 16 10:26:48 GMT 2008

I made a update from jcifs-1.2.17 to jcifs-1.2.24 and now i get following

java.lang.OutOfMemoryError: unable to create new native thread
	at java.lang.Thread.start0(Native Method)
	at java.lang.Thread.start(Unknown Source)
	at jcifs.UniAddress.lookupServerOrWorkgroup(UniAddress.java:212)
	at jcifs.UniAddress.getAllByName(UniAddress.java:360)
	at jcifs.UniAddress.getByName(UniAddress.java:301)
	at jcifs.smb.Dfs.getTrustedDomains(Dfs.java:72)
	at jcifs.smb.Dfs.resolve(Dfs.java:193)
	at jcifs.smb.SmbFile.doConnect(SmbFile.java:923)
	at jcifs.smb.SmbFile.connect(SmbFile.java:994)
	at jcifs.smb.SmbFile.connect0(SmbFile.java:889)
	at jcifs.smb.SmbFile.queryPath(SmbFile.java:1480)
	at jcifs.smb.SmbFile.exists(SmbFile.java:1578)

In our code we check a big list of files if they exists or not.
The code lokks similar like this:

while( (nextFileToCheck = getNext() ) != null )
    if( nextFileToCheck.exists() )
        //do something
        //do something

More information about the jcifs mailing list