Hi, attempting to insert a blob into an oracle database (tried 10g and 11g), and tried ojdbc5 & 6 with both databases too but keep getting the following error when posting:
Exception in thread "main" java.lang.AbstractMethodError: oracle.jdbc.driver.OraclePreparedStatementWrapper.setBinaryStream(ILjava/io/InputStream;J)V
column is of type java.sql.blob.
using:
File file = new File("D:\\test.txt"); byte[] bFile = new byte[(int) file.length()]; FileInputStream fileInputStream = new FileInputStream(file); fileInputStream.read(bFile); fileInputStream.close(); con.setDocument(Hibernate.getLobCreator(session).createBlob(bFile)); session.save(con); //throws above hibernate error.
Has anyone else come across this issue, or any tips?
Cheers,
Tim.
|