We noticed duplicated constraint creation warning in application logs when the application was first accessed since started. Since the constraint already exists, why eclipselink tries to create again and throw warnings? thanks.
[9/26/17 10:12:32:926 EDT] 0000007a eclipselink W CWWJP9991W: Exception [EclipseLink-4002] (Eclipse Pers istence Services - 2.6.3.WAS-v20160817-8475a53): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: com.ibm.db2.jcc.am.SqlSyntaxErrorException: The name of the object to be created is identical to the existing name "WRKLDLDMDULEWRKLD D" of type "FOREIGN KEY".. SQLCODE=-601, SQLSTATE=42710, DRIVER=3.63.123
Error Code: -601
Call: ALTER TABLE WORKLOAD_LOADMODULE ADD CONSTRAINT WRKLDLDMDULEWrkldD FOREIGN KEY (Workload_ID) REFERENCES WORKLOAD (ID)
Query: DataModifyQuery(sql="ALTER TABLE WORKLOAD_LOADMODULE ADD CONSTRAINT WRKLDLDMDULEWrkldD FOREIGN KEY (Workload_ID) REFERENCES WORKLOAD (ID)")
While another Unique constraint in the following, eclipselink ignore the duplicated creation, which makes more sense. Was the above error related to join table?
[9/26/17 10:12:32:883 EDT] 0000007a query 3 Execute query DataModifyQuery(sql="ALTER TABLE USERPREFERENCES ADD CONSTRAINT USERPREFERENCES0 UNIQUE (username)")
[9/26/17 10:12:32:884 EDT] 0000007a connection 3 Connection acquired from connection pool [read].
[9/26/17 10:12:32:884 EDT] 0000007a connection 3 reconnecting to external connection pool
[9/26/17 10:12:32:884 EDT] 0000007a sql 3 ALTER TABLE USERPREFERENCES ADD CONSTRAINT USERPREFERENCES0 UNIQUE (username)
[9/26/17 10:12:32:900 EDT] 0000007a sql 3 The referential, primary key, or unique constraint "USERPREFERENCES0" is ignored because it is a duplicate constraint.. SQLCODE=541, SQLSTATE=01543, DRIVER=3.63.123:01543 - null
[9/26/17 10:12:32:901 EDT] 0000007a connection 3 Connection released to connection pool [read].