The correct solution is that in the PreparedStatement instead of setFloat, setDouble, setString functions the setObject must be used to inject and the problem does not arise. By the way the setObject function makes type conversions, it can be feed with String and it converse it to Float, Double, Integer when it is necessary.