java.lang.NullPointerException

QuickFIX/J JIRA | Toli Kuznets | 1 decade ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    QuickFIX/J Jira

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

    QuickFIX/J Jira

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

    This is an obscure bug that only surfaces when you have the JdbcLogger configured, but it actually can't connect to the DB to log the message. Stack Trace: 1:13:18,038 ERROR [main] quickfix.CompositeLog (CompositeLog.java:53) - null, c ontinuing java.lang.NullPointerException at quickfix.LogUtil.logThrowable(LogUtil.java:54) at quickfix.JdbcLog.insert(JdbcLog.java:70) at quickfix.JdbcLog.onEvent(JdbcLog.java:43) at quickfix.CompositeLog.onEvent(CompositeLog.java:79) at quickfix.Session.<init>(Session.java:195) at Turns out the new session is only added to the list of sessions after this log message is printed so moving line 200 above line 195 fixes the issue and displays the right error message (which is the cause for the Log failure) Here's the patch as well: svn diff Session.java Index: Session.java =================================================================== --- Session.java (revision 536) +++ Session.java (working copy) @@ -227,12 +227,12 @@ state.setInitiator(heartbeatInterval != 0); state.setMessageStore(messageStoreFactory.create(sessionID)); this.messageFactory = messageFactory; + sessions.put(sessionID, this); getLog().onEvent("Session " + this.sessionID + " schedule is " + sessionSchedule); if (!checkSessionTime()) { getLog().onEvent("Session state is not current; resetting " + this.sessionID); reset(); } - sessions.put(sessionID, this); application.onCreate(sessionID); getLog().onEvent("Created session: " + sessionID); } catch (IOException e) { @@ -1692,4 +1692,4 @@ } -} \ No newline at end of file +}

    QuickFIX/J JIRA | 1 decade ago | Toli Kuznets
    java.lang.NullPointerException
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    This is an obscure bug that only surfaces when you have the JdbcLogger configured, but it actually can't connect to the DB to log the message. Stack Trace: 1:13:18,038 ERROR [main] quickfix.CompositeLog (CompositeLog.java:53) - null, c ontinuing java.lang.NullPointerException at quickfix.LogUtil.logThrowable(LogUtil.java:54) at quickfix.JdbcLog.insert(JdbcLog.java:70) at quickfix.JdbcLog.onEvent(JdbcLog.java:43) at quickfix.CompositeLog.onEvent(CompositeLog.java:79) at quickfix.Session.<init>(Session.java:195) at Turns out the new session is only added to the list of sessions after this log message is printed so moving line 200 above line 195 fixes the issue and displays the right error message (which is the cause for the Log failure) Here's the patch as well: svn diff Session.java Index: Session.java =================================================================== --- Session.java (revision 536) +++ Session.java (working copy) @@ -227,12 +227,12 @@ state.setInitiator(heartbeatInterval != 0); state.setMessageStore(messageStoreFactory.create(sessionID)); this.messageFactory = messageFactory; + sessions.put(sessionID, this); getLog().onEvent("Session " + this.sessionID + " schedule is " + sessionSchedule); if (!checkSessionTime()) { getLog().onEvent("Session state is not current; resetting " + this.sessionID); reset(); } - sessions.put(sessionID, this); application.onCreate(sessionID); getLog().onEvent("Created session: " + sessionID); } catch (IOException e) { @@ -1692,4 +1692,4 @@ } -} \ No newline at end of file +}

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

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at quickfix.LogUtil.logThrowable()
    2. Apache ServiceMix :: Bundles :: ${pkgArtifactId}
      Session.<init>
      1. quickfix.LogUtil.logThrowable(LogUtil.java:54)
      2. quickfix.JdbcLog.insert(JdbcLog.java:70)
      3. quickfix.JdbcLog.onEvent(JdbcLog.java:43)
      4. quickfix.CompositeLog.onEvent(CompositeLog.java:79)
      5. quickfix.Session.<init>(Session.java:195)
      5 frames