diff --git a/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/BatchingPreparedStatementManagerImpl.java b/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/BatchingPreparedStatementManagerImpl.java index 411d869f3..c09ce8146 100644 --- a/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/BatchingPreparedStatementManagerImpl.java +++ b/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/BatchingPreparedStatementManagerImpl.java @@ -224,9 +224,10 @@ public class BatchingPreparedStatementManagerImpl extends } finally { _batchedSql = null; batchedRows.clear(); - //Clear the Params now....should this be done above? - ps.clearParameters(); if (ps != null) { + //Clear the Params now....should this be done above? No. + //if JDBC provider using PureQuery, ps is null + ps.clearParameters(); try { ps.close(); } catch (SQLException sqex) {