title: QuickFIX/J mixing two different versions
body: <p>I am writing an application that uses QuickFIX/J as FIX framework.
  My counterpart sends me an <code>ExecutionReport</code> message of FIX version 4.4
  But only some fields (the <code>Parties</code> component) are of version 5.0</p>
  
  <p>Now I am trying to implement that I can read this component.</p>
  
  <p>This one</p>
  
  <pre><code>@Override
  public void onMessage(quickfix.fix44.ExecutionReport message, SessionID sessionID)
      throws FieldNotFound, UnsupportedMessageType, IncorrectTagValue {
  
      quickfix.fix50.component.Parties parties = new Parties();
      message.get(parties);
      // ...
  }
  </code></pre>
  
  <p>doesn't work! Message is from version 4.4 and thats why <code>message.get(...)</code> only wants a <code>quickfix.fix44.component.Parties</code>, not one of version 5.0</p>
  
  <p>If I try this</p>
  
  <pre><code>@Override
  public void onMessage(quickfix.fix50.ExecutionReport message, SessionID sessionID)
      throws FieldNotFound, UnsupportedMessageType, IncorrectTagValue {
  
      // ...
  }
  </code></pre>
  
  <p>I get the following error:</p>
  
  <pre><code>Exception in thread "pool-2-thread-1" java.lang.VerifyError: Bad type on operand stack
  Exception Details:
    Location:
      quickfix/fix44/ExecutionReport.get(Lquickfix/field/SettlType;)Lquickfix/field/SettlType; @2: invokevirtual
    Reason:
      Type 'quickfix/field/SettlType' (current frame, stack[1]) is not assignable to 'quickfix/CharField'
    Current Frame:
      bci: @2
      flags: { }
      locals: { 'quickfix/fix44/ExecutionReport', 'quickfix/field/SettlType' }
      stack: { 'quickfix/fix44/ExecutionReport', 'quickfix/field/SettlType' }
    Bytecode:
      0000000: 2a2b b600 5657 2bb0                    
  
      at quickfix.fix44.MessageFactory.create(MessageFactory.java:195)
      at quickfix.DefaultMessageFactory.create(DefaultMessageFactory.java:133)
      at quickfix.MessageUtils.parse(MessageUtils.java:145)
      at quickfix.mina.AbstractIoHandler.messageReceived(AbstractIoHandler.java:118)
      at org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.messageReceived(DefaultIoFilterChain.java:854)
      at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:542)
      at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1300(DefaultIoFilterChain.java:48)
      at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:943)
      at org.apache.mina.filter.codec.ProtocolCodecFilter$ProtocolDecoderOutputImpl.flush(ProtocolCodecFilter.java:405)
      at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:235)
      at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:542)
      at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1300(DefaultIoFilterChain.java:48)
      at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:943)
      at org.apache.mina.core.filterchain.IoFilterAdapter.messageReceived(IoFilterAdapter.java:109)
      at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:542)
      at org.apache.mina.core.filterchain.DefaultIoFilterChain.fireMessageReceived(DefaultIoFilterChain.java:535)
      at org.apache.mina.core.polling.AbstractPollingIoProcessor.read(AbstractPollingIoProcessor.java:714)
      at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:668)
      at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:657)
      at org.apache.mina.core.polling.AbstractPollingIoProcessor.access$600(AbstractPollingIoProcessor.java:67)
      at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:1121)
      at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)
  </code></pre>
  
  <p>This is because I am getting 4.4 fields, but want to treat them like 4.4 versions.. Look <a href="http://www.google.de/url?sa=t&amp;rct=j&amp;q=&amp;esrc=s&amp;source=web&amp;cd=1&amp;ved=0CCEQFjAA&amp;url=http%3A%2F%2Fsourceforge.net%2Fp%2Fquickfixj%2Fmailman%2Fmessage%2F32791285%2F&amp;ei=qx9CVY_MJsHSaMe5gMAH&amp;usg=AFQjCNFtMTvKR4hErCn8HMx9aw4du7EPHQ&amp;sig2=XU9rf0HPAH6EZFoJxbQ0Vg&amp;bvm=bv.92189499,d.bGQ" rel="noreferrer">here</a></p>
  
  <p>Maybe anyone can help me...</p>
  
  <p>Thanks for your effort!!</p>