If you trust this link, click it to continue.
http://javarevisited.blogspot.com/2012/12/how-to-solve-javalangclasscastexception-java.html