java.lang.AbstractMethodError:oracle.jdbc.driver.T4CPreparedStatement.setCharacterStream(ILjava / io / Reader; J)V [英] java.lang.AbstractMethodError: oracle.jdbc.driver.T4CPreparedStatement.setCharacterStream(ILjava/io/Reader;J)V

查看:2038
本文介绍了java.lang.AbstractMethodError:oracle.jdbc.driver.T4CPreparedStatement.setCharacterStream(ILjava / io / Reader; J)V的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在尝试将CKEditor(针对CMS - 内容管理系统)的内容插入Oracle数据库时,出现以下异常: Oracle 10g

Oracle表中的字段类型为clob。


java.lang.AbstractMethodError:
oracle .jdbc.driver.T4CPreparedStatement.setCharacterStream(ILjava / io / Reader; J)V


反面是这个异常不是当我尝试通过使用JSON的AJAX将相同内容插入到数据库中时造成的。



我正在使用




  • Spring 3.2.0

  • Hibernate 4.2.0.CR1

  • Oracle JDBC驱动程序版本 - 10.2.0.5.0

  • JDK - 1.7

  • Oracle 10g



自从我将Hibernate从3.2.5改为4.2.0以来,这个异常一直在引发.CR1

链接表示:

lockquote

有3个版本的setCharacterStream()方法,其中两个
是作为JDBC 4.0(Java 1.6)的一部分添加的。您的JDBC驱动程序可能不支持

这个答案建议升级JDBC驱动程序,但是这个问题是关于我还没有使用的Oracle 11g的。



我很不确定。 JDBC 11.x驱动程序是否与Oracle 10g兼容?曾几何时,我曾尝试过一种方法,但它无法正常工作。



如何解决此异常?




编辑

我刚才已下载 ojdbc6.jar (之前它是 ojdbc14.jar ,驱动程序如上所示),其中包含 Oracle JDBC驱动程序版本 - 11.1.0.7.0-Production

异常消失。请告诉我,如果此驱动程序版本与 Oracle 10g 完全兼容。

解决方案

b

我很不确定。 JDBC 11.x驱动程序是否与Oracle 10g兼容?
曾几何时,我曾尝试过一种方式,但无法正常工作。


正如Oracle JDBC驱动程序11g文档 http://docs.oracle.com/cd/ E11882_01 / java.112 / e16548 / getsta.htm


向后兼容性

JDBC驱动程序已通过认证,可与当前支持的
版本的Oracle数据库一起使用。例如,
Oracle数据库11g第2版(11.2)中的JDBC Thin驱动程序已经过认证,可以使用
10.2.x,10.1.x,9.2.x和9.0.1.x Oracle数据库版本。但是,他们没有经过认证可以使用旧的,不受支持的数据库
版本,例如8.0.x和7.x。



I'm getting the following exception when trying to insert the contents of a CKEditor (for CMS - Contents Management System) into Oracle database - Oracle 10g.

The field in the Oracle table is of type clob.

java.lang.AbstractMethodError: oracle.jdbc.driver.T4CPreparedStatement.setCharacterStream(ILjava/io/Reader;J)V

The opposite side is that this exception is not caused when I try to insert the same contents into the database via AJAX using JSON.

I'm using

  • Spring 3.2.0
  • Hibernate 4.2.0.CR1
  • Oracle JDBC Driver version - 10.2.0.5.0
  • JDK - 1.7
  • Oracle 10g

The exception has been causing since I changed Hibernate from 3.2.5 to 4.2.0.CR1

This link says

There are 3 versions of the setCharacterStream() method, two of them were added as part of JDBC 4.0 (Java 1.6). Your JDBC driver may not support them:

This answer recommends to upgrade the JDBC driver but that question is about Oracle 11g that I'm not yet using.

I'm quite not sure. Are JDBC 11.x drivers compatible with Oracle 10g? Once upon a time, I had tried with one but it didn't work properly.

How to solve this exception?


EDIT:

I have just downloaded ojdbc6.jar (previously it was ojdbc14.jar with the driver specified as above) which contains Oracle JDBC Driver version - "11.1.0.7.0-Production".

The exception exception disappeared. Kindly tell me, if this driver version is perfectly compatible with Oracle 10g.

解决方案

I'm quite not sure. Are JDBC 11.x drivers compatible with Oracle 10g? Once upon a time, I had tried with one but it didn't work properly.

As stated on Oracle JDBC driver 11g documentation http://docs.oracle.com/cd/E11882_01/java.112/e16548/getsta.htm

Backward Compatibility

The JDBC drivers are certified to work with the currently supported versions of Oracle Database. For example, the JDBC Thin drivers in Oracle Database 11g Release 2 (11.2) are certified to work with the 10.2.x, 10.1.x, 9.2.x, and 9.0.1.x Oracle Database releases. However, they are not certified to work with older, unsupported database releases, such as 8.0.x and 7.x.

这篇关于java.lang.AbstractMethodError:oracle.jdbc.driver.T4CPreparedStatement.setCharacterStream(ILjava / io / Reader; J)V的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆