As far as I can see, the code that you posted doesn't have anything to do with your error message. Here's the relevant part of the stack trace:
Notice that the classes and mentioned in that stack trace are not in the code which you posted.
Joined: Mar 22, 2008
Thanks Paul Clapham for your favorable reply. Actually the referred classes are using this copy method and exist in the class from where this copyFile method called
I googled and found this problem not belongs to my code but appearing due to Linux as permission to view number of files were 1024 whereas I was trying to copy 50500 files. I used the following to fix it:
Increase open files and max user processes:
Presently it seems the problem fixed but am still waiting to be sure 100%