Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
Hello,
I am newbie to informix IDS 9.4. I am trying to run a test
jdbc program having multiple threads (2 threads). Trying
to insert rows into multiple tables where some of the
tables have foreign keys. I created a connection pool in
my main function and passing the statements to the thread
functions to be executed. The 'Connection' and 'Statement'
objects are different instances (so no sharing there!)
passed to each thread.
(I used the IfxConnectionPoolDataSource and IfxDataSource APIs
for pool creation)
I am getting the following exception even though I verified
that the foreign key column value is existing in the
referred table. The same program works fine if I use just
'1' thread. Is there something I need to set ? Is there
something on the virtual processor settings that I need to
change? (I am using the default values just out of install).
Thanks in advance.
-------------------
SQLException: Missing key in referenced table for referential constraint
(root.r209_638). error code : -691 error state: 23000
at com.informix.jdbc.IfxSqli.addException(IfxSqli.java:3082)
at com.informix.jdbc.IfxSqli.receiveError(IfxSqli.java:3396)
at com.informix.jdbc.IfxSqli.dispatchMsg(IfxSqli.java:2259)
at com.informix.jdbc.IfxSqli.receiveMessage(IfxSqli.java:2179)
at com.informix.jdbc.IfxSqli.executeCommand(IfxSqli.java:721)
at
com.informix.jdbc.IfxResultSet.executeUpdate(IfxResultSet.java:305)
at
com.informix.jdbc.IfxStatement.executeUpdateImpl(IfxStatement.java:882)
at
com.informix.jdbc.IfxStatement.executeUpdate(IfxStatement.java:206)
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.