• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Problems in fetching ref cursor.

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic