Have you tried using the GeoTools Converters instead? Converters.convert(value, clz)