[QFJ-223] IoSessionInitiator sometimes tries to log null messages in case of IOExceptions Created: 10/Aug/07  Updated: 11/Feb/09  Resolved: 14/Aug/07

Status: Closed
Project: QuickFIX/J
Component/s: None
Affects Version/s: 1.2.1
Fix Version/s: 1.3.0

Type: Bug Priority: Default
Reporter: Toli Kuznets Assignee: Toli Kuznets
Resolution: Fixed Votes: 0
Labels: None


 Description   

If there's an IOException in IoSessionInitator that's actually a java.net.ConnectionException, sometimes QFJ gets in a situation when it's trying to log an exception with NULL message.
If you have JDBC log configured you end up having with JDBC errors since the log tables aren't nullable.

This usually happens when you pull a network plug out from the server, and the intiator can't connect to it.

Stack trace:
com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException: Column 'text' cannot be null
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:931)
<snip>
at quickfix.JdbcLog.insert(JdbcLog.java:90)
at quickfix.JdbcLog.onEvent(JdbcLog.java:52)
at quickfix.CompositeLog.onEvent(CompositeLog.java:79)
at quickfix.mina.initiator.IoSessionInitiator$ConnectTask.connect(IoSessionInitiator.java:136)



 Comments   
Comment by Toli Kuznets [ 10/Aug/07 ]

i checked in a fix for this in rev 721
However, not sure how best to test this case since the class it's implemented in is private and there's no easy way to force this codepath.

Generated at Sat Nov 23 11:10:25 UTC 2024 using JIRA 7.5.2#75007-sha1:9f5725bb824792b3230a5d8716f0c13e296a3cae.