question

Upvotes
Accepted
942 8 9 13

DataTypes.ERROR is missing from Elektron SDK 1.1.1 Java Edition

Hi,

The ERROR static value is missing from the DataTypes class.

Because of that the following code snippet extracted from the example200__MarketPrice__Streaming example doesn't compile anymore.

switch (fieldEntry.loadType())
{
case DataTypes.REAL :
    System.out.println(fieldEntry.real().asDouble());
    break;
        .
        .
        .
case DataTypes.ERROR :
    System.out.println("(" + fieldEntry.error().errorCodeAsString() + ")");
    break;
default :
    System.out.println();
    break;
}

Is DataTypes.ERROR still a relevant data type?

What is the recommended way to deal with field entries that contain errors?

elektronrefinitiv-realtimeelektron-sdkema-apirrtelektron-message-api
icon clock
10 |1500

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

Monitored by @Pimchaya.Wongrukun

1 Answer

· Write an Answer
Upvotes
Accepted
9.6k 10 7 7

Hello @Olivier DAVANT

I can find DataTypes.ERROR in Elektron SDK 1.1.1 Java as shown below:

When I clicks ERROR, the following is showed:

example200__MarketPrice__Streaming can compile and run successfully.

Please make sure that you include ema.jar shipped with Elektron SDK version 1.1.1 not the old version.


datatypeserror.png (5.4 KiB)
datatypes.png (18.7 KiB)
icon clock
10 |1500

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

Hi @Pimchaya.Wongrukun

I'm using the right ema.jar file from the right Elektron SDK version (1.1.1).

I understood why ERROR and RMTES constant values were not recognized as part of the DataTypes class:

This is because I wrongly imported com.thomsonreuters.upa.codec.DataTypes instead of com.thomsonreuters.ema.access.DataType.DataTypes.

It happens that values like UINT or ENUM are part of both classes upa.codec.DataTypes and ema.access.DataType.DataTypes, but ASCII, RMTES and ERROR are only part of ema.access.DataType.DataTypes.

...

untitled.png (13.6 KiB)

...

My code compiles again after I replaced

import com.thomsonreuters.upa.codec.DataTypes;

by

import com.thomsonreuters.ema.access.DataType.DataTypes;

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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