I\'m getting the following exception.
Caused by:
java.lang.ClassCastException: java.math.BigInteger cannot be cast to java.lang.Integer
java.lang.Integer is not a super class of BigInteger. Both BigInteger and Integer do inherit from java.lang.Number, so you could cast to a java.lang.Number.
java.lang.Integer
BigInteger
Integer
java.lang.Number
See the java docs http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Number.html