【发布时间】:2023-03-21 08:24:01
【问题描述】:
我的 JDBC 有问题。
我有以下代码:
//blargeparam is a blob column.
PreparedStatement pst =connection.prepareStatement("update gcp_processparams_log set blargeparam= ? where idprocessparamslog=1");
pst.setBinaryStream(1,inputStream);
我收到以下错误:
Exception in thread "main" java.lang.AbstractMethodError:
oracle.jdbc.driver.T2CPreparedStatement.setBinaryStream(ILjava/io/InputStream;)V
我的连接字符串是jdbc:oracle:oci:@.....
Oracle 版本是 11g。
从错误消息看来,有些东西不见了,但是:
- 当我从同一个 blob 列中读取数据时 (使用 blob.getBytes)一切 有效。
- 即时客户端的 DLL 是 (正确)在库路径中。
-
这是神谕的清单 我的类路径中的 JDBC JAR:
Manifest-Version: 1.0 Specification-Title: Oracle JDBC driver classes for use with JDK14 Sealed: true Created-By: 1.4.2_14 (Sun Microsystems Inc.) Implementation-Title: ojdbc14.jar Specification-Vendor: Oracle Corporation Specification-Version: Oracle JDBC Driver version - "10.2.0.4.0" Implementation-Version: Oracle JDBC Driver version - "10.2.0.4.0" Implementation-Vendor: Oracle Corporation Implementation-Time: Sat Feb 2 11:40:29 2008
【问题讨论】:
-
我猜你早就解决了这个问题,但对于现在来到这里的人来说。可以在这里找到解决方案:stackoverflow.com/a/27847317/511976