Hi,
I have the following problem. The code snippet below:

// Get an oracle specific blob
_log.info("Blob type = (" blob.getClass().getName() ")");
oracle.sql.BLOB oBlob = null;
if (blob != null && blob instanceof weblogic.jdbc.wrapper.Blob) {
weblogic.jdbc.wrapper.Blob wblob = (weblogic.jdbc.wrapper.Blob) blob;
Object vendorBlob = wblob.getVendorObj();
_log.info("Blob type = (" vendorBlob.getClass().getName() ")");
if (vendorBlob != null && vendorBlob instanceof oracle.sql.BLOB) {
oBlob = (oracle.sql.BLOB) vendorBlob;
}
} else if (blob != null && blob instanceof oracle.sql.BLOB) {
oBlob = (oracle.sql.BLOB) blob;
}

// If the oracle specific blob is not null
if (oBlob != null) {

InputStream in = image.getBinaryStream();

_log.info("Opening the oracle blob");
oBlob.open(oracle.sql.BLOB.MODE_READWRITE);

_log.info("getting the oracle binaryStream");
OutputStream os = oBlob.getBinaryOutputStream();
int bufsize = EcatConstants.BUFFER_SIZE;
byte[] buffer = new byte[bufsize];
int read = 0;
_log.info("reading the input stream");
while ((read = in.read(buffer)) > 0) {
os.write(buffer);
}
os.flush();
os.close();

// save the blob
_log.info("Closing the blob.");
oBlob.close();

// Refresh the dbImage again
_session.refresh(dbImage, LockMode.UPGRADE); //grabs an Oracle BLOB

// Save the item
_transaction.commit();
_session.flush();
_log.info("saved the object, I hope");


On a linux machine, the lines above work. But on a Windows machine, both the blob and the other data do not get committed to the database. I'm using hibernate for persistence.

I'm at my wit's end, and any help will be appreciated.