|
From: Christoph J. <chr...@ma...> - 2020-03-31 12:17:00
|
I still see no QFJ related classes in the stack trace so why do you think it is a QFJ problem? Is it a Java problem when you try to cast something to String which cannot be cast to String? ;) Please make sure you read the documentation on how to create a QFJ application: https://github.com/quickfix-j/quickfixj#basics Chris. On 31.03.20 14:08, Fuad Azhar wrote: > sorry christoph now the problem is about quickfixj application > > java -jar fastmatchmarketdata-0.0.1-SNAPSHOT-jar-with-dependencies.jar initiator.config > Application: TestMarketdataRequest > Config File initiator.config > FIX Port xxxxx > FIX IP xxx.xxx.xxx.xxx > SenderCompID MDValueTrade2UAT1 TargetCompID Fastmatch1 > java.lang.ClassCastException: com.dxtr.fastmatch.marketdatarequestapps.TestMarketdataRequest > cannot be cast to quickfix.Application > at > com.dxtr.fastmatch.marketdatarequestapps.TestMarketdataRequest.<init>(TestMarketdataRequest.java:141) > at com.dxtr.fastmatch.FastmatchMDRequest.<init>(FastmatchMDRequest.java:14) > at com.dxtr.fastmatch.FastmatchMDRequest.main(FastmatchMDRequest.java:19) > > why to this error for initiator start ? > > Pada tanggal Sel, 31 Mar 2020 pukul 17.12 Fuad Azhar <fua...@gm... > <mailto:fua...@gm...>> menulis: > > ok sorry for that... but i have try out the banzai example for read file for input stream > initiator config. but the code cannot read my file config. how to set proper config file for > initiator.config for make session from quickfixj > > > Pada tanggal Sel, 31 Mar 2020 pukul 16.27 Christoph John <chr...@ma... > <mailto:chr...@ma...>> menulis: > > 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 > -- Christoph John Software Engineering T +49 241 557080-28 chr...@ma... MACD GmbH Oppenhoffallee 103 52066 Aachen, Germany www.macd.com Amtsgericht Aachen: HRB 8151 Ust.-Id: DE 813021663 Geschäftsführer: George Macdonald |