Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

177
Vistas
quickfix/field/HaltReason is not assignable to 'quickfix/IntField

When I logon, I'm sending a application message request (BW) and server responding with multiple type of messages, but for the Security Status one, it returns Halt Reason Exception. I have 2 onMessage function, these for Security Definition Report and Security Definition Update Report. Security Status does not have onMessage function because I am not using this message so I do not expect to handle other type of messages. When a security status message received, we are getting HaltReason exception. And after all this, our client can't receive any heartbeat from server, so our client is disconnecting and sending another login request. It causes a loop which we get messages, disconnect with Halt reason exception and request again. We are using FIX50SP2 with FIXT1.1 but MessageCracker maps these messages to FIX50. Also We use quickfix 2.3.1 version and DefaultMessageFactory for receiving FIX messages.

Example:

event> (Received logon)

incoming> (8=FIXT.1.1 9=00000 35=f 49=foo 56=foo 34=0000 57=0000 52=20220302-10:11:09.908 1180=R 1181=0000 1350=0000 55=foo 48=0000 22=M 336=135 325=N 60=20220302-10:11:09.908 10=119)

error> (java.lang.VerifyError: Bad type on operand stack Exception Details: Location: quickfix/fix50/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/fix50/SecurityStatus', 'quickfix/field/HaltReason' } stack: { 'quickfix/fix50/SecurityStatus', 'quickfix/field/HaltReason' } Bytecode: 0x0000000: 2a2b b600 2457 2bb0

java.lang.VerifyError: Bad type on operand stack Exception Details: Location: quickfix/fix50/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/fix50/SecurityStatus', 'quickfix/field/HaltReason' } stack: { 'quickfix/fix50/SecurityStatus', 'quickfix/field/HaltReason' } Bytecode: 0x0000000: 2a2b b600 2457 2bb0

at quickfix.fix50.MessageFactory.create(MessageFactory.java:120)
at quickfix.DefaultMessageFactory.create(DefaultMessageFactory.java:141)
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)

)

pom.xml :

<dependency>
            <groupId>org.quickfixj</groupId>
            <artifactId>quickfixj-core</artifactId>
            <version>2.3.1</version>
        </dependency>
        <dependency>
            <groupId>org.quickfixj</groupId>
            <artifactId>quickfixj-messages-fix40</artifactId>
            <version>2.0.0</version>
        </dependency>
        <dependency>
            <groupId>org.quickfixj</groupId>
            <artifactId>quickfixj-messages-fix41</artifactId>
            <version>2.0.0</version>
        </dependency>
        <dependency>
            <groupId>org.quickfixj</groupId>
            <artifactId>quickfixj-messages-fix42</artifactId>
            <version>2.0.0</version>
        </dependency>
        <dependency>
            <groupId>org.quickfixj</groupId>
            <artifactId>quickfixj-messages-fix43</artifactId>
            <version>2.0.0</version>
        </dependency>
        <dependency>
            <groupId>org.quickfixj</groupId>
            <artifactId>quickfixj-messages-fix44</artifactId>
            <version>2.0.0</version>
        </dependency>
        <dependency>
            <groupId>org.quickfixj</groupId>
            <artifactId>quickfixj-messages-fix50</artifactId>
            <version>2.3.1</version>
        </dependency>

FIXApplication50.java:

import org.apache.log4j.Logger;
import quickfix.Message;
import quickfix.MessageCracker;
import quickfix.*;
import quickfix.field.*;
import quickfix.fix50.*;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

public class FIXApplication50 extends MessageCracker implements Application {

    public FIXApplication50() throws ConfigError {
    }

    public void onMessage(SecurityDefinition refData, SessionID sessionID) {
        
    }

    public void onMessage(SecurityDefinitionUpdateReport refData, SessionID sessionID) {

    }

    public void onCreate(SessionID sessionID) {

    }

    public void sendApplicationMessageRequest(Message message, SessionID sessionID) {

    }

    public void onLogon(SessionID sessionID) {
        Message message = new Message();

        sendApplicationMessageRequest(message, sessionID);
    }

    public void onLogout(SessionID sessionID) {

    }


    public void toAdmin(Message message, SessionID sessionID) {
      
    }


    public void fromAdmin(Message message, SessionID sessionID) throws FieldNotFound, IncorrectDataFormat, IncorrectTagValue, RejectLogon {

    }


    public void toApp(Message message, SessionID sessionID) throws DoNotSend {

    }

    public void fromApp(Message message, SessionID sessionId)
            throws FieldNotFound, IncorrectDataFormat, IncorrectTagValue, UnsupportedMessageType {
        crack(message, sessionId);
    }
}

session.properties :

[DEFAULT]
ConnectionType=initiator
ReconnectInterval=60
ResetOnLogon=Y
FileLogPath=logs/plugins/foo/Client_Logs
SenderCompID=foo
SenderSubID=foo
ValidateIncomingMessage=N

[SESSION]
BeginString=FIXT.1.1
TargetCompID=foo
StartDay=sunday
EndDay=friday
StartTime=21:35:00
EndTime=21:30:00
HeartBtInt=30
CheckLatency=N
SocketConnectPort=0000
SocketConnectHost=00.00.00
DefaultApplVerID=FIX.5.0SP2
TransportDataDictionary=config/plugins/foo/FIXT11.xml
AppDataDictionary=config/plugins/foo/RefDataFIX50sp2.xml
over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

I'm not sure precisely what is causing your exception, but I do see some issues that you should address:

  1. Config issues:

    Looks like you are using FIX50SP2, so you need:

    • UseDataDictionary=Y
    • AppDataDictionary=<path/to/your/FIX50SP2.xml>
    • TransportDataDictionary=<path/to/your/FIXT11.xml>

    (In asker's initial edit, these fields were not present)

    And I don't think you want ValidateIncomingMessage=N. This setting always tells me that someone doesn't know what they're doing! If your connection is using repeating groups (and I've never seen one that doesn't), you must have a correct DD. If your DD is correct, then validation is nothing to worry about.

    Also, do you really need CheckLatency=N?

  2. You probably do need a SecurityStatus handler

    Security Status does not have onMessage function because I am not using this message so I do not expect to handle other type of messages.

    If you do not provide an onMessage(SecurityStatus) handler, then your app will respond to those messages with 35=j rejections. If you truly want to ignore this message, then you should add this handler with an empty implementation.

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda