I've not studied your example but according to my knowledge: java.lang.IllegalStateException
it Signals that a method has been invoked at an illegal or inappropriate time. In other words, the Java...