question

Upvotes
Accepted
0 0 1 1

ERROR: 'Attempt to submit initial RefreshMsg with service name of XYZ that was not included in the SourceDirectory

Hi,

I am trying to publish data to our Local TREP infrastructure but I am getting the following error and not sure what it means. Can you please help?


Exception Type='OmmInvalidUsageException', Text='Attempt to submit initial RefreshMsg with service name of XYZ that was not included in the SourceDirectory. Dropping this RefreshMsg.
', Error Code='-22'
    at com.refinitiv.ema.access.OmmBaseImpl.ommIUExcept(OmmBaseImpl.java:1578)
    at com.refinitiv.ema.access.OmmNiProviderImpl.handleInvalidUsage(OmmNiProviderImpl.java:1407)
    at com.refinitiv.ema.access.OmmNiProviderImpl.submit(OmmNiProviderImpl.java:523)
elektronrefinitiv-realtimeelektron-sdktreprrtema-apielektron-message-apiOMMnon-interactive-provider
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
Accepted
20.3k 73 10 20

Hi @ajay.gupta

The above error message indicates that you are trying to publish an instrument using a servicename that you have not made the ADH TREP component aware of.

Have you specified the servicename in the Provider related section of the EMAConfig.xml or via Programmatic config. Also, is the service declared on the ADH component of your TREP system?

If you have not already done so, please work through the NI Provider tutorials on our Developer Portal - so you can achieve a better understanding of the requirements and process.

The above tutorial also includes a section on Source Directories.

Note that whilst the above tutorial is for NI Provider, much of the information also relates to a standard Provider as well.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
0 0 1 1

Hi @umer.nalla, I did compare my my code with documentation but I am unable find any mistake which I am doing, so it may be some trivial fix which I am able to spot. I have sent you an email requesting your contact number so that I could discuss this with you. Can you please provide it?Many thanks in advance.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
20.3k 73 10 20

Hi @ajay.gupta

As mentioned in my reply above - the issue is most likely related to configuration at your application and/or the TREP level?

Did you check you are configuring the service name XYZ in your EmaConfig.xml file and also on the ADH server that you are connecting to?


icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
0 0 1 1

HI @umer.nalla, Yes I think I am setting up the configuration correctly programmatically as below.

I have tried it using the serviceId as well but I still get the same error.

RefreshMsg refreshMsg = EmaFactory.createRefreshMsg()
        .serviceName(serviceName)
        //.serviceId(serviceId)
        .name(itemName)
        .domainType(EmaRdm.MMT_MARKET_PRICE)
        .state(OmmState.StreamState.OPEN, OmmState.DataState.OK, OmmState.StatusCode.NONE, "Refresh completed")
        .payload(fieldList)
        .complete(true);


I also get a different error when I try to post a Generic message:

GenericMsg genericMsg = EmaFactory.createGenericMsg()
        .serviceId(serviceId)
        .name(itemName)
        .domainType(EmaRdm.MMT_MARKET_PRICE)
        .payload(fieldList)
        .complete(true);

The error message returned is:

Exception Type='OmmInvalidHandleException', Text='Attempt to submit GenericMsg on stream that is not open yet. Handle = 2.
', Handle='2'
    at com.refinitiv.ema.access.OmmBaseImpl.ommIHExcept(OmmBaseImpl.java:1586)
    at com.refinitiv.ema.access.OmmNiProviderImpl.handleInvalidHandle(OmmNiProviderImpl.java:1417)
    at com.refinitiv.ema.access.OmmNiProviderImpl.submit(OmmNiProviderImpl.java:1184)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
20.3k 73 10 20

Hi @ajay.gupta

The RefreshMsg code snippet you supplied above is not programmatic config for the Service Directory, that just looks like a RefreshMsg for a particular instrument which you publish once a valid connection to the ADH has been established and it is accepting messages from your app.

The Source / Service Directory config for an EMA NIPublisher is covered in the following step of the above tutorials I referred you to EMA NI Provider - Publishing a Source Directory

Did you complete the above step of the tutorial i.e. specified the various config values described in the above step e.g. NiProviderGroup, NiProvider, Channel for the ADH server, DirectoryGroup with your Directory entry for service XYZ?

If you have not done so, I would strongly recommend you work through the above tutorials to get a fuller understanding of the steps involved in Publishing data - it will save you time in the long run.

I would recommend you set your service directory configuration in the EMAConfig.xml file first for testing purpose - to ensure you programmatic config is correct. Once you are happy it is working then you can replace that with programmatic config if required.

Also, you have not confirmed if the Service has been configured on your ADH server by your market data team - I have mentioned this a couple of times? This step for NI providers is described in Refinitiv Real-Time Distribution System Configuration for NI Providers - if your Market Data team needs assistance with this step they can raise a My.Refinitiv support ticket to get assistance from an RRTDS (TREP) expert.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea