Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problems in fetching ref cursor.

 
Sreedhar Sudha
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I am exeuting a Oracle stored proc which returns ref cursor. I have copule of problems with this.

1. Adter executing the proc..fetching the oupput from cursor is taking more time ..sometimes neary 1.5 hrs. Proc returns bulk data.Is there any way to make it fast.

My code is like this.

rs = ((OracleCallableStatement)cs).getCursor(2);
while(rs.next()){
//statements to get column values.

}

Is the above code causing slow fetch??

2. Before executing the proc, ie; after getting connection to Oracle DB after some time i get java.io.StreamCorruptedException: invalid stream header exception.

Can any one please help on this.
 
Joe Ess
Bartender
Posts: 9339
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The java.io.StreamCorruptedException is caused by trying to read data that was not written with an ObjectOutputStream. ObjectInputStream isn't some magical thing that turns ordinary data into Java objects. You have to write an object to read an object. Have a look at The Java Tutorial on Serialization for more. As for your other question, let's move this topic to the JDBC forum.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic