Subject Foreign Key Violation on existing foreign key
Author veronique_guerin
Hello,
Foreign key violation occurs but shouldn't.
I have 2 tables : MVT and CONT_GEST.
I only insert and update on MVT (no delete), it has a foreign key on
CONT_GEST.
The table CONT_GEST has only 2 records, and the foreign key is always
on the same record.
a foreign key violation occurs randomly and often, and fields (on
foreign key) are well formed.

Note :
Firebird 1.5.3
Jaybird
Multi-user context
2 fields compose the foreign key
I have 2 program in use : a program jar and a tomcat program.
Tomcat 4.1.31 on jdk 1.4.2-08

my error :
org.firebirdsql.jdbc.FBSQLException: GDS Exception. 335544345. lock
conflict on no wait transaction
violation of FOREIGN KEY constraint "MVT_CONT_PHYS_CONT_GEST_EXIST"
on table "LG_MVT_CONT_PHYS"
at
org.firebirdsql.jdbc.AbstractPreparedStatement.internalExecute
(AbstractPreparedStatement.java:483)
at
org.firebirdsql.jdbc.AbstractPreparedStatement.executeUpdate
(AbstractPreparedStatement.java:144)