[QFJ-335] NullPointerException in LogUtil when logging event with SingleThreadedEventHandlingStrategy Created: 16/Aug/08  Updated: 06/Oct/08  Resolved: 10/Sep/08

Status: Closed
Project: QuickFIX/J
Component/s: Engine
Affects Version/s: 1.3.1
Fix Version/s: 1.3.3

Type: Bug Priority: Default
Reporter: Michael Franz Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Environment:

Windows XP
Java 1.6.0_07



 Description   

When connecting and disconnecting to a server and the sequence numbers get out of sync the SingleThreadedEventHandlingStrategy tries to log an event after the initiator has closed all of its sessions. This causes the quickfix.LogUtil.logThrowable(LogUtil.java:54) to throw a NPE as there is no session to get the log from.

This is an intermittent bug as there are a number of threads involved (QFJ Timer, SocketConnectorIoProcessor-6.0, and QFJ Message Processor). One iteration logs the following message:
quickfix.SessionException Logon state is not valid for message (MsgType=5)
another has the NPE and yet another has not issues at all.

The full stack trace is:
Exception in thread "QFJ Message Processor" java.lang.NullPointerException
at quickfix.LogUtil.logThrowable(LogUtil.java:54)
at quickfix.mina.SingleThreadedEventHandlingStrategy$SessionMessageEvent.processMessage(SingleThreadedEventHandlingStrategy.java:109)
at quickfix.mina.SingleThreadedEventHandlingStrategy.block(SingleThreadedEventHandlingStrategy.java:70)
at quickfix.mina.SingleThreadedEventHandlingStrategy$1.run(SingleThreadedEventHandlingStrategy.java:86)
at java.lang.Thread.run(Thread.java:619)


Generated at Sat Nov 23 13:55:42 UTC 2024 using JIRA 7.5.2#75007-sha1:9f5725bb824792b3230a5d8716f0c13e296a3cae.