[hibernate-issues] [Hibernate-JIRA] Created: (HHH-2237) Oracle driver and BLOB types fail in real world scenario
Magesh Kumar Bojan (JIRA)
noreply at atlassian.com
Tue Nov 14 04:10:04 EST 2006
Oracle driver and BLOB types fail in real world scenario
--------------------------------------------------------
Key: HHH-2237
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2237
Project: Hibernate3
Type: Bug
Components: core
Versions: 3.2.0.ga
Environment: JBoss AS 4.0.4 GA, JBoss Portal 2.4 GA
Reporter: Magesh Kumar Bojan
Attachments: test.log
When JBoss Portal is started up using Oracle 10g (10.2.0.1) and using the Oracle JDBC driver (version 10.2.0.2), and using the JBoss Portal CMS module, if you upload a file, it throws IOExceptions. The file size is arbitrary and should be more than 100KB. Some of the IOExceptions thrown are and not limited to:
java.sql.SQLException: Io exception: Bad file descriptor
and
java.sql.BatchUpdateException: Io exception: Read error
Please use the attached test.log for testing.
There is a workaround for this as in you can modify the BlobImpl like this and it works:
public BlobImpl(InputStream stream, int length) {
byte[] bytes = new byte[length];
try {
stream.read(bytes,0,length);
} catch (IOException e) {
e.printStackTrace();
} finally {
try {
stream.close();
} catch (IOException e) {
//ignore
}
}
this.stream = new ByteArrayInputStream(bytes);
this.length = bytes.length;
}
This code is not optimized, but for those who feel they need an urgent fix, this works!
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list