spring的ResultSetWrappingSqlRowSet使用rs.getTimestamp取oracle数据库时分秒问题

oracle 11G数据库使用ojdbc14.jar驱动 rs.getTimestamp取不出时分秒问题:

ResultSetWrappingSqlRowSet rs = processDao.queryForRowSet(sql,searchMap);
while (rs.next()) {
……
					Date operatetime = rs.getTimestamp("operatetime");
……
}

  原因:

问题补充:是ojdbc.jar的版本问题。数据库是oracle11g的,用ojdbc14.jar不行。改用ojdbc5.jar,又出现个新情况,说是违反协议,不知是咋回事,正调查中。。。。。。

  解决:

更换成ojdbc6.jar(下载),如下版本

Manifest-Version: 1.0
Ant-Version: Apache Ant 1.6.5
Created-By: 1.5.0_51-b10 (Sun Microsystems Inc.)
Implementation-Vendor: Oracle Corporation
Implementation-Title: JDBC
Implementation-Version: 11.2.0.4.0
Repository-Id: JAVAVM_11.2.0.4.0_LINUX.X64_RELEASE
Specification-Vendor: Sun Microsystems Inc.
Specification-Title: JDBC
Specification-Version: 4.0
Main-Class: oracle.jdbc.OracleDriver
sealed: true

  

原文地址:https://www.cnblogs.com/jifeng/p/4551460.html