Nahuel
September 18, 2005, 7:50pm
1
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
matt
September 18, 2005, 8:29pm
2
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
Nahuel
September 18, 2005, 8:49pm
3
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.
matt
September 18, 2005, 9:03pm
4
What does
while(!treater.isFinished()){}[/code]
do?
-Matt
Nahuel
September 18, 2005, 9:04pm
5
stop the process while the treater haven’'t finished.
Nahuel
September 18, 2005, 9:08pm
6
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
matt
October 21, 2005, 3:59pm
8
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