UPA Java API - RDMFieldDictionary & enumtype.def discrepancy

Using the UPA Java API we're getting the following error on a dictionary response message in one of our TREP environments (i.e. works fine in one but not the other):

Event: Acronym mismatch "RDN_EXCHID" and "CURRENCY" between Field Dictionary and Enum Type Dictionary

The assumption is that we have a mismatch in one of these files but not sure where the discrepancy lies as the output from both files in both environments is the same:

grep CURRENCY *

enumtype.def:

CURRENCY 15

RDMFieldDictionary:

! Additional currency fields with identical enumerations to the original CURRENCY

RDMFieldDictionary:BID_CURRCY "BID CURRENCY" 2379 NULL ENUMERATED 5 ( 3 ) ENUM 2

...

grep RDN_EXCHID *

enumtype.def:

RDN_EXCHID 4

RDMFieldDictionary:

RDN_EXCHID "IDN EXCHANGE ID" 4 NULL ENUMERATED 3 ( 3 ) ENUM 1

We are able to ignore the status code error returned from the dictionary response but are still trying to understand the source of the error

Best Answer

  • @Paul.Wuethrich2

    I can reproduce the problem by changing ACRONYM of FID 4 in enumtype.def from :

    ! ACRONYM    FID 
    ! ------- ---
    !
    RDN_EXCHID 4

    To be:

    ! ACRONYM    FID
    ! ------- ---
    !
    CURRENCY 4

    When run Consumer UPA Java example to load the dictionary files, it shows the same error:

    Text: Acronym mismatch "RDN_EXCHID" and "CURRENCY" between Field Dictionary and Enum Type Dictionary

    This seems to be dictionary problem(improper dictionary) that that ACRONYM of the same FID(4) in RDMFieldDictionary and enumtype.def differs.

    RDMFieldDictionary ACRONYM of FID 4 is RDN_EXCHID:

    RDN_EXCHID "IDN EXCHANGE ID"        4  NULL        ENUMERATED    3 ( 3 )  ENUM             1

    but enumtype.def ACRONYM in the same FID is CURRENCY:

    CURRENCY     4

    If you face the problem again, please inform the admin of the server that your application loads dictionary that the dictionary is improper and it should be corrected e.g. update dictionary to the latest version.

    Anyway, if you do not face the problem anymore. It is possible that the dictionary on the server has been corrected already.

Answers

  • Hi Paul,

    Can you provide copies of your dictionary files for each platform? Your grep output suggests that the CURRENCY field wasn't in the RDMFieldDictionary, and unless it's been modified I would normally expect it to be there.

    Are there other applications that can successfully download the dictionary from the TREP where the problem occurs?

  • Thanks Jim

    I accidentally deleted that from the grep output but have attached the files from environment that is having an issue which happens to be production. The application in question does have other client apps but believe this is the only UPA Java client app. rdmfielddictionary.zip

  • Hi, Paul,

    I have run UPAJ example application to test with your attached
    dictionary files. The problem has not occurred. Are these dictionary files that you faced the
    problem? What are RICs that the problem occurred with? This info will help me
    to reproduce the problem. I suspect that the problem occurred when the
    application received data containing the fields and tried to parse them.

  • Thanks - these are the files and the error only occurs upon querying the return status of the dictionary request so no RIC processing:

    dictionaryHandler.serviceId(srcDirHandler.serviceInfo().serviceId());

    if (dictionaryHandler.sendRequests(chnl, error) != CodecReturnCodes.SUCCESS)

    UPAUtils.log("Dictionary send request failed after failed file load");

    closeChannel();

    }

    else {

    UPAUtils.log("Dictionary send request successful after failing to load files");

    }

  • The dictionary files worked for me as well, both via loading them from file and downloading them from an ADS.

    Do you possibly have an RDMFieldDictionary and/or enumtype.def file present locally to your UPAJ application (maybe it's also attempting to load one or both of those )?

    Does the application try to connect elsewhere first, or is it first connecting to the system that produces the problem?

  • Hi Paul,

    I have tested your given source code with your dictionary. It can load the dictionary from ADS successfully.

  • Hi Paul,

    I have reviewed your dictionary files. In enumtype.def, there are enum type for "RDN_EXCHID" and "CURRENCY". In RDMFieldDictionary, both fields are defined. Hence, it seems that your dictionary files are in the correct format.

  • @Paul.Wuethrich2

    Can the problem be replicated with Consumer example in UPA Java package?

    If yes, please run it with -x parameter to enable tracing and provide us with the full output when the problem occurred.

  • Hi Pimchaya,

    The error text in the original post can be returned by any of the DataDictionary methods loadFieldDictionary, loadEnumTypeDictionary, or decodeFieldDictionary (decodeEnumTypeDictionary wouldn't produce this since encoded Enum dictionaries don't include acronyms).