Last updated on OCTOBER 31, 2013
Applies to:Oracle TopLink - Version 18.104.22.168 to 22.214.171.124 [Release 12c]
Information in this document applies to any platform.
The issue occurs when a relation between two tables (such as a composite primary key) is specified in orm.xml with two tables that are related by a column with the same name.
In this scenario orm.xml parsing fails as it appears it cannot properly parse the line, for example:
which throws the exception, for example:
Exception Description: Predeployment of PersistenceUnit [rd1] failed.
Internal Exception: Exception [EclipseLink-7222] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.ValidationException
Exception Description: An incomplete @PrimaryKeyJoinColumns was specified on the annotated element [class someapp.app.appdom.domain.rd1.From]. When specifying @PrimaryKeyJoinColumns for an entity that has a composite primary key, a @PrimaryKeyJoinColumn must be specified for each primary key join column using the @PrimaryKeyJoinColumns. Both the name and the referencedColumnName elements must be specified in each such @PrimaryKeyJoinColumn.
If this line is commented out the exception is not thrown. Also the exception is not thrown when using annotation instead of specifiying in orm.xml
Sign In with your My Oracle Support account
Don't have a My Oracle Support account? Click to get started
Million Knowledge Articles and hundreds of Community platforms