Exception: Can't write; duplicate key in table '#sql-948_1fc' [message #1423127] |
Sat, 13 September 2014 20:05  |
Eclipse User |
|
|
|
Hi all,
I get a lot of the following Exceptions when my applications starts:
[EL Warning]: 2014-09-14 01:49:15.005--ServerSession(8488715)--Exception
[EclipseLink-4002] (Eclipse Persistence Services -
2.5.2.v20140319-9ad6abd):
org.eclipse.persistence.exceptions.DatabaseException
Internal Exception:
com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException:
Can't write; duplicate key in table '#sql-948_1fc'
Error Code: 1022
Call: ALTER TABLE MY_TABLE ADD CONSTRAINT FK_MY_TABLE_FK_FOREIGNTAB
FOREIGN KEY (FK_FOREIGNTAB) REFERENCES MY_TABLE (ID)
Query: DataModifyQuery(sql="ALTER TABLE MY_TABLE ADD CONSTRAINT
FK_MY_TABLE_FK_FOREIGNTAB FOREIGN KEY (FK_FOREIGNTAB) REFERENCES
MY_TABLE (ID)")
The application then runs correctly, but I don't know how to eliminate
this Exception. How could I do this?
My persistence properties:
<exclude-unlisted-classes>true</exclude-unlisted-classes>
<properties>
<property name="eclipselink.ddl-generation"
value="create-or-extend-tables" />
<property name="eclipselink.logging.level" value="FINE" />
</properties>
Any hints are welcome...
TIA,
Ralf.
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03136 seconds