java.lang.NullPointerException

QuickFIX/J JIRA | Jörg Thönnes | 4 years ago
  1. 0

    QuickFIX/J Jira

    quickfixj.org | 6 months ago
    java.lang.NullPointerException
  2. 0

    QuickFIX/J Jira

    quickfixj.org | 3 months ago
    java.lang.NullPointerException
  3. 0

    In some cases the thread processing incoming FIX messages can get a NullPointerException accessing the ApplVerID if the Logon process is not complete, e.g. because the counter party did not answer with a Logon response but continues to send application messages. In real ife, this issue was observed as a counter party sent many FIX messages without noticing a FIX re-login: # counter party sends many messages # QF/J sends logout # counter party continues to send many messages # QF/J forces disconnect due to Logout time-out (no 35=5 received so far) # process restarts # QF/J creates a new session # QF/J sends Logon # counter party continues to send many messages (but no Logon) # QF/J receives a NPE for every message from the counter party: {code} [2012-11-08 14:44:26,644] [QFJ Timer] FIX.4.4:XXXAT->XXXFL:TEST-XXX-XXXFL-YYY: outgoing: 8=FIX.4.4|9=68|35=A|34=1079|49=XXXAT|52=20121108-13:44:26.640|56=XXXFL|98=0|108=30|10=124| [2012-11-08 14:44:26,699] [SocketConnectorIoProcessor-0.0] FIX.4.4:XXXAT->XXXFL:TEST-XXX-XXXFL-YYY: incoming: 8=FIX.4.4|9=375|35=8|34=65834|43=Y|49=XXXFL|50=BU/XXXFL|52=20121108-13:44:26.675|56=XXXAT|122=20121108-12:45:47|6=0|... [2012-11-08 14:44:26,712] [QFJ Timer] FIX.4.4:XXXAT->XXXFL:TEST-XXX-XXXFL-YYY: event : Initiated logon request [2012-11-08 14:44:26,801] [QFJ Message Processor] FIX.4.4:XXXAT->XXXFL:TEST-XXX-XXXFL-YYY: event : null java.lang.NullPointerException at quickfix.MessageUtils.toBeginString(MessageUtils.java:256) at quickfix.DefaultDataDictionaryProvider.getApplicationDataDictionary(DefaultDataDictionaryProvider.java:62) at quickfix.Session.next(Session.java:913) at quickfix.mina.SingleThreadedEventHandlingStrategy$SessionMessageEvent.processMessage(SingleThreadedEventHandlingStrategy.java:114) at quickfix.mina.SingleThreadedEventHandlingStrategy.block(SingleThreadedEventHandlingStrategy.java:77) at quickfix.mina.SingleThreadedEventHandlingStrategy$1.run(SingleThreadedEventHandlingStrategy.java:94) at java.lang.Thread.run(Thread.java:722) [2012-11-08 14:44:26,802] [SocketConnectorIoProcessor-0.0] FIX.4.4:XXXAT->XXXFL:TEST-XXX-XXXFL-YYY: incoming: 8=FIX.4.4|9=353|35=8|34=65835|43=Y|49=XXXFL|50=BU/XXXFL|52=20121108-13:44:26.676|56=XXXAT|122=20121108-12:45:47|6=0|... [2012-11-08 14:44:26,811] [QFJ Message Processor] FIX.4.4:XXXAT->XXXFL:TEST-XXX-XXXFL-YYY: event : null java.lang.NullPointerException at quickfix.MessageUtils.toBeginString(MessageUtils.java:256) at quickfix.DefaultDataDictionaryProvider.getApplicationDataDictionary(DefaultDataDictionaryProvider.java:62) at quickfix.Session.next(Session.java:913) at quickfix.mina.SingleThreadedEventHandlingStrategy$SessionMessageEvent.processMessage(SingleThreadedEventHandlingStrategy.java:114) at quickfix.mina.SingleThreadedEventHandlingStrategy.block(SingleThreadedEventHandlingStrategy.java:77) at quickfix.mina.SingleThreadedEventHandlingStrategy$1.run(SingleThreadedEventHandlingStrategy.java:94) at java.lang.Thread.run(Thread.java:722) {code}

    QuickFIX/J JIRA | 4 years ago | Jörg Thönnes
    java.lang.NullPointerException
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    In some cases the thread processing incoming FIX messages can get a NullPointerException accessing the ApplVerID if the Logon process is not complete, e.g. because the counter party did not answer with a Logon response but continues to send application messages. In real ife, this issue was observed as a counter party sent many FIX messages without noticing a FIX re-login: # counter party sends many messages # QF/J sends logout # counter party continues to send many messages # QF/J forces disconnect due to Logout time-out (no 35=5 received so far) # process restarts # QF/J creates a new session # QF/J sends Logon # counter party continues to send many messages (but no Logon) # QF/J receives a NPE for every message from the counter party: {code} [2012-11-08 14:44:26,644] [QFJ Timer] FIX.4.4:XXXAT->XXXFL:TEST-XXX-XXXFL-YYY: outgoing: 8=FIX.4.4|9=68|35=A|34=1079|49=XXXAT|52=20121108-13:44:26.640|56=XXXFL|98=0|108=30|10=124| [2012-11-08 14:44:26,699] [SocketConnectorIoProcessor-0.0] FIX.4.4:XXXAT->XXXFL:TEST-XXX-XXXFL-YYY: incoming: 8=FIX.4.4|9=375|35=8|34=65834|43=Y|49=XXXFL|50=BU/XXXFL|52=20121108-13:44:26.675|56=XXXAT|122=20121108-12:45:47|6=0|... [2012-11-08 14:44:26,712] [QFJ Timer] FIX.4.4:XXXAT->XXXFL:TEST-XXX-XXXFL-YYY: event : Initiated logon request [2012-11-08 14:44:26,801] [QFJ Message Processor] FIX.4.4:XXXAT->XXXFL:TEST-XXX-XXXFL-YYY: event : null java.lang.NullPointerException at quickfix.MessageUtils.toBeginString(MessageUtils.java:256) at quickfix.DefaultDataDictionaryProvider.getApplicationDataDictionary(DefaultDataDictionaryProvider.java:62) at quickfix.Session.next(Session.java:913) at quickfix.mina.SingleThreadedEventHandlingStrategy$SessionMessageEvent.processMessage(SingleThreadedEventHandlingStrategy.java:114) at quickfix.mina.SingleThreadedEventHandlingStrategy.block(SingleThreadedEventHandlingStrategy.java:77) at quickfix.mina.SingleThreadedEventHandlingStrategy$1.run(SingleThreadedEventHandlingStrategy.java:94) at java.lang.Thread.run(Thread.java:722) [2012-11-08 14:44:26,802] [SocketConnectorIoProcessor-0.0] FIX.4.4:XXXAT->XXXFL:TEST-XXX-XXXFL-YYY: incoming: 8=FIX.4.4|9=353|35=8|34=65835|43=Y|49=XXXFL|50=BU/XXXFL|52=20121108-13:44:26.676|56=XXXAT|122=20121108-12:45:47|6=0|... [2012-11-08 14:44:26,811] [QFJ Message Processor] FIX.4.4:XXXAT->XXXFL:TEST-XXX-XXXFL-YYY: event : null java.lang.NullPointerException at quickfix.MessageUtils.toBeginString(MessageUtils.java:256) at quickfix.DefaultDataDictionaryProvider.getApplicationDataDictionary(DefaultDataDictionaryProvider.java:62) at quickfix.Session.next(Session.java:913) at quickfix.mina.SingleThreadedEventHandlingStrategy$SessionMessageEvent.processMessage(SingleThreadedEventHandlingStrategy.java:114) at quickfix.mina.SingleThreadedEventHandlingStrategy.block(SingleThreadedEventHandlingStrategy.java:77) at quickfix.mina.SingleThreadedEventHandlingStrategy$1.run(SingleThreadedEventHandlingStrategy.java:94) at java.lang.Thread.run(Thread.java:722) {code}

    QuickFIX/J JIRA | 4 years ago | Jörg Thönnes
    java.lang.NullPointerException
  6. 0

    From Toli Kuznets... I have a basic app that uses QFJ to communicate. I have a bunch of uni tests running continiously, and they've been passing with the app linked to 1.0.0-final of QuickFix/J. However, as soon as i tried switching to 1.0.2 i get the following error: Exception in thread "QFJ Socket Acceptor 126f75b" java.lang.NullPointerException at quickfix.mina.SingleThreadedEventHandlingStrategy$SessionMessageEvent.processMessage(SingleThreadedEventHandlingStrategy.java:131) at quickfix.mina.SingleThreadedEventHandlingStrategy.block(SingleThreadedEventHandlingStrategy.java:70) at quickfix.mina.SingleThreadedEventHandlingStrategy$1.run(SingleThreadedEventHandlingStrategy.java:86) at java.lang.Thread.run(Unknown Source) There's no nested exception, and it's a thread created by QFJ and not my app. Switching the code back to using 1.0.0-final fixes the problem. I never used 1.0.1 so i can't tell if the problem manifests itself there as well. Any ideas on what could be causing this? This is happening both on Ubuntu Linux and MacOSX. Not even sure how to debug this since the exception is coming from a QFJ/mina code. ------------------------------------------------------------------------------------------------------------------------------- From Joerg Thoennes... Steve, the same happened to me. Today I got with version 1.0.1 this error: [2006-08-15 17:41:47,472] [INFO ] [quickfix.mina.acceptor.AcceptorIoHandler] (SocketAcceptor-0) MINA session created: /192.168.1.8:57611 [2006-08-15 17:41:47,573] [DEBUG] [FixLogFactory] (AnonymousIoService-1-2) FIX.4.2:FixGateway->FixClient: incoming: 8=FIX.4.2|9=62|35=5|34=1|49=FixClient|52=20060815-15:41:47.540|56=FixGateway|10=091| Exception in thread "QFJ Socket Acceptor 992bae" java.lang.NullPointerException at quickfix.mina.SingleThreadedEventHandlingStrategy$SessionMessageEvent.processMessage(SingleThreadedEventHandlingStrategy.java:131) at quickfix.mina.SingleThreadedEventHandlingStrategy.block(SingleThreadedEventHandlingStrategy.java:70) at quickfix.mina.SingleThreadedEventHandlingStrategy$1.run(SingleThreadedEventHandlingStrategy.java:86) at java.lang.Thread.run(Thread.java:595) If I can reproduce this error tomorrow, I will send you more details.

    QuickFIX/J JIRA | 1 decade ago | Toli Kuznets
    java.lang.NullPointerException

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at quickfix.MessageUtils.toBeginString()
    2. Apache ServiceMix :: Bundles :: ${pkgArtifactId}
      SingleThreadedEventHandlingStrategy$1.run
      1. quickfix.MessageUtils.toBeginString(MessageUtils.java:256)
      2. quickfix.DefaultDataDictionaryProvider.getApplicationDataDictionary(DefaultDataDictionaryProvider.java:62)
      3. quickfix.Session.next(Session.java:913)
      4. quickfix.mina.SingleThreadedEventHandlingStrategy$SessionMessageEvent.processMessage(SingleThreadedEventHandlingStrategy.java:114)
      5. quickfix.mina.SingleThreadedEventHandlingStrategy.block(SingleThreadedEventHandlingStrategy.java:77)
      6. quickfix.mina.SingleThreadedEventHandlingStrategy$1.run(SingleThreadedEventHandlingStrategy.java:94)
      6 frames
    3. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:722)[SocketConnectorIoProcessor-0.0]
      1 frame