Our problem has been resolved, and it was due to our own deployment problem, nothing to do with Hibernate, Oracle drivers, or Lukasz's proposed workaround.
Many pardons. However, to make it up to the community, here are my notes on the DataDirect Oracle drivers.
Since we suspected a problem with the StringClobType workaround for the buggy Oracle drivers, I downloaded a 15-day trial version of the DataDirect Oracle drivers to use instead.
Swapping the new driver in was pretty easy, but here are some notes to help out anyone else who wants to do it.
in hibernate.cfg.xml, I replaced this:
<property name="hibernate.connection.url">
jdbc:oracle:thin:@perseus:1521:xroads
</property>
<property name="hibernate.connection.driver_class">
oracle.jdbc.driver.OracleDriver
</property>
with this:
<property name="hibernate.connection.url">
jdbc:datadirect:oracle://perseus:1521;SID=xroads
</property>
<property name="hibernate.connection.driver_class">
com.ddtek.jdbc.oracle.OracleDriver
</property>
In our HBM file, I replaced this:
<property
column="CLOB_DATA"
name="clobData"
not-null="true"
type="com.pallas.hibernate.clob.OracleClobType"
/>
with this:
<property
column="CLOB_DATA"
name="clobData"
not-null="true"
type="text"
/>
You can remove the Interceptor, although leaving it in place does not cause any errors. It will just cease to have anything to intercept.
After fixing our deployment issue, I found that the StringClobType workaround and the DataDirect driver both appear to work quite well at resolving the CLOB issues that occur with the stock Oracle driver. User either solution that you prefer. StringClobType is free, so I'll be going with that. I am also hoping that in future versions of Hibernate this fix will be built-in, so that we can all avoid the pain and suffering of Oracle CLOB bugginess.
|