Hi, i'm trying to get a Clob value called "announcementDb" into a string object for outputting some XSLT tags within java. I'm using the following code as recommended on several sites like java.sun.com: Clob announcementDb = rset.getClob("announcements"); long len = announcementDb.length(); String announcementOut = announcementDb.getSubString(1, len); but i'm still getting errors firstly being that the getSubstring doesnt like the data type Long and is looking for an Int. when i replace this with and Int it runs but crashes why I run this query??? any hints would be helpful, cheers.
Michael Zalewski
Ranch Hand
Joined: Apr 23, 2002
Posts: 168
posted
0
That's cuz a CLOB can have more data than can fit into a String. You have to cast the long to an int.
Is this what you already tried when you said it 'crashed'? If so, you need to provide more details.
Ross Varlese
Greenhorn
Joined: Jan 27, 2003
Posts: 6
posted
0
I've altered the code but i'm still getting an error. Root cause: java.lang.AbstractMethodError: oracle/jdbc/driver/OracleResultSet.getClob
am I missing a driver or something?
Neha Ashok
Greenhorn
Joined: Dec 12, 2002
Posts: 26
posted
0
Root cause: java.lang.AbstractMethodError: oracle/jdbc/driver/OracleResultSet.getClob() ---------------------------------------------- What is the driver that you are using and servlet engine ? Hopeful it is classes12.jar and oracle/ Tomcat servlet engine . I've encountered the same error sometimes back. There occurs a conflict between oracle.sql.getClob() and java.sql.getClob() functions. Please check whether classes12.jar contain java.sql package and if any found remove them and package them. Good Luck [ January 28, 2003: Message edited by: Subha Ganapathy ] [ January 28, 2003: Message edited by: Subha Ganapathy ]
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.