This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
You have called start method of the thread in a for loop. When a thread calls a start method it will invoke run and ends to complete (assume there is timeslicing). After completion of the run method the thread is not in runnable state. But your for loop is iterating and the thread has already completed its run method and not in runnable state. This the reason for throwing IllegalThreadStateException
For your second question, the api says Thrown to indicate that a thread has attempted to wait on an object's monitor or to notify other threads waiting on an object's monitor without owning the specified monitor.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: Thread -IllegalMonitorStateException and IllegalThreadStateException