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

后端 未结 4 720
清歌不尽
清歌不尽 2021-01-13 15:50

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

4条回答
  •  花落未央
    2021-01-13 16:48

    Dont Cast again like:

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

    Solution :

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

提交回复
热议问题