[QFJ-979] Oracle schema definitions missing from the latest releases Created: 11/Jun/19 Updated: 24/Apr/21 Resolved: 01/Jan/21 |
|
Status: | Closed |
Project: | QuickFIX/J |
Component/s: | Metadata/Specs |
Affects Version/s: | 2.0.0, 2.1.1 |
Fix Version/s: | 2.3.0 |
Type: | Bug | Priority: | Default |
Reporter: | Beirti O'Nunain | Assignee: | Christoph John |
Resolution: | Fixed | Votes: | 0 |
Labels: | None |
Description |
Looking in the QuickFixJ 2.x releases, it looks like the SQL schema definitions for oracle are missing some tables which are defined for other databases. (event_log, messages_log) I can't find any documentation which suggests that they aren't required for Oracle. I can craft them manually but am curious why they're omitted. |
Comments |
Comment by Beirti O'Nunain [ 11/Jun/19 ] |
I'm guessing that this is the correct SQL? (Oracle 12 identity columns) CREATE TABLE EVENT_LOG ( CREATE TABLE MESSAGES_LOG ( |
Comment by Beirti O'Nunain [ 11/Jun/19 ] |
Getting errors on session initialization. It seems to be attempting to insert without specifying all parameters required by the table. I've not had this issue in MSSQL private void loadCache() throws SQLException, IOException { else { insert = connection.prepareStatement(SQL_INSERT_SESSION); int offset = setSessionIdParameters(insert, 1); insert.setTimestamp(offset++, new Timestamp(cache.getCreationTime().getTime())); insert.setInt(offset++, cache.getNextTargetMsgSeqNum()); insert.setInt(offset, cache.getNextSenderMsgSeqNum()); insert.execute(); }} finally { JdbcUtil.close(sessionID, rs); JdbcUtil.close(sessionID, query); JdbcUtil.close(sessionID, insert); JdbcUtil.close(sessionID, connection); }} {{Caused by: java.lang.RuntimeException: java.sql.SQLIntegrityConstraintViolationException: ORA-01400: cannot insert NULL into ("SKYROAD"."FIX_SESSIONS"."SENDERSUBID") at quickfix.JdbcStoreFactory.create(JdbcStoreFactory.java:47) ~[quickfixj-core-2.0.0.jar:2.0.0] at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:450) ~[ojdbc7-12.1.0.2.0.jar:12.1.0.2.0] |
Comment by Beirti O'Nunain [ 11/Jun/19 ] |
Following up with our DBA, it seems you can skip specificying a 'not null' column in MSSQL but not in Oracle. I guess nobody is using Oracle with QuickFixJ?! |
Comment by Christoph John [ 08/Jul/19 ] |
Hi, |
Comment by Christoph John [ 08/Jul/19 ] |
I don't know if it fixes your problem, but did you try setting JdbcSessionIdDefaultPropertyValue? See https://www.quickfixj.org/usermanual/2.1.0/usage/configuration.html |
Comment by Beirti O'Nunain [ 10/Jul/19 ] |
Sad times friend! I've been using the mssql one in production for a few months and find it great for managing searching and archiving of raw logs. Just set up the oracle one now too and it seems to be going ok. Fingers crossed?! |
Comment by Christoph John [ 16/Jul/19 ] |
So did the JdbcSessionIdDefaultPropertyValue work for you? Thanks and best regards, |
Comment by Beirti O'Nunain [ 14/Mar/20 ] |
Hi Chris, Apologies for the very late reply. I ended up giving up on Oracle. Everything's been running swimmingly on MSSQL in our production setup with 20 or so applications sharing a database so I've left it there. If I get stuck having to use Oracle in the future I'll revisit and submit a PR with the schema defs once I get it working. Cheers, |
Comment by Christoph John [ 15/Mar/20 ] |
OK, thanks for the update. |
Comment by Christoph John [ 01/Jan/21 ] |