I have a problem retrieving a blob object from oracle DB in java API using jdbc. The problem is that when I execute the Collable statement with a function from db that returns the blob field to me, this exception is thrown on the line:
tempBlob = (oracle.sql.BLOB)cstmt.getObject(1);
with this error message:
java.lang.ClassCastException: oracle.sql.BLOB cannot be cast to oracle.sql.BLOB.
The object that I get from the database is an instance of oracle.sql.BLOB . TempBlob variable is an oracle.sql.BLOB object. Where is the problem?
source share