rupweb
rupweb

Reputation: 3328

QuickFixJ session config is null. The SessionSettings InputStream InputStreamReader TokenizerToken produces null

In QuickFixJ the config file is not read, causing session settings to be null, but the initiator still starts, but doesn't connect anywhere. There are no log or store directories produced and no error given.

Using the normal config file loading process set out in the docs, the config file is read under the hood by the SessionSettings.java class. It uses the following code:

private void load(InputStream inputStream) throws ConfigError {
    try { 
        Properties currentSection = null;
        String currentSectionId = null;
        final Tokenizer tokenizer = new Tokenizer();
        final Reader reader = new InputStreamReader(inputStream);
        Tokenizer.Token token = tokenizer.getToken(reader);
        while (token != null) {
        ...

This is my inputStream

enter image description here

It looks like a good inputStream but the tokenizer is consistently producing null.

enter image description here

There's nothing wrong with the QuickFix config file FIX.cfg that I can see. I am using JDK11.

Upvotes: 0

Views: 80

Answers (1)

rupweb
rupweb

Reputation: 3328

The issue was that my config file was saved with Character Encoding UTF-8 with BOM by Notepad which was very unexpected.

TradeWeb

Upvotes: 1

Related Questions