当前位置:我的异常网» J2EE » 小弟我用ibatis 数据源是C3P0 连接oracle没有任何
小弟我用ibatis 数据源是C3P0 连接oracle没有任何有关问题,连接DB2就报错
www.myexceptions.net 网友分享于:2013-06-11 浏览:45次
我用ibatis 数据源是C3P0 连接oracle没有任何问题,连接DB2就报错
我用ibatis 数据源是C3P0 连接oracle没有任何问题,连接DB2就报错,我本地手写数据库连接连DB2还能连上,请大仙们帮忙看看啊 谢谢 ,以下是报错信息
[DEBUG](JakartaCommonsLoggingImpl.java:27)2012-06-08 15:57:17 {conn-100012} Connection
[DEBUG](JakartaCommonsLoggingImpl.java:27)2012-06-08 15:57:17 {conn-100012} Preparing Statement: select count(*) from sp_emissions
[DEBUG](JakartaCommonsLoggingImpl.java:27)2012-06-08 15:57:17 {pstm-100013} Executing Statement: select count(*) from sp_emissions
[DEBUG](JakartaCommonsLoggingImpl.java:27)2012-06-08 15:57:17 {pstm-100013} Parameters: []
[DEBUG](JakartaCommonsLoggingImpl.java:27)2012-06-08 15:57:17 {pstm-100013} Types: []
org.springframework.jdbc.UncategorizedSQLException: SqlMapClient operation; uncategorized SQLException for SQL []; SQL state [null]; error code [-99999];
--- The error occurred in com/feng/biz/emissions/ibatis/Emissions.xml.
--- The error occurred while applying a result map.
--- Check the Emissions.queryEmissionsCounts-AutoResultMap.
--- Check the result mapping for the '1' property.
--- Cause: com.ibm.db2.jcc.b.SqlException: DatabaseMetaData information is not known for server DB2/NTSQL09070 by this version of JDBC driver; nested exception is com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred in com/feng/biz/emissions/ibatis/Emissions.xml.
--- The error occurred while applying a result map.
--- Check the Emissions.queryEmissionsCounts-AutoResultMap.
--- Check the result mapping for the '1' property.
--- Cause: com.ibm.db2.jcc.b.SqlException: DatabaseMetaData information is not known for server DB2/NTSQL09070 by this version of JDBC driver
Caused by: com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred in com/feng/biz/emissions/ibatis/Emissions.xml.
--- The error occurred while applying a result map.
--- Check the Emissions.queryEmissionsCounts-AutoResultMap.
--- Check the result mapping for the '1' property.
--- Cause: com.ibm.db2.jcc.b.SqlException: DatabaseMetaData information is not known for server DB2/NTSQL09070 by this version of JDBC driver
at com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeQueryWithCallback(MappedStatement.java:201)
at com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeQueryForObject(MappedStatement.java:120)
Caused by: com.ibm.db2.jcc.b.SqlException: DatabaseMetaData information is not known for server DB2/NTSQL09070 by this version of JDBC driver
at com.ibm.db2.jcc.b.s.supportsMultipleResultSets(s.java:1850)
at com.mchange.v2.c3p0.impl.NewProxyDatabaseMetaData.supportsMultipleResultSets(NewProxyDatabaseMetaData.java:1072)
------解决方案--------------------
看看你DB2的版本,然后去找个该版本所对应的最新版JDBC驱动,最好是IBM官网下载。
文章评论