{{Quickfixn}} FW: FpML file

Ashutosh Mishra A.Mishra at ny.tr.mufg.jp
Tue Oct 29 07:23:37 PDT 2013


It seems I send lot of content so my membership was terminated. Have rejoined the same.

Now I am getting this error:
Object reference not set to an instance of an object.
   at QuickFix.DataDictionary.DataDictionary.setVersionInfo(XmlDocument doc)
   at QuickFix.DataDictionary.DataDictionary.Load(String path)
   at QuickFix.SessionFactory.createDataDictionary(SessionID sessionID, Dictiona
ry settings, String settingsKey, String beginString)
   at QuickFix.SessionFactory.ProcessFixDataDictionary(SessionID sessionID, Dict
ionary settings, DataDictionaryProvider provider)
   at QuickFix.SessionFactory.Create(SessionID sessionID, Dictionary settings)
   at QuickFix.AbstractInitiator..ctor(IApplication app, IMessageStoreFactory st
oreFactory, SessionSettings settings, ILogFactory logFactory, IMessageFactory me
ssageFactory)
   at QuickFix.Transport.SocketInitiator..ctor(IApplication application, IMessag
eStoreFactory storeFactory, SessionSettings settings, ILogFactory logFactory)

My Program.cs is as follows:

try

{

QuickFix.SessionSettings settings = new QuickFix.SessionSettings(@"C:\Users\ashutosh_m\documents\visual studio 2010\Projects\MutbTradeweb_Application_Ver_1.0.1\MutbTradeweb_Application_Ver_1.0.1\TradeWebClientInitiator.cfg");

TradeClientApp application = new TradeClientApp();

Dictionary d = new Dictionary();

QuickFix.SessionID id1 = new QuickFix.SessionID("FIX.4.4", "MITUFJTR", "TRADEWEB", "SessionID");

d.SetString("ConnectionType", "initiator");

d.SetLong("SocketAcceptPort", 9000);

d.SetString("FileLogPath", "Log");

d.SetString("StartTime", "00:00:00");

d.SetString("EndTime", "00:00:00");

d.SetString("FileStorePath", @"c:fixfiles");

d.SetBool("UseDataDictionary", true);

d.SetString("DataDictionary", @"FIX42.xml");

settings.Set(id1, d);

QuickFix.IMessageStoreFactory storeFactory = new QuickFix.FileStoreFactory(settings);

QuickFix.ILogFactory logFactory = new QuickFix.ScreenLogFactory(settings);

QuickFix.Transport.SocketInitiator initiator = new QuickFix.Transport.SocketInitiator(application, storeFactory, settings, logFactory);

initiator.Start();

application.Run();

Thread.Sleep(3000);

Console.ReadLine();

initiator.Stop();

}

catch (System.Exception e)

{

Console.WriteLine(e.Message);

Console.WriteLine(e.StackTrace);

}

Environment.Exit(1);

}



Thanks & Regards,
Ashutosh Mishra

*********************************************************************************
This communication (including any attachments) is intended only or the use of the individual whom it is addressed and may contain information that is privileged, confidential or legally protected.  If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by replying to the message.  Please also delete the message and its attachments, if any, from your computer and destroy any hard copies you may have created.  Thank you for your cooperation.
*********************************************************************************
From: quickfixn-bounces at lists.quickfixn.com<mailto:quickfixn-bounces at lists.quickfixn.com> [mailto:quickfixn-bounces at lists.quickfixn.com] On Behalf Of Walter Robert Ditzler
Sent: Monday, October 28, 2013 10:39 AM
To: 'Mailing list for QuickFIX/n'
Subject: Re: {{Quickfixn}} FpML file

Hi,

that works for me in production. I saw you got a Path error:

   at System.IO.Path.CheckInvalidPathChars(String path)
   at System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32 maxPath
Length)

I don't think that is a real QuickFix/n problem. I would try to read your QuickFix/n config file with a StreamReader. If that works, QuickFix/n will after work too.

Walter.

***
private      QuickFix.IInitiator       _MyInitiator                                                     =      null;
private      QuickFix.SessionID        _MySessionID                                                     =      null;
private      QuickFix.SessionSettings  _MySessionSettings                                               =      null;
***


***
const String CONST_CONFIG_FILE   =      "ApiClientCreditSuisse.cfg";
***

***
public String Config
{
       get
       {
             return System.IO.Path.Combine(System.IO.Directory.GetCurrentDirectory(),CONST_CONFIG_FILE);
       }
}
***

***
public Boolean Start()
{
       try
       {
              if(IsRunning)
                    return true;

             _MySessionSettings                                                       =      new SessionSettings(Config);
             _MyFileStoreFactory                                                      =      new FileStoreFactory(_MySessionSettings);
             _MyFileLogFactory                                                        =      new FileLogFactory(_MySessionSettings);

             _MyInitiator                                                            =      new SocketInitiator(this,_MyFileStoreFactory,_MySessionSettings,_MyFileLogFactory);
             _MyInitiator.Start();

             return IsRunning;
       }
       catch(Exception ex)
       {
             return false;
       }
       finally
       {

       }
}
***


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quickfixn.com/pipermail/quickfixn-quickfixn.com/attachments/20131029/f7f76d3a/attachment-0002.htm>


More information about the Quickfixn mailing list