quickfix.ConfigError: error during session initialization

quickfixj.org | 4 months ago
  1. 0

    QuickFIX/J Jira

    quickfixj.org | 6 months ago
    quickfix.ConfigError: error during session initialization
  2. 0

    Recently when our system was restarted, occasionally occur I/O exception, the following: quickfix.ConfigError: error during session initialization at quickfix.mina.initiator.AbstractSocketInitiator.createSessions(AbstractSocketInitiator.java:135) at quickfix.mina.initiator.AbstractSocketInitiator.createSessionInitiators(AbstractSocketInitiator.java:84) at quickfix.SocketInitiator.initialize(SocketInitiator.java:84) at quickfix.SocketInitiator.start(SocketInitiator.java:64) at com.rootnet.fix.framework.FixModule.startup(FixModule.java:142) at com.rootnet.fix.algo.FixAlgoGateway.main(FixAlgoGateway.java:91) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:238) at java.lang.Thread.run(Thread.java:595) Caused by: java.lang.RuntimeException: java.io.IOException at quickfix.FileStoreFactory.create(FileStoreFactory.java:80) at quickfix.Session.<init>(Session.java:338) at quickfix.DefaultSessionFactory.create(DefaultSessionFactory.java:156) at quickfix.mina.SessionConnector.createSession(SessionConnector.java:114) at quickfix.mina.initiator.AbstractSocketInitiator.createSessions(AbstractSocketInitiator.java:129) ... 11 more Caused by: java.io.IOException at quickfix.FileStore.initializeSessionCreateTime(FileStore.java:133) at quickfix.FileStore.initializeCache(FileStore.java:120) at quickfix.FileStore.initialize(FileStore.java:113) at quickfix.FileStore.<init>(FileStore.java:100) at quickfix.FileStoreFactory.create(FileStoreFactory.java:78) ... 15 more I check .session file in store directory, find that it is an empty file. And as long as this file is empty, start FIX engine must occur this I/O exception. I compare quickfixj1.4.0 and quickfixj1.5.2, find the code was strengthened, increased 'sessionTimeFile.length() > 0', by this way when .session file is an empty file, will execute storeSessionTimeStamp(), program will be correctly executed. This handle whether it is in order to avoid .session empty file lead to I/O exception. So what science would generate a empty .session file? --quickfixj1.5.2 private void initializeSessionCreateTime() throws IOException { final File sessionTimeFile = new File(sessionFileName); if (sessionTimeFile.exists() && sessionTimeFile.length() > 0) { final DataInputStream sessionTimeInput = new DataInputStream(new BufferedInputStream( new FileInputStream(sessionTimeFile))); try { final Calendar c = SystemTime.getUtcCalendar(UtcTimestampConverter .convert(sessionTimeInput.readUTF())); cache.setCreationTime(c); } catch (final Exception e) { throw new IOException(e.getMessage()); } finally { sessionTimeInput.close(); } } else { storeSessionTimeStamp(); } }

    QuickFIX/J JIRA | 4 years ago | Li,Wei
    quickfix.ConfigError: error during session initialization
  3. 0

    Recently when our system was restarted, occasionally occur I/O exception, the following: quickfix.ConfigError: error during session initialization at quickfix.mina.initiator.AbstractSocketInitiator.createSessions(AbstractSocketInitiator.java:135) at quickfix.mina.initiator.AbstractSocketInitiator.createSessionInitiators(AbstractSocketInitiator.java:84) at quickfix.SocketInitiator.initialize(SocketInitiator.java:84) at quickfix.SocketInitiator.start(SocketInitiator.java:64) at com.rootnet.fix.framework.FixModule.startup(FixModule.java:142) at com.rootnet.fix.algo.FixAlgoGateway.main(FixAlgoGateway.java:91) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:238) at java.lang.Thread.run(Thread.java:595) Caused by: java.lang.RuntimeException: java.io.IOException at quickfix.FileStoreFactory.create(FileStoreFactory.java:80) at quickfix.Session.<init>(Session.java:338) at quickfix.DefaultSessionFactory.create(DefaultSessionFactory.java:156) at quickfix.mina.SessionConnector.createSession(SessionConnector.java:114) at quickfix.mina.initiator.AbstractSocketInitiator.createSessions(AbstractSocketInitiator.java:129) ... 11 more Caused by: java.io.IOException at quickfix.FileStore.initializeSessionCreateTime(FileStore.java:133) at quickfix.FileStore.initializeCache(FileStore.java:120) at quickfix.FileStore.initialize(FileStore.java:113) at quickfix.FileStore.<init>(FileStore.java:100) at quickfix.FileStoreFactory.create(FileStoreFactory.java:78) ... 15 more I check .session file in store directory, find that it is an empty file. And as long as this file is empty, start FIX engine must occur this I/O exception. I compare quickfixj1.4.0 and quickfixj1.5.2, find the code was strengthened, increased 'sessionTimeFile.length() > 0', by this way when .session file is an empty file, will execute storeSessionTimeStamp(), program will be correctly executed. This handle whether it is in order to avoid .session empty file lead to I/O exception. So what science would generate a empty .session file? --quickfixj1.5.2 private void initializeSessionCreateTime() throws IOException { final File sessionTimeFile = new File(sessionFileName); if (sessionTimeFile.exists() && sessionTimeFile.length() > 0) { final DataInputStream sessionTimeInput = new DataInputStream(new BufferedInputStream( new FileInputStream(sessionTimeFile))); try { final Calendar c = SystemTime.getUtcCalendar(UtcTimestampConverter .convert(sessionTimeInput.readUTF())); cache.setCreationTime(c); } catch (final Exception e) { throw new IOException(e.getMessage()); } finally { sessionTimeInput.close(); } } else { storeSessionTimeStamp(); } }

    QuickFIX/J JIRA | 4 years ago | Li,Wei
    quickfix.ConfigError: error during session initialization
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    QuickFIX/J Jira

    quickfixj.org | 3 months ago
    quickfix.ConfigError: error during session initialization

    2 unregistered visitors
    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.io.IOException

      No message provided

      at quickfix.FileStore.initializeSessionCreateTime()
    2. Apache ServiceMix :: Bundles :: ${pkgArtifactId}
      SocketInitiator.start
      1. quickfix.FileStore.initializeSessionCreateTime(FileStore.java:133)
      2. quickfix.FileStore.initializeCache(FileStore.java:120)
      3. quickfix.FileStore.initialize(FileStore.java:113)
      4. quickfix.FileStore.<init>(FileStore.java:100)
      5. quickfix.FileStoreFactory.create(FileStoreFactory.java:78)
      6. quickfix.Session.<init>(Session.java:338)
      7. quickfix.DefaultSessionFactory.create(DefaultSessionFactory.java:156)
      8. quickfix.mina.SessionConnector.createSession(SessionConnector.java:114)
      9. quickfix.mina.initiator.AbstractSocketInitiator.createSessions(AbstractSocketInitiator.java:129)
      10. quickfix.mina.initiator.AbstractSocketInitiator.createSessionInitiators(AbstractSocketInitiator.java:84)
      11. quickfix.SocketInitiator.initialize(SocketInitiator.java:84)
      12. quickfix.SocketInitiator.start(SocketInitiator.java:64)
      12 frames
    3. com.rootnet.fix
      FixAlgoGateway.main
      1. com.rootnet.fix.framework.FixModule.startup(FixModule.java:142)
      2. com.rootnet.fix.algo.FixAlgoGateway.main(FixAlgoGateway.java:91)
      2 frames
    4. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:585)
      4 frames
    5. Java Service Wrapper
      WrapperSimpleApp.run
      1. org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:238)
      1 frame
    6. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:595)
      1 frame