The following exception throws while batch updating using Hibernate 3.x with JDBC driver 9.2.0.1:
java.lang.NullPointerException
at oracle.jdbc.dbaccess.DBData.clearItem(DBData.java:431)
at oracle.jdbc.dbaccess.DBDataSetImpl.clearItem(DBDataSetImpl.java:3528)
at oracle.jdbc.driver.OraclePreparedStatement.clearParameters(OraclePreparedStatement.java:3401)
I found the solution from a posting in Oracle forum (http://forums.oracle.com/forums/thread.jspa?threadID=190963) and that says:
Oracle seems to have corrected one line in in
oracle.jdbc.dbaccess.DBData, method void clearItem(int i)
version 9.2.0.1:
if(m_items == null && i >= m_items.length) {
version 9.2.0.3:
if(m_items == null || i >= m_items.length) {
----
Another way to avoid this NPE is to avoid using the JDBC2 batch update feature.
For our (hibernate) implementation this corresponds to setting the property 'jdbc.batch_size' to zero.
No comments:
Post a Comment