admin 管理员组

文章数量: 887021

oracle无法转换为内部表,ORA

当应用报错误:

could not read column value from result set: RATED15_98_; 无法转换为内部表示

(util.JDBCExceptionReporter          71  ) SQL Error: 17059, SQLState: null

(util.JDBCExceptionReporter          72  ) 无法转换为内部表示

这个错误原因是:数据库里的字段类型与Java里映射该字段属性的类型不能对应转换,例如数据库里字段类型为Varchar2,而Java定义的类型为Long;或者数据库里为Number,而Java定义的对应属性类型为String。

This error occurs when an attempt is made to convert a ResultSet's column value to a type for which the driver has no conversion available.

For example, when trying to read a VARCHAR-column as a Java int.

eg:

The query SELECT 'hello' FROM dual will produce a resultset with one column, of type VARCHAR.

The res.getInt(1) statement attempts to retrieve the value of the column as an int, which leads to error 17059.

Note that the Oracle driver can convert from a char-type to an int if the char-type cont

本文标签: oracle无法转换为内部表 ORA