Hi, I'm using hibernate 2.1.8 to persist some blobs in an oracle 9i database. For this, I implemented something similar to what says in the hibernate wiki, http://www.hibernate.org/73.html, mapping a Blob to a char[]. I tested this on Jboss 4.0.3SP1 and works perfectly, but on JBoss 3.2.8SP1 it fails. The error happens when Hibernate calls the method that converts the blob to a char[], nullSafeSet(), on the line:
oracle.sql.BLOB blob = oracle.sql.BLOB.createTemporary( ((org.jboss.resource.adapter.jdbc.WrappedConnection)st.getConnection()).getDelegate(), false, oracle.sql.BLOB.DURATION_SESSION);
Hi,
try it using getObject insteadt of getBlob and saving the result in a byte[].