[QFJ-603] Logout reason "Incorrect BeginString" on UnsupportedVersion exception is ambiguous Created: 26/May/11  Updated: 19/Nov/12  Resolved: 16/Nov/12

Status: Resolved
Project: QuickFIX/J
Component/s: Engine
Affects Version/s: 1.3.3
Fix Version/s: 1.5.3

Type: Bug Priority: Default
Reporter: Jörg Thönnes Assignee: Jörg Thönnes
Resolution: Fixed Votes: 0
Labels: None

Attachments: Text File clipboard.txt     Zip Archive mylyn-context.zip     Zip Archive mylyn-context.zip     Zip Archive mylyn-context.zip     Zip Archive mylyn-context.zip     File QFJ-603.patch    
Issue Links:
Duplicate
is duplicated by QFJ-574 Logout reason "Incorrect BeginString"... Closed

 Description   

We had the situation any FIX sessions were immediately logged out with the reason "Incorrect BeginString". But the session was configured to use "FIX.4.4" and the incoming message came with "FIX.4.4" so we wondered why this happened.

Finally, we found that the configured data dictionary had the wrong FIX version tag which was difficult to find.

Code Analysis

  • The logout reason "Incorrect BeginString" is sent if the exception UnsupportedVersion is thrown.
  • This exception is sent on two quite different occasions:
    • Incoming BeginString does not match the session configuration.
    • On validate, configured data dictionary does not match the session configuration.
  • In both cases, the same undifferentiated exception is thrown.

Improvements

  • Provide differentiating reason text to the UnsupportedVersion exception:
    • If the message version does not match the data dictionary version on message validation, then:
      • "Message version ' {1}' does not match the data dictionary version '{2}'"
        ** If the message version does not match the configured FIX session version on incoming messages, then:
        *** "Message version '{1}

        ' does not match the configured FIX session version '

        {2}

        '"



 Comments   
Comment by Jörg Thönnes [ 06/Jun/11 ]

Initial analysis.

Comment by Jörg Thönnes [ 11/Jun/11 ]

Extended DataDictionaryTest adding testMessageDataDictionaryMismatch which check that the UnsupportedVersion exception without any description is thrown. This is to check the current state.

But I also found that if bodyOnly is true, the data dictionary is not checked though used. This is unexpected
and should considered as wrong. Comments?

Comment by Jörg Thönnes [ 22/Jun/11 ]

Patch to add description to the UnsupportedVersion exception and
supply a unit test for it.

Comment by Jörg Thönnes [ 07/Aug/11 ]

Moved to a later version since we ran out of time.

Comment by Christoph John [ 14/Nov/12 ]

Attached suggested patch against trunk: !QFJ-603.patch

Comment by Jörg Thönnes [ 15/Nov/12 ]
  • applied patch
  • run units tests
  • committed code changes
Comment by Jörg Thönnes [ 16/Nov/12 ]

Resolving this issue as the build is now stable:

Generated at Sun May 05 11:02:33 UTC 2024 using JIRA 7.5.2#75007-sha1:9f5725bb824792b3230a5d8716f0c13e296a3cae.