[jcifs] Unable to create new native thread
Michael B Allen
ioplex at gmail.com
Thu Oct 16 17:04:55 GMT 2008
Are you reading all of the files into memory?
Change your code to use the examples/LargeListFiles.java techinque.
You'll save gobs of memory and the code will be much faster.
Mike
On Thu, Oct 16, 2008 at 6:26 AM, Michael Schlegel <lulog1 at yahoo.de> wrote:
> I made a update from jcifs-1.2.17 to jcifs-1.2.24 and now i get following
> exception:
>
> 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
> }
> else
> {
> //do something
> }
> }
>
>
--
Michael B Allen
PHP Active Directory SPNEGO SSO
http://www.ioplex.com/
More information about the jcifs
mailing list