[QFJ-586] SQL error when restarting QuickFIX/J session (java.sql.SQLException: ORA-00001: unique constraint violated) Created: 12/Apr/11 Updated: 25/Jul/14 Resolved: 25/Jul/14 |
|
Status: | Closed |
Project: | QuickFIX/J |
Component/s: | Engine |
Affects Version/s: | 1.3.3, 1.5.0 |
Fix Version/s: | 1.5.3 |
Type: | Bug | Priority: | Major |
Reporter: | Thomas Kinch | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 0 |
Labels: | None | ||
Environment: |
Windows/Linux |
Description |
I am using both 1.3.3 and 1.5.0 with an Oracle DB session/message store. I have set JdbcSessionIdDefaultPropertyValue="NA" and am seeing the row get created properly, but the imcoming_seqnum and outgoing_seqnum are not being updated, and when I restart the session I get a unique constraint violation. It appears that QuickFIX/J is using the 'null' session_qualifier rather than the JdbcSessionIdDefaultPropertyValue value for evaluating whether or not to create a new row. Am I going to be forced to set all of the session fields (LocId and SessionQualifier) to non-null values to get QuickFIX/J working properly with Oracle? |
Comments |
Comment by Varun Sud [ 25/Jul/13 ] |
I encountered exactly the same problems: It turned out that I was using the CHAR datatype for the BEGINSTRING column of SESSIONS table. This would have happened because I used the MySQL scripts, modified them for Derby and then for Oracle. Switching all text fields to VARCHAR2 type solved the problem for me. CHAR datatype apparently is fixed length in Oracle, so subsequent queries must also be blank-padded. Would it be useful to add standard scripts for Derby and Oracle? (log table scripts are not available for Oracle currently) |
Comment by Colin DuPlantis [ 24/Jul/14 ] |
I think this issue can be closed in 1.5.3. I just tested Oracle with the provided Oracle scripts and JdbcSessionIdDefaultPropertyValue. No problems with seq num and restarts. |
Comment by Christoph John [ 25/Jul/14 ] |
Thanks for the hint. |