NullPointerException Occurs When Executing clearBatch() Method Without Calling addBatch() Method

(Doc ID 1982179.1)

Last updated on JULY 26, 2017

Applies to:

JDBC - Version to [Release 11.2]
Information in this document applies to any platform.


 NullPointerException occurs when executing clearBatch() method without calling addBatch() method:

    at oracle.jdbc.driver.OracleStatement.clearBatchItems(
    at oracle.jdbc.driver.OracleStatement.clearBatch(
    at oracle.jdbc.driver.OracleStatementWrapper.clearBatch(

The simple example for this issue is as follows:



Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms