SHARE
TWEET

Why I cannot cast oracle BLOB from native java Blob

a guest Feb 27th, 2012 24 Never
  1. ...
  2. ResultSet rs = ...
  3. java.sql.Blob myfile = rs.getBlob("field")
  4. java.io.OutputStream os = ((oracle.sql.BLOB) myfile).getBinaryOutputStream();
  5.        
  6. java.lang.ClassCastException
  7.        
  8. java.io.OutputStream os = ((oracle.sql.BLOB) myBlob).setBinaryStream(1L);
RAW Paste Data
Top