oracle.sql.CLOB

weblogic环境下weblogic.jdbc.wrapper.Clob_oracle_sql_CLOB 类型转换解决办法 最近在做一个小功能时,从数据库中获取一个CLOB类型的字段,需要在java代码中进行一些处理,但是在取出来Object强制类型转换为 CLOB类型对象时,出现报错:java.lang.ClassCastException:weblogic.jdbc.wrapper.Clob_oracle_sql_CLOB cannot be cast to oracle.sql.CLOB 报错代码如下: import oracle.sql.CLOB; .... CLOB c_info = (CLOB)rsMap... 阅读详情
 

Class oracle.sql.CLOB

oracle.sql.CLOB

public class CLOB implements Clob

Method Index

 o getAsciiOutputStream()
Oracle extension.
 o getAsciiStream()
Implements the Clob interface method.
 o getBufferSize()
Oracle extension.
 o getCharacterOutputStream()
Oracle extension.
 o getCharacterStream()
Implements the Clob interface method.
 o getChars(long, int, char[])
Oracle extension.
 o getChunkSize()
Oracle extension.
 o getConnection()
Oracle extension.
 o getSubString(long, int)
Implements the Clob interface method.
 o isConvertibleTo(Class)
Test whether this data object can be converted to the specified Java data type.
 o length()
Implements the Clob interface method.
 o position(Clob, long)
Implements the Clob interface method.
 o position(String, long)
Implements the Clob interface method.
 o putChars(long, char[])
Oracle extension.
 o putString(long, String)
Oracle extension.
 o toJdbc()
Convert this data object into its default Java object type.

Methods

 o length
 public long length() throws SQLException
Implements the Clob interface method. Returns the number of characters in the CLOB value designated by this Clob object.

Returns:
length of the CLOB in characters
Throws: SQLException
if there is an error accessing the length of the CLOB
 o getSubString
 public String getSubString(long pos,
                            int length) throws SQLException
Implements the Clob interface method. Returns a copy of the specified substring in the CLOB value designated by this Clob object. The substring begins at position pos and has up to length consecutive characters.

Parameters:
pos - the first character of the substring to be extracted. The first character is at position 1.
length - the number of consecutive characters to be copied
Returns:
a String that is the specified substring in the CLOB value designated by this Clob ob ject
Throws: SQLException
if there is an error accessing the CLOB
 o getCharacterStream
 public Reader getCharacterStream() throws SQLException
Implements the Clob interface method. Gets the Clob contents as a Unicode stream.

Returns:
a Unicode stream containing the CLOB data
Throws: SQLException
if there is an error accessing the CLOB
 o getAsciiStream
 public InputStream getAsciiStream() throws SQLException
Implements the Clob interface method. Gets the CLOB value designated by this Clob object as a stream of Ascii bytes.

Returns:
an ascii stream containing the CLOB data
Throws: SQLException
if there is an error accessing the CLOB value
 o position
 public long position(String searchstr,
                      long start) throws SQLException
Implements the Clob interface method. Determine the character position at which the given substring

Parameters:
searchstr - is the substring to search for.
start - is the position at which to begin searching.
Returns:
the position at which the substring appears, else -1.
 o position
 public long position(Clob searchstr,
                      long start) throws SQLException
Implements the Clob interface method. Determine the character position at which the given substring

Parameters:
searchstr - is the substring to search for.
start - is the position at which to begin searching.
Returns:
the position at which the substring appears, else -1.
 o getChars
 public int getChars(long pos,
                     int length,
                     char buffer[]) throws SQLException
Oracle extension. Return copy of the substring of the CLOB at the requested position.

Parameters:
buffer - is the buffer into whcih the characters are read.
pos - is the first character of the substring to be extracted.
length - is the number of consecutive character to be copied.
Returns:
the actual number of characters read.
 o getCharacterOutputStream
 public Writer getCharacterOutputStream() throws SQLException
Oracle extension. Write Unicode stream to the CLOB.

Returns:
a Unicode character output stream.
 o getAsciiOutputStream
 public OutputStream getAsciiOutputStream() throws SQLException
Oracle extension. Write ascii stream to the CLOB.

Returns:
a ascii output stream.
 o getConnection
 public OracleConnection getConnection() throws SQLException
Oracle extension. Get connection object.

 o putChars
 public int putChars(long pos,
                     char chars[]) throws SQLException
Oracle extension. Write characters at the requested position.

Parameters:
pos - is the position to write characters.
chars - is the buffer of characters to be written.
Returns:
the actual number of characters written.
 o putString
 public int putString(long pos,
                      String str) throws SQLException
Oracle extension. Write Java string at the requested position.

Parameters:
pos - is the position to write characters.
str - is the Java string to be written.
Returns:
the actual number of characters written.
 o getChunkSize
 public int getChunkSize() throws SQLException
Oracle extension. Get database LOB storage chunk size.

Returns:
the size in terms of characters.
 o getBufferSize
 public int getBufferSize() throws SQLException
Oracle extension. Get ideal LOB db access buffer size.

Returns:
the size in terms of characters.
 o toJdbc
 public Object toJdbc() throws SQLException
Convert this data object into its default Java object type.

Returns:
this object.
Throws: SQLException
if any of the lower layer code throws an exception.
 o isConvertibleTo
 public boolean isConvertibleTo(Class jClass)
Test whether this data object can be converted to the specified Java data type.

Parameters:
jClass specifies - the Java data type to test against.
Returns:
true if this data object is convertible to the specified Java class, and a corresponding xxxValue() method is available; otherwise, a false is returned.

 
海康威视Web3.0插件实战:快速部署摄像头实时预览方案 本文详细介绍了海康威视Web3.0插件的实战应用,包括快速部署摄像头实时预览方案的完整流程。从插件下载安装到摄像头连接配置,再到浏览器兼容性解决方案,帮助开发者和IT人员高效实现网页端监控功能。特别针对预览功能调优和多摄像头管理等高级应用提供了实用技巧。 阅读详情

相关推荐

OSCS开源安全周报第13期:Exchange 高危漏洞公开

OSCS 社区共收录安全漏洞31个,公开漏洞值得关注的是 Apache Commons JXPath 存在代码执行漏洞(CVE-2022-41852),Microsoft Exchange 远程代码执行漏洞(ProxyNotShell(CVE-2022-41040),Apache Tomcat 条件竞争漏洞(CVE-2021-43980),FasterXML jackson-databind 小于2.14.0-rc1拒绝服务漏洞(CVE-2022-42003)。

OSCS开源安全社区 4200

oracle之CLOB处理完整版

oracle之CLOB处理完整版/****操作oracle数据库的CLOB字段,包括读和写*作者:令少爷* */package com.nes.common.sql.lob;import java.sql.*;import java.io.*;import oracle.jdbc.OracleResultSet;import oracle.sql.*;public class JClob {S

Angelo Lee's Blog 3491

DDSP(Differentiable Digital Signal Processing) 开篇

文章目录DDSP可以用来做什么?下一步工作 工作中接触到了DDSP声码器,但非科班出声的我对这块知识非常陌生,甚至带有一些畏惧的心理,但是为了工作为了进步,必须硬下头皮去啃,相信只要耐心地坚持,没什么能难到我。于是从今天开始,就用这个博客专栏来记录我的学习历程,希望也能帮助到你~ DDSP对应的论文是:DDSP: Differentiable Digital Signal Processing 先翻译一篇来自DDSP论文作者的对DDSP的介绍的文章。 今天,我们很高兴地介绍可微数字信号处理(DDSP)库。

YeeKo的博客 9260

ORACLE 操作 CLOB 字段

方法一: 在Oracle中,LOB(Large Object,大型对象)类型的字段现在用得越来越多了。因为这种类型的字段,容量大(最多能容纳4GB的数据),且一个表中可以有多个这种类型的字段,很灵活,适用于数据量非常大的业务领域(如图象、档案等)。而LONG、LONG RAW等类型的字段,虽然存储容量也不小(可达2GB),但由于一个表中只能有一个这样类型的字段的限制,

逸少 5443

影刀RPA进阶:Excel多条件筛选与数据提取实战

本文详细介绍了如何利用影刀RPA实现Excel多条件筛选与数据提取的自动化。通过拆解文本、数值、日期及颜色筛选等核心指令,并结合实战案例,指导用户构建稳健的销售数据提取机器人,从而高效处理复杂数据报表,提升工作效率。

onion的博客 548

光栅衍射有入射角时_衍射型多焦点人工晶体光学原理

多焦点人工晶体如何把光线分成多个焦点的?这个问题大部分专业书只是蜻蜓点水,并没有讲明白。希此文粗浅的解释,能帮您加深理解,请多指正。接下来,我将按照一下历史发展的顺序讲解一下:光的认识、菲涅尔灯塔(菲涅尔透镜)、菲涅尔波带盘(半波带盘)、多焦点人工晶体。一:首先复习一下光的认识历史。我们现在都知道光是一种电磁波,具有波粒二相性,但是认识光的本质也经历非常曲折漫长的过程。牛顿时代的几何光...

weixin_28963467的博客 2356

oracle.sql

select t.*,rowid,rownum from jjyy t where rownum minus                                               //  选择第4,5行的信息               select tt.*,rowid,rownum from jjyy tt where rownum select sysda

mvcgo的专栏 1348

华硕电脑Win10改Win7系统:BIOS设置详解

通过上述步骤,华硕电脑用户可以将系统从Windows 10更改为Windows 7。虽然这个过程可能涉及一些技术细节和潜在的风险(如数据丢失和驱动不兼容),但只要按照指南仔细操作并做好准备工作,大多数用户应该能够成功完成系统回滚。请记住,在进行任何系统更改之前都要备份重要数据,并确保已了解所有潜在的风险和限制。希望本文能够帮助到需要回滚到Windows 7的华硕电脑用户!

nntxthml的博客 2267

Oracle动态执行sql和其中clob字段的运用

我们使用||运算符或CONCAT函数将l_clob1和l_clob2拼接在一起,并将结果存储在result变量中。DBMS_SQL 是Oracle提供的一个包,它允许您执行动态SQL。如果您的需求涉及到更复杂的SQL语句动态生成,您可以考虑使用 DBMS_PREPROCESSOR 包。有一些工具或库,如 apex_plugin, utl_i18n, DBMS_LDAP 等,它们允许您在运行时构建和执行SQL。在Oracle中,您可以使用动态SQL来执行SQL语句,这些语句在运行时构建和执行。

weixin_42095178的博客 1010

永磁同步电机高效标定技术:从理论到实践的全面解析

本文全面解析永磁同步电机高效标定技术,从MTPA标定、弱磁区优化到初始角校准,详细介绍了理论原理和实战技巧。针对新能源汽车应用场景,提供标定系统集成要点和AI辅助优化方案,帮助工程师提升电机性能标定效率与精度。

weixin_28452161的博客 510

【gateway nc adapter虚拟网卡 win11 联想】问题的解决

由于需要登录公司内网,于是启用奇安信VPN。但启动后报出网关未连接的问题,于是我检查了我的网络适配器,并尝试解决,以下给出几种我实践过程中的行动,并附带最后成功的解决方法。

m0_73602417的博客 6603

oracle.sql.CLOB不能转换成oracle.sql.CLOB类型的异常 java.lang.ClassCastException: oracle.sql.CLOB

1、问题:当使用tomcat容器的连接池存取CLOB对象(如果不使用连接池不存在此问题)执行如下语句时,报异常:java.lang.ClassCastException: oracle.sql.CLOB cannot be cast to oracle.sql.CLOB。 报异常语句为:oracle.sql.CLOB   clob = ( oracle.sql.CLOB ) rs.get

hgyu的专栏 7879

EtherCAT主站SOEM -- 19 --Qt-Soem通过CSP模式(周期同步位置模式)控制一个电机转圈圈

以上就是EtherCAT主站SOEM – 19 --Qt-Soem通过CSP模式(周期同步位置模式)控制一个电机转圈圈的内容。有不明白的地方欢迎留言;有建议欢迎留言,我后面编写文档好改进。创作不容,如果文档对您有帮助,记得给个赞。

常驻客栈的博客--嵌入式EtherCAT 2004

Oracle导出SQL,解决Clob字段长度大于4000,导入不成功的问题

1.pom.xml <dependency> <groupId>com.oracle</groupId> <artifactId>ojdbc</artifactId> <version>11.02</version> </dependency> <dependency> <groupId>cn.hutool</groupId> <artifactId>hu

u011244410的专栏 3012

IDEA的使用指南

IDEA基于java的使用手册,可以最快速的上手,在使用中不断的丰富自己的使用技巧.

最新的sdio 4.0 spec 协议标准 带书签 高清完整PDF版

Part-E1-SDIO-Specification-Ver4.00-Final-120220.pdf:最新的sdio 4.0 spec 协议标准 带书签 高清完整PDF版,包括SDIO 接口的外设,SDIO 接口官方协议等。

oracle.sql.clob java.sql.clob,java.lang.NoClassDefFoundError: oracle/sql/CLOB

Hello,We are porting the J2EE app to WAS. WE are getting the following error. Any ideas.source code snippet:import java.sql.*;import java.util.*;import oracle.sql.CLOB;import oracle.sql.BLOB;ResultSet...

weixin_33740934的博客 925

jdk-8u144-linux-x64.tar.gz.

该资源为搭建Linux系统Java环境用,资源的后缀为tar.gz格式的压缩包

jdbc操作oracle的clob字段,重点在于java.sql是对jdbc.sql的封装

准确来说java.sql是封装了包括jdbc.sql等主流数据库驱动 两种方式实现oracle的 insert clob字段 前提是使用了主流的java.sql创建的connection(从prestatment中获取connection) 1.使用了jdbc.sql.CLOB Connection conn = pstmt.getConnection(); //默认从prestatment中获取connection CLOB clob=null; if(conn.isWrapperFor(O

JokerSoulClub的博客 665

inori mmd 7z

楪祈的模型资源....................................................................................................................................................................................................................

oracle clob去重复,Oracle SQL - 使用重复节点从XML中提取clob值(Oracle SQL - Extracting clob value from XML with repe...

Oracle SQL - 使用重复节点从XML中提取clob值(Oracle SQL - Extracting clob value from XML with repeating nodes)我试图在一个表上运行SQL(名为test_xml ,列xml_data [数据类型xmltype])。 该列包含带重复节点的xml( test_3 )。 当节点包含非clob大小的数据时,以下语句成功运行:...

weixin_33209042的博客 912

oracle 修改 update clob pl/sql,Oracle SQL&PL/SQL笔记

一.单行函数字符函数(1).LOWER() 字符小写(2).UPPER() 字符大写(3).INITCAP() 首字符大写(4).CONCAT() 字符串连接(5).SUBSTR() 字符串截取(6).LENGTH() 返回字符串长度(7).INSTR() 返回字符串的位置(8).LPAD() 左对齐(9).RPAD() 右对齐(10).TRIM() 去除字符串首尾的字符(11).RE...

weixin_39956110的博客 1166

oracle sql被截断,防止Oracle SQL Developer在导出时截断CLOB

您可以绕过Oracle SQL Developer进行导出,例如您可以使用Python脚本来处理导出,以便CLOB不会被截断:from __future__ import print_functionfrom __future__ import divisionimport timeimport cx_Oracledef get_cursor():'''Get a cursor to the da...

weixin_34246971的博客 314

weblogic.jdbc.wrapper.Clob_oracle_sql_CLOB

package com.sumavision.ecommerce.admin.util; import java.io.InputStream; import java.lang.reflect.Method; public class ClobUtils { /** * 将Clob类型的数据转成字符串,如果不是clob类型则返回原对象 * @param in ...

jackrenming2的博客 840

oracle.sql.clob 报错,oracle11g java导出excel报错oracle.sql.CLOB@xxxx问题

在项目中遇到,生产导出excel报错的问题 oracle.sql.CLOB@xxxx的错误,测试导出没问题,一样的代码。原来oracle数据库从10g以后,使用wm_concat,函数返回值会自动转成clob类型 oracle.sql.CLOB@xxxxx.如下图: 解决方法:1.从数据库改为如下拼接方式,listagg(),返回字符串,但是需要oracle11g上才支持,并且不支持dist...

weixin_32571169的博客 1659

oracle行转列SQL,clob转String

1.行转列 select wm_concat(kpSize) kpSize from( SELECT      sp."PRD_PLAN_ID" AS 作业计划号,      '('||rownum||')【'||sco."PRD_LENGTH"/1000||'米'||sco."PRD_ORD_NUM"||'张】'      AS kpSize FROM      "SC_PLAN

xfl4629712的博客 2714

oracle Clob数据生成SQl

demo: 例子: DECLARE REALLYBIGTEXTSTRING CLOB := '待插入的海量字符串'; BEGIN INSERT INTO test_table VALUES('test', REALLYBIGTEXTSTRING, '0'); end ; com...

chigan8065的博客 270

oracle 中clob数据在Java类 里sql处理

oracle 中clob数据在Java类 里sql处理>>>>>>>>>sb.append("       #result('si.YieldRate', 'java.sql.Clob', 'YieldRate'),");   其中 si是表名,YieldRate 是表里的字段,这种处理方式在pl/sql 工具里运行不通过 若想在pl/sql 里运行需改成如下所示:  select  

Y_JY 1457

oracle clob去重复,oracle sql clob查询重复数据,多字段-Oracle

oracle sql clob查询重复数据,多字段COMPARE 函數clob字段在查询时是无法 group by 和 distinct 的,所以如果要根据clob查找重复的数据是很麻烦的,网上大多提出要用DBMS_LOB.SUBSTR 来解决,DBMS_LOB.SUBSTR 把clob转换成字符串段再进行group by,而且如果字数太多还得分段转换,这样操作起来太麻烦,而且容易出现 字符串缓冲...

weixin_39684454的博客 1390

Oracle数据库clob字段导出为sql insert插入语句

oracle数据库的clob字段导出为sql insert插入语句可以分三种情况:1,clob没有换行符;2,clob有换行符但不以分号结尾;3,clob有换行符并且以分号结尾。clob没有换行符使用dbms_lob.substr(clobName) clobName查询并导出即可,导入的时候oracle会自动将字符串转换为clob类型。示例:select id,dbms_lob.sub...

weixin_30507481的博客 1149
上一篇: ORACLE大數据類型的操作之一CLOB
下一篇: 通过JDBC访问Oracle的Lob类型的方法(来自武汉白云黄鹤站)
dacula
博客等级 码龄24年 6粉丝 56原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值
⌂ 换网址