Discover Refinitiv
MyRefinitiv Refinitiv Perspectives Careers
Created with Sketch.
All APIs Questions & Answers  Register |  Login
Ask a question
  • Questions
  • Tags
  • Badges
  • Unanswered
Search:
  • Home /
  • Elektron /
  • EMA /
avatar image
Question by DimAngelNX · Jun 18, 2021 at 10:47 AM · elektronrefinitiv-realtimeelektron-sdkrrtema-apiOMM

EMA Example: opening item stream with a list of field IDs gets error with code -4048

Hi the following code (taken from the EMA Example series consumer/series300/ex360_MP_View:

ReqMsg reqMsg = EmaFactory.createReqMsg()
.name("/IBN.N")
.serviceName("ELEKTRON_DD")
.domainType(6);

ElementList view = EmaFactory.createElementList();
OmmArray array = EmaFactory.createOmmArray();

array.fixedWidth(5);//Subscribe to 5 fields
array.add(EmaFactory.createOmmArrayEntry().intValue(19));
array.add(EmaFactory.createOmmArrayEntry().intValue(22));

array.add(EmaFactory.createOmmArrayEntry().intValue(134));
array.add(EmaFactory.createOmmArrayEntry().intValue(15));
array.add(EmaFactory.createOmmArrayEntry().intValue(25));

view.add(EmaFactory.createElementEntry().uintValue(EmaRdm.ENAME_VIEW_TYPE, 1));


//!!!!!THIS LIVE THROWS AN EXCEPTION
view.add(EmaFactory.createElementEntry().array(EmaRdm.ENAME_VIEW_DATA, array));

And teh exception is:

Exception Type='OmmInvalidUsageException', Text='Unsupported fixedWidth encoding in encoding entry of Int type. Fixed width='5'. ', Error Code='-4048'

If I try with 4 fields it work correctly!


Thank you


People who like this

0 Show 0
Comment
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

2 Replies

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by umer.nalla · Jun 18, 2021 at 12:11 PM

Hi @DimAngelNX

Please see this article Enterprise Messaging API (Java) - Batch and View features | Refinitiv Developers

The FixedWidth method is not for the number of fields - it sets the fixed width of each array entry size - you can leave it the value of 2 (as used in the examples)

You may also find the following previous post useful:

Exception Type='OmmInvalidUsageException' when using fixedWidth in view Array - Forum | Refinitiv Developer Community


Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
Answer by DimAngelNX · Jun 18, 2021 at 12:19 PM

Ok thanks,

array.fixedWidth(2) it works fine!

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

Watch this question

Add to watch list
Add to your watch list to receive emailed updates for this question. Too many emails? Change your settings >
7 People are following this question.

Related Questions

Migrating from sfc to EMA, NoDictionary errorcode.

getting OmmInvalidUsageException when I am running example

Exception occurred: com.sun.jdi.InvocationException occurred invoking method..

Programmaticaly configured OmmConsumerConfig

(JAVA) Does using interestAfterRefresh(false) remove the need for deregistering items with Elektron?

  • Copyright
  • Cookie Policy
  • Privacy Statement
  • Terms of Use
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Alpha
  • App Studio
  • Block Chain
  • Bot Platform
  • Connected Risk APIs
  • DSS
  • Data Fusion
  • Data Model Discovery
  • Datastream
  • Eikon COM
  • Eikon Data APIs
  • Electronic Trading
    • Generic FIX
    • Local Bank Node API
    • Trading API
  • Elektron
    • EMA
    • ETA
    • WebSocket API
  • Intelligent Tagging
  • Legal One
  • Messenger Bot
  • Messenger Side by Side
  • ONESOURCE
    • Indirect Tax
  • Open Calais
  • Open PermID
    • Entity Search
  • Org ID
  • PAM
    • PAM - Logging
  • ProView
  • ProView Internal
  • Product Insight
  • Project Tracking
  • RDMS
  • Refinitiv Data Platform
    • Refinitiv Data Platform Libraries
  • Rose's Space
  • Screening
    • Qual-ID API
    • Screening Deployed
    • Screening Online
    • World-Check One
    • World-Check One Zero Footprint
  • Side by Side Integration API
  • TR Knowledge Graph
  • TREP APIs
    • CAT
    • DACS Station
    • Open DACS
    • RFA
    • UPA
  • TREP Infrastructure
  • TRKD
  • TRTH
  • Thomson One Smart
  • Transactions
    • REDI API
  • Velocity Analytics
  • Wealth Management Web Services
  • Workspace SDK
    • Element Framework
    • Grid
  • World-Check Data File
  • 中文论坛
  • Explore
  • Tags
  • Questions
  • Badges