My Oracle Support Banner

BatchUpdateException.getUpdateCounts() Returns Wrong Result In Specific Conditions (Doc ID 2682919.1)

Last updated on NOVEMBER 12, 2021

Applies to:

JDBC - Version and later
Information in this document applies to any platform.


BatchUpdateException.getUpdateCounts() returns wrong result in specific conditions like below.

  1. First batch returns ORA-1 due to duplicate primary key.
  2. Second batch returns ORA-1400 since it is trying to insert null to primary key.

In this case, the result of BatchUpdateException.getUpdateCounts() is expected to be empty but returns 1.

Code image:



To view full details, sign in with your My Oracle Support account.

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

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.