Uploaded image for project: 'QuickFIX/J'
  1. QuickFIX/J
  2. QFJ-801

Validation fail on ClassCastException if using XML

    Details

    • Type: Bug
    • Status: Open
    • Priority: Default
    • Resolution: Unresolved
    • Affects Version/s: 1.5.3
    • Fix Version/s: None
    • Component/s: Engine
    • Labels:
    • Environment:
      Mac OSX

      Description

      It appears that the Message validation fails on a ClassCastException if the message contains the XmlDataLen tag.

      Example:
      https://gist.github.com/benoitx/e7da15dba9da133ac7b9

      It seems that the validation code only expects StringField but the XmlDataLen is an IntField.

      The output is:

      Testing WITHOUT XML
      8=FIXT.1.19=7935=649=Sender56=Target15=USD22=523=IOD-127=M28=N48=IBM.N54=255=IBM.N10=079
      Testing WITH XML
      8=FIXT.1.19=10335=649=Sender56=Target212=12213=<a>Hello</a>15=USD22=523=IOD-127=M28=N48=IBM.N54=255=IBM.N10=086
      Exception in thread "main" java.lang.ClassCastException: quickfix.field.XmlDataLen cannot be cast to quickfix.StringField
      	at quickfix.DataDictionary.iterate(DataDictionary.java:668)
      	at quickfix.DataDictionary.validate(DataDictionary.java:653)
      	at quickfix.DataDictionary.validate(DataDictionary.java:624)
      	at quickfix.DataDictionary.validate(DataDictionary.java:606)
      	at fixfun.IOIValidation.validateIoi(IOIValidation.java:45)
      	at fixfun.IOIValidation.validateIoiWithXml(IOIValidation.java:37)
      	at fixfun.IOIValidation.main(IOIValidation.java:78)
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              benoitx Benoit Xhenseval
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: