aspose file tools*
The moose likes JDBC and the fly likes CLOB problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "CLOB problem" Watch "CLOB problem" New topic
Author

CLOB problem

sridhar lakka
Ranch Hand

Joined: Jan 02, 2007
Posts: 109
Hi All,
Thanks in advance.
In our application we are getting XML file Data base as a CLOB.
And later we are making that one as String.
I am getting the problem at following situation,
I have called the databse function, but which is not returing any thing, even CLOB null also.
After restarting the server it is working fine.
Please help me.

Reagrds,
Sree.
Scott Selikoff
author
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3716
    
    5

What database function are you calling that is returning null? Your post is a little vague, could you be more specific?


My Blog: Down Home Country Coding with Scott Selikoff
sridhar lakka
Ranch Hand

Joined: Jan 02, 2007
Posts: 109
Thanks,

By using cstmt.registerOutParameter (1, OracleTypes.CLOB); i am calling the oracle function which is expected to return CLOB.
And by using clob = (CLOB) cstmt.getClob (1);, I am taking clob to java object.
But this clob = (CLOB) cstmt.getClob (1); is not working that is after this statement if i put log(clob) nothning is printing even i am not getting any exception also.

Hope clear now.
Regards,
Sree
sridhar lakka
Ranch Hand

Joined: Jan 02, 2007
Posts: 109
The main problem is while closing clob.close.I am getting folowing exception.
java.sql.SQLException: Protocol violation
Scott Selikoff
author
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3716
    
    5

That's one I'm not familiar with, I'd suggest trying a newer or more updated JDBC driver.
sridhar lakka
Ranch Hand

Joined: Jan 02, 2007
Posts: 109
Hi,
Thanks a lot for your reply.
Please from where I can download the latest JAR, we are using 10G oracle and Type4 drivers.

Regards,
Sree
Srikanth Basa
Ranch Hand

Joined: Jun 06, 2005
Posts: 241
Go to these link

http://www.oracle.com/technology/tech/java/sqlj_jdbc/index.html
&
http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/index.html
[ July 02, 2007: Message edited by: Srikanth Basavaraju ]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: CLOB problem