Problem java.io.FileNotFoundException:

Hi,

I’'m developping a software to import the jabberd users ( files ) to jive messenger, and treating more than 2000 files it do an exception :

java.io.FileNotFoundException: theuser.xml (Too many open files)

at java.io.FileInputStream.open(Native Method)

at java.io.FileInputStream.(FileManager.java:27)

at Jabberd2JiveMessenger.main(Jabberd2JiveMessenger.java:27)

setting all File objects after been used to null doesn’‘t work, I don’'t know what to do…

have you an idea ?

thanks

It sounds like you’‘re not closing each file after you’'re done reading it. Can you paste in some of the relevant code?

Regards,

Matt

File path = new File(pathString);

File[] fichiers = (new File(pathString)).listFiles();

for(int i = 0 ; i < fichiers.length ;i++){

FileTreater treater = new FileTreater(fichiers[i], this);

while(!treater.isFinished()){}

treater = null;

fichiers[i] = null;

}

/code

It’'s the code which see which are the different file and treat it.

What does

while(!treater.isFinished()){}[/code]

do?

-Matt

stop the process while the treater haven’'t finished.

Ho, scuse I just deleted this line, and it works very well !!!

Now only test if its work with the jive messenger import tool

I m having the kinda problem when i am tryint to read some image file in application it is giving me this error

Select: input.tif

java.io.FileNotFoundException: C:\Documents and Settings\Aadil\My Documents (Access is denied)

at java.io.FileInputStream.open(Native Method)

at java.io.FileInputStream.(Unknown Source)

Aadil

I m having the kinda problem when i am tryint to read

some image file in application it is giving me this

error

This forum is only for discussion of Jive Messenger development and this appears to be a generic Java issue. I would recommend posting your question in a general Java community such as forums.java.sun.com.

Regards,

Matt