java.lang.ClassCastException: oracle.sql.BLOB cannot be cast to oracle.sql.BLOB

纵饮孤独 提交于 2019-12-01 06:51:37

Two oracle jar files may be in your classpath. Please remove one jar and deploy again.

Frizz1977

Sometime one JAR is in the application classpath and another is in the application server classpath (eg.: in Tomcat $CATALINA_HOME/lib)

Mohamed Maidheen

Dont Cast again like:

BLOB tempBlob = (oracle.sql.BLOB)cstmt.getObject(1);

Solution :

OutputStream outstrm =(rs.getBlob(1)).setBinaryStream(1L); 
Vinay

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.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!