oracle中jdbc版本的jar包问题汇总

从oracle8到oracle11,JDBC目录下的驱动包都各有不同,所支持的JDK版本也有所不同。
例:对clob存储大数据而言。首先系统架构:spring+hibernate+webwork

1、程序中用到的驱动连接
jdbc.driverClassName=oracle.jdbc.driver.OracleDriver
jdbc.url=jdbc:oracle:thin:@127.0.0.1:1521:orcl
jdbc.username=***
jdbc.password=***
2、hibernate的映射文件
<property column="content" name="content" type="text" length="100000"/>需要存储数据的字段用text类型。借鉴了论坛上其他帖子总结的。测试了。这个可用。
pojo要定义成String类型
3、DB格式为:
-----------
content clob
-----------
如果你的oracle驱动版本不同。运行时会遇到各种各样的错误和异常。解决的问题方法就是看你的oracle版本。导入对应的驱动版本jar包
我的oracle是11g。开始时用的classes12.jar 。存储少量数据时候可以正确执行。但是如果数据量过大。如:4000字的文章就会出错。
最后Google了一下。说法太多了。
总结:把oracle的jar包换成ojdbc5.jar。问题解决!!!
希望对大家有帮助
Oracle Database 12c Release 1 (12.1.0.1) JDBC Drivers SimpleFAN Download simplefan.jar (21,048 bytes) - Classes for subscribing to RAC events via ONS; simplefan policy and javadoc JDBC Thin for All Platforms Download demo.tar (686,080 bytes) - JDBC Demos (TAR format) Download demo.zip (614,561 bytes) -JDBC Demos (ZIP format) Download JavaDoc (7,103,997 bytes) Download README Download ojdbc6.jar (3,389,454 bytes) - For use with JDK 6; It contains the JDBC driver classes except classes for NLS support in Oracle Object and Collection types. Download ojdbc6_g.jar (5,382,573 bytes) - Same as ojdbc6.jar except compiled with "javac -g" and contains tracing code. Download ojdbc6dms.jar (4,033,913 bytes) - Same as ojdbc6.jar, except that it contains instrumentation to support DMS and limited java.util.logging calls. Download ojdbc6dms_g.jar (5,405,632 bytes) - Same as ojdbc6_g.jar except that it contains instrumentation to support DMS. Download ojdbc7.jar (3,397,734 bytes) - For use with JDK 7; It contains the JDBC driver classes except classes for NLS support in Oracle Object and Collection types. Download ojdbc7_g.jar (5,395,834 bytes) - Same as ojdbc7.jar except compiled with "javac -g" and contains tracing code. Download ojdbc7dms.jar (4,044,963 bytes) - Same as ojdbc7.jar, except that it contains instrumentation to support DMS and limited java.util.logging calls. Download ojdbc7dms_g.jar (5,419,088 bytes) - Same as ojdbc7_g.jar except that it contains instrumentation to support DMS. Download orai18n.jar (1,659,576 bytes) - Classes for NLS support Download xdb6.jar (263,690 bytes) - Classes to support standard JDBC 4.x java.sql.SQLXML interface (Java SE 6 & Java SE 7). 附件里的文件都可以在这里下载,只是不用再注册用户了: http://www.oracle.com/technetwork/database/features/jdbc/jdbc-drivers-12c-download-1958347.html
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值