EclipseLink Support for DB2 Sequence Objects (Doc ID 1147814.1)

Last updated on MARCH 12, 2015

Applies to:

Oracle TopLink - Version 11.1.1.0.1 and later
Information in this document applies to any platform.

Symptoms


When attempting to use DB2 sequence objects for generating primary keys using JPA (Toplink Essentials or EclipseLink), an exeception similiar to the following occurs when attempting to persist the data:

Could not commit JPA transaction; nested exception is javax.persistence.RollbackException: Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2.0 (Build 36 (02/17/2007))): oracle.toplink.essentials.exceptions.DatabaseException
Internal Exception: com.ibm.db2.jcc.c.SqlException: DB2 SQL error: SQLCODE: -407, SQLSTATE: 23502, SQLERRMC: ADDRESS_IDError Code: -407
Call:INSERT INTO PERSON_ADDR (CITY, ADDR_SOURCEID) VALUES (?, ?)




Cause

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