Hibernate version:
2.14
I have been trying to convert a working application with Hibernate connecting to Postgres, to use Oracle instead. I have however found a nasty bug with the latest Oracle 10g JDBC drivers (thin and OCI) that throw a NullPointerException when using prepared statement batching if there has been a prior unique constraint violation.
Basically we get the following.
1. An insert (which works).
2. An insert with some duplicate data violating a constraint (fails as expected).
3. An insert with no duplicate data which should work (NullPointerException in OraclePreparedStatement).
Apologies if this offends anyone, I know this is absolutely no problem with Hibernate and entirely an Oracle driver problem, but as Hibernate does have complete control over our persistence, I would just like to ask if any other Oracle Hibernate users have had this problem (a search has turned up nothing) and if so how it has been dealt with. The only option I can come up with so far is to set the batch_size to 0 to turn off batching in Hibernate. If anyone has any other suggestions, I would be extremely grateful to hear them.
Thanks for any help.
|