My Oracle Support Banner

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

Last updated on JUNE 29, 2020

Applies to:

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

Symptoms

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:

 

Cause

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
Symptoms
Cause
Solution
References

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