I have problem retrieving a blob object from oracle DB to java API with jdbc. The problem is when I execute a Collable statement with a function from the db which return me
I got this error while generating a jasper report.
I replaced the class=oracle.jdbc.OracleBlob
with class=java.sql.Blob
in the jrxml file of that report. It worked for me.
Sometime one JAR is in the application classpath and another is in the application server classpath (eg.: in Tomcat $CATALINA_HOME/lib
)
Two oracle jar files may be in your classpath. Please remove one jar and deploy again.
Dont Cast again like:
BLOB tempBlob = (oracle.sql.BLOB)cstmt.getObject(1);
Solution :
OutputStream outstrm =(rs.getBlob(1)).setBinaryStream(1L);