gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-04 16:45:35 25 4
gpt4 key购买 nike

尝试将 CKEditor(用于 CMS - 内容管理系统)的内容插入 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
  • 甲骨文 10g

  • 自从我将 Hibernate 从 3.2.5 更改为 4.2.0.CR1 以来,就一直导致异常

    This链接说

    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 建议升级 JDBC 驱动程序,但该问题是关于我尚未使用的 Oracle 11g。

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

    如何解决这个异常?

    编辑:

    我刚刚 downloaded ojdbc6.jar (以前是 ojdbc14.jar,驱动程序如上指定),其中包含 Oracle JDBC Driver version - "11.1.0.7.0-Production" .

    异常异常消失了。请告诉我,如果此驱动版本与 完美兼容甲骨文 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.



    如 Oracle JDBC 驱动程序 11g 文档 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.

    关于spring - java.lang.AbstractMethodError : oracle. jdbc.driver.T4CPreparedStatement.setCharacterStream(ILjava/io/Reader;J)V,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14926134/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com