Fixed the wrong, unchecked type casting of String to Date which resulted in ClassCastException