|
From: Edde <edd...@gm...> - 2006-06-22 12:04:22
|
Hi, > Are you running "Generate FIX Messages" from Eclipse's external > tool menu? If not, it should be run from there for an Eclipse > build. I assume you are using a relatively recent version of > Eclipse if you're using Java 5. The Ant version needs to be > 1.6+ but that's what is installed in newer versions of Eclipse. Well, I thought I had the latest version since used the Software Update feature. But I guess I should have known that it didn't pick up major releases so I've now upgraded and moved my projects to Eclipse 3.1.2. "Generate FIX Messages" worked just fine with the new version of Eclipse so I've now managed to build my own quickfixj. > I haven't received any reports of the ThreadedSocketInitiator > hanging during construction. The only guess I have is that > maybe you are doing something in the onCreate method that is > causing a thread deadlock in QFJ although it didn't cause it in > the JNI version. Again, just a guess. If it is something like > that, please tell me and I'll look into it from the QFJ side. It turned out that the ThreadedSocketInitiator actually threw an exception in the constructor that I managed to throw away without feedback in my application. I've modified my code to trap the exception and this is what I got: quickfix.ConfigError: error during session initialization at quickfix.mina.initiator.AbstractSocketInitiator.createSessions(AbstractSocketInitiator.java:113) at quickfix.mina.initiator.AbstractSocketInitiator.<init>(AbstractSocketInitiator.java:67) at quickfix.mina.initiator.AbstractSocketInitiator.<init>(AbstractSocketInitiator.java:60) at quickfix.ThreadedSocketInitiator.<init>(ThreadedSocketInitiator.java:32) at trader.fix.QuickFIXCommunicator.initializeConnection(QuickFIXCommunicator.java:749) ... 4 more Caused by: java.lang.RuntimeException: java.io.EOFException at quickfix.FileStoreFactory.create(FileStoreFactory.java:65) at quickfix.Session.<init>(Session.java:212) at quickfix.DefaultSessionFactory.create(DefaultSessionFactory.java:125) at quickfix.mina.SessionConnector.createSession(SessionConnector.java:109) at quickfix.mina.initiator.AbstractSocketInitiator.createSessions(AbstractSocketInitiator.java:106) ... 8 more Caused by: java.io.EOFException at java.io.DataInputStream.readInt(DataInputStream.java:358) at quickfix.FileStore.initializeMessageIndex(FileStore.java:172) at quickfix.FileStore.initializeCache(FileStore.java:107) at quickfix.FileStore.initialize(FileStore.java:102) at quickfix.FileStore.<init>(FileStore.java:89) at quickfix.FileStoreFactory.create(FileStoreFactory.java:63) ... 12 more The problem occured when creating the FileStoreFactory. The directory I specified had some old files in it from a previous run with the _jni version. My guess is that the _jni version of the files used different EOF delimiters or something. I haven't looked into the problem in more detail since the solution was very simple, just remove the old files from the directory and everything works just fine. Not sure if this is a bug but it might be a good idea to add in the documentation somewhere. Thanks for your help! /Eddie > > As far as I know, using Java 5 should not be a problem. > > Regards, > > Steve > > > -----Original Message----- > > From: qui...@li... > > [mailto:qui...@li...] On > > Behalf Of Edde > > Sent: Wednesday, June 21, 2006 3:51 PM > > To: qui...@li... > > Subject: [Quickfixj-users] Problems migrating to QuickFIX/J > > > > QuickFIX/J Documentation: http://www.quickfixj.org/documentation/ > > QuickFIX/J Support: http://www.quickfixj.org/support/ > > Hi Guys, > > > > We've been using QuickFix in our trading application and since our > > application is built in Java I've been using the _jni library. Now > > that QuickFIX/J 1.0 has been released I thought it was time to migrate > > to the pure Java version. > > >From what I understand QuickFIX/J is backwards compatible with the > > _jni interface which should mean that the only thing needed is to > > replace my old quickfix.jar file with the new quickfixj.jar and add > > the extra dependencies (e.g backport-util-concurrent-2.1.jar). Am I > > missing something here or is that all I need to do? > > > > Anyway this is what I tried to do and my application runs smothly > > until it tries to create the ThreadedSocketInitiator when the > > application just hangs when calling the constructor. Any ideas? > > I've just upgraded to Java 1.5.0_7 if that could be a problem... > > > > Before posting to this list I thought I'd download the source and try > > to compile the quickfixj.jar with some debug to give you some more > > info on exactly where it hangs but I didn't succeed in this either > > ;-(. > > I'm using Eclipse for development so it was great that the source came > > as an Eclipse project. I added the project to Eclipse which seems to > > work just fine but it won't compile since all the quickfix.field.* > > classes are missing. I checked out the webpage and saw that these can > > easily be creating using the "Generate FIX Messages" ant script. > > Unfortunately this doesn't seem to work because I get the following > > error: > > > > "BUILD FAILED: > > file:C:/Projects/Trading/FIX/QuickFix/quickfixj/build.xml:86: > > Unexpected element "macrodef"" > > > > My experience using Ant scripts unfortunately limits to generating > > Javadoc so I'm not sure what's going on here... > > > > Any help would be highly appreciated. > > Cheers, > > /Eddie > > > > > > _______________________________________________ > > Quickfixj-users mailing list > > Qui...@li... > > https://lists.sourceforge.net/lists/listinfo/quickfixj-users > > > > > > All the advantages of Linux Managed Hosting--Without the Cost and Risk! > Fully trained technicians. The highest number of Red Hat certifications in > the hosting industry. Fanatical Support. Click to learn more > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642 > _______________________________________________ > Quickfixj-users mailing list > Qui...@li... > https://lists.sourceforge.net/lists/listinfo/quickfixj-users > |