java.lang.Long can't be converted to Duration, close #2298