title: QuickFIX/J: Type 'quickfix/field/HaltReason' is not assignable to 'quickfix/IntField'
body: <p><strong>Summary</strong></p>
  <p>We have a quickfix client which receives SecurityDefiniton and SecurityDefinitionUpdateReport messages. These are bulk datas. When we logged to the server they send messages around 8000. At the end they're sending SecurityStatus message. In this part we are getting an exception.</p>
  <p>Fix protocol version: FIX50SP2 with FIXT1.1</p>
  <p>Quickfix message dependency</p>
  <pre><code>&lt;dependency&gt;
         &lt;groupId&gt;org.quickfixj&lt;/groupId&gt;
         &lt;artifactId&gt;quickfixj-messages-fix50sp2&lt;/artifactId&gt;
         &lt;version&gt;2.3.0&lt;/version&gt;
  &lt;/dependency&gt;
  </code></pre>
  <p>Quickfix Core</p>
  <pre><code>&lt;dependency&gt;
         &lt;groupId&gt;org.quickfixj&lt;/groupId&gt;
         &lt;artifactId&gt;quickfixj-core&lt;/artifactId&gt;
         &lt;version&gt;2.0.0&lt;/version&gt;
  &lt;/dependency&gt;
  </code></pre>
  <p>Exception we received;</p>
  <pre><code>Exception in thread &quot;pool-5-thread-1&quot; java.lang.VerifyError: Bad type on operand stack
  Exception Details:
    Location:
      quickfix/fix50sp2/SecurityStatus.get(Lquickfix/field/HaltReason;)Lquickfix/field/HaltReason; @2: invokevirtual
    Reason:
      Type 'quickfix/field/HaltReason' (current frame, stack[1]) is not assignable to 'quickfix/IntField'
    Current Frame:
      bci: @2
      flags: { }
      locals: { 'quickfix/fix50sp2/SecurityStatus', 'quickfix/field/HaltReason' }
      stack: { 'quickfix/fix50sp2/SecurityStatus', 'quickfix/field/HaltReason' }
    Bytecode:
      0x0000000: 2a2b b600 1557 2bb0
  
          at quickfix.fix50sp2.MessageFactory.create(MessageFactory.java:297)
          at foo.bar.data.plugin.fix.api.MessageFactory.MessageFactorySp2.create(MessageFactorySp2.java:93)
          at quickfix.MessageUtils.parse(MessageUtils.java:145)
          at quickfix.mina.AbstractIoHandler.messageReceived(AbstractIoHandler.java:131)
          at org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.messageReceived(DefaultIoFilterChain.java:858)
          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:947)
          at org.apache.mina.filter.codec.ProtocolCodecFilter$ProtocolDecoderOutputImpl.flush(ProtocolCodecFilter.java:398)
          at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:234)
          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:947)
          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:703)
          at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:659)
          at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:648)
          at org.apache.mina.core.polling.AbstractPollingIoProcessor.access$600(AbstractPollingIoProcessor.java:68)
          at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:1120)
          at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
          at java.lang.Thread.run(Thread.java:748)
  </code></pre>
  <p>We couldn't get SecurityStatus fix message. The problem we thought was about datadictionary. As a field HaltReason is a CharField</p>
  <pre><code>public class HaltReason extends CharField {
      static final long serialVersionUID = 20050617L;
      public static final int FIELD = 327;
      public static final char NEWS_DISSEMINATION = 'D';
      public static final char ORDER_INFLUX = 'E';
      public static final char ORDER_IMBALANCE = 'I';
      public static final char ADDITIONAL_INFORMATION = 'M';
      public static final char NEWS_PENDING = 'P';
      public static final char EQUIPMENT_CHANGEOVER = 'X';
  </code></pre>
  <p>When we look FIX50SP2 default datadictionary halt reason field is INT.</p>
  <pre><code>&lt;field number=&quot;327&quot; name=&quot;HaltReasonInt&quot; type=&quot;INT&quot;&gt;
  &lt;value enum=&quot;0&quot; description=&quot;NEWS_DISSEMINATION&quot;/&gt;
  &lt;value enum=&quot;1&quot; description=&quot;ORDER_INFLUX&quot;/&gt;
  &lt;value enum=&quot;2&quot; description=&quot;ORDER_IMBALANCE&quot;/&gt;
  &lt;value enum=&quot;3&quot; description=&quot;ADDITIONAL_INFORMATION&quot;/&gt;
  &lt;value enum=&quot;4&quot; description=&quot;NEWS_PENDING&quot;/&gt;
  &lt;value enum=&quot;5&quot; description=&quot;EQUIPMENT_CHANGEOVER&quot;/&gt;
  &lt;/field&gt;
  </code></pre>
  <p>We tried convert dictionary field to HaltReasonChar and the type CHAR but it didn't work. Did you ever get an exception like this?</p>
  <p>Here's the security status message which I received.</p>
  <pre><code>8=FIXT.1.19=00017835=f49=BI_TEST56=LIABR34=589857=TRTK152=20220208-20:07:15.9281180=R1181=28513331350=285133255=T2-ON48=3762690422=M336=148325=N60=20220208-20:07:15.92810=245
  </code></pre>