for input string 4294967295
jdbc查询oracle数据库blob字段时出错:
java.lang.NumberFormatException: For input string: “4294967295”
原因:数据库驱动包版本太低
public int getPrecision(int paramInt) throws SQLException { int i = getValidColumnIndex(paramInt); int j = getDescription()[i].describeType; switch (j) { case 112: case 113: return Integer.parseInt(OracleDatabaseMetaData.getLobPrecision());//就是这句,getLobPrecision()返回了一个4294967295,这超出了Integer范围,所以报错,更新jar包即可解决问题 case 8: case 24: return 2147483647; case 1: case 96: return getDescription()[i].describeMaxLength; } return getDescription()[i].precision; }

浙公网安备 33010602011771号