1. 异常信息:  
  2. Exception in thread "main" com.ibatis.common.jdbc.exception.NestedSQLException:     
  3. --- The error occurred in com/mydomain/data/Account.xml.    
  4. --- The error occurred while executing query procedure.    
  5. --- Check the {call scott.queryaccount(?,?)}.    
  6. --- Check the output parameters (register output parameters failed).    
  7. --- Cause: java.sql.SQLException: 无效的列类型  
  8.     at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryWithCallback(GeneralStatement.java:185)  
  9.     at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryForObject(GeneralStatement.java:104)  
  10.     at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForObject(SqlMapExecutorDelegate.java:566)  
  11.     at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForObject(SqlMapExecutorDelegate.java:541)  
  12.     at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForObject(SqlMapSessionImpl.java:106)  
  13.     at com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.queryForObject(SqlMapClientImpl.java:83)  
  14.     at com.mydomain.data.SimpleExample.queryCount(SimpleExample.java:52)  
  15.     at com.mydomain.data.SimpleExample.main(SimpleExample.java:44)  
  16. Caused by: java.sql.SQLException: 无效的列类型  
  17.     at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)  
  18.     at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)  
  19.     at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:269)  
  20.     at oracle.jdbc.driver.OracleStatement.get_internal_type(OracleStatement.java:6164)  
  21.     at oracle.jdbc.driver.OracleCallableStatement.registerOutParameterBytes(OracleCallableStatement.java:244)  
  22.     at oracle.jdbc.driver.OracleCallableStatement.registerOutParameter(OracleCallableStatement.java:393)  
  23.     at oracle.jdbc.driver.OracleCallableStatement.registerOutParameter(OracleCallableStatement.java:462)  
  24.     at com.ibatis.sqlmap.engine.execution.SqlExecutor.registerOutputParameters(SqlExecutor.java:428)  
  25.     at com.ibatis.sqlmap.engine.execution.SqlExecutor.executeQueryProcedure(SqlExecutor.java:275)  
  26.     at com.ibatis.sqlmap.engine.mapping.statement.ProcedureStatement.sqlExecuteQuery(ProcedureStatement.java:34)  
  27.     at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryWithCallback(GeneralStatement.java:173)  
  28.     ... 7 more  

查看java.sql.Types类中有关JDBC类型变量类型,并没有发“NUMBER”这一静态字段,而只有“NUMERIC”字段。(因此 jdbcType 的值不是数据库ORACLE的参数类型,而是其对应的JDBC变量类型)

java.sql.Types类中还有一个DECIMAL静态常量,与javaType定义的java.math.BigDecimal类型一致