Oracle's thin JDBC driver fails in
JDBCUtil.setParameter for LONGVARBINARY when setting
BLOBs. There is a similar problem reported in 525663
but it does not address this particular concern. This
is required for Nukes BLOB file storage when using an
The attached patch offers a solution but I wonder if
there's a better way of achieving the result. In brief,
Oracle's handling of BLOBs is quite unique. This patch
detects the presence of the Oracle JDBC driver, then
sets up a routine to create an oracle.sql.BLOB object.
Since the oracle.sql.BLOB object is Oracle specific,
the build file for server gets an added classpath
dependency. I know this isn't the best place for this
but since the Oracle driver isn't part of /thirdparty,
I didn't want to mess with the buildfragments.
Also, given that the routine is in JDBCUtil, the only
way to get the underlying Oracle connection required
for oracle.sql.LOB.createTemporary(), is to expose the
managed connection in WrappedConnection.java. This is
particularly troublesome because it creates a
dependency on the "connector" module in the "server"
Anyhow, this works, but I certainly welcome a cleaner
implementation, especially with regards to satisfying
the dependence I just mentioned.
See patch for the nuts and bolts of it.
Log in to post a comment.