|
From: Christoph J. <chr...@ma...> - 2020-03-31 09:27:39
|
Don't get me wrong but I don't have time to debug your code. ;)
I am pretty sure that this Exception is not thrown out of QFJ code.
Cheers,
Chris.
On 31.03.20 08:06, Fuad Azhar wrote:
> your solution run well but i have another error. for read config file.
> my error is
> Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0
> at com.dxtr.fastmatch.FastmatchMDRequest.<init>(FastmatchMDRequest.java:14)
> at com.dxtr.fastmatch.FastmatchMDRequest.main(FastmatchMDRequest.java:19)
>
> and my config file code is here
>
> public TestMarketdataRequest(String configFile) {
> try {
> System.out.println(" Config File " + configFile);
> Properties props = new Properties();
> try {
> props.load(new FileInputStream(configFile));
> } catch (IOException e) {
> e.printStackTrace();
> }
> SenderCompID = props.getProperty("SenderCompID");
> TargetCompID = props.getProperty("TargetCompID");
> symbols = props.getProperty("Symbols");
> System.out.println(" FIX Port " + props.getProperty("SocketConnectPort"));
> System.out.println(" FIX IP " + props.getProperty("SocketConnectHost"));
> System.out.println(" SenderCompID " + SenderCompID + " TargetCompID " + TargetCompID);
> SessionSettings settings = new SessionSettings(configFile);
> MessageStoreFactory messageStoreFactory = new FileStoreFactory(settings);
> LogFactory logFactory = new FileLogFactory(settings);
> MessageFactory messageFactory = new DefaultMessageFactory();
> Initiator initiator = new SocketInitiator((Application) this, messageStoreFactory,
> settings, logFactory, messageFactory);
> initiator.start();
>
> and this is the args[0]
> public static void main(String[] args){
> String configFile = args[0];
> new TestMarketdataRequest(configFile);
> }
> and my error is in this code
>
> public class FastmatchMDRequest {
>
>
>
> public FastmatchMDRequest(String args[]){
> System.out.println("Application: TestMarketdataRequest ");
> new TestMarketdataRequest(args[0]);
> }
>
>
> public static void main(String args[]){
> new FastmatchMDRequest(args);
>
>
>
>
> }
> }
> what is the problem from this ? i have add my config file as my resources and build it in one jar.
>
> best regards,
>
> Fuad
|