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

Oracle-jdbc : get a LONG column

 
Gaelle SMITS
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi !
I have a problem I have spent two days on now, and I couldn't solve it.
I am working on a jsp-database application.
I send a query in which I get strings and a long column in resultset.
I get the string columns by getString function, and the long by getBinaryStream function.
When I try to get only string columns, I have no problems, but when I try to get the long one, it throws an error after some queries :
SQL Error : 17002 - Io exception: not in streaming mode
and the browser displays :
java.io.IOException: "Error: Attempt to clear a buffer that's already been flushed"
at java.lang.Throwable.fillInStackTrace(Native Method) at java.lang.Throwable.fillInStackTrace(Compiled Code)
at java.lang.Throwable.(Compiled Code) at java.lang.Exception.(Compiled Code)
at java.io.IOException.(IOException.java:47)
...

I don't know how to solve this, and I have tried so many things, I'm really bored !
Please, help me if you know anything about it !
Gaelle.
 
Kirtikumar Puthran
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Instead of getBinaryStream, try using Resultset.getLong(columname).
Hope this helps.
Rgds,
Kirtikumar Puthran
 
SJ Adnams
Ranch Hand
Posts: 925
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No.
the LONG database type is similar to a LOB/CLOB it's not a long in the integer sense.
All I can suggest is, is the jdbc connection using oci8? I think the thin driver doesn't support LONG?
And is your jdbc driver up to date?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic