Internal errors from com.refinitiv.ema.access.OmmInvalidUsageExceptionImpl

Hi
We are switching from RFA SSL to EMA RSSL. When we are interested in subset of market data FIDs, so we create views for reqMsgs and register to EMA client. equity reqMsgs and option reqMsgs use the same OMM Consumer instance but with different views (one view for equity and the other view for option). Could you please indicate under what kind of conditions that can caused the errors below happen? Here is the code:
ReqMsg reqMsg = EmaFactory.createReqMsg();
reqMsg.domainType(EmaRdm.MMT_MARKET_PRICE)
.serviceName(service)
.name(equityRic)
.payload(equityFidView)
.priority(1, 1)
.initialImage(true)
.interestAfterRefresh(true);
long handle = consumer.registerClient(reqMsg, client, emasub);
emasub.getHandles().add(handle);
But when there are a lot of requests sent, we got these errors sometimes for some symbols, for examples:
com.refinitiv.ema.access.OmmInvalidUsageExceptionImpl: ReqMsgImpl.checkBatchView() failed to decode ElementEntry. Internal error INCOMPLETE_DATA
at com.refinitiv.ema.access.MsgImpl.ommIUExcept(MsgImpl.java:393)
at com.refinitiv.ema.access.ReqMsgImpl.checkBatchView(ReqMsgImpl.java:883)
at com.refinitiv.ema.access.ReqMsgImpl.payload(ReqMsgImpl.java:645)
and
2024-09-12 16:55:17.979 INFO 45566 --- [Worker-SUB-6] c.o.d.p.s.p.r.e.Level1MarketDataProvider : Failed to subscribe to [MSFT--250620C00465000-Option-TopOfBook]
java.nio.BufferOverflowException: null
at java.nio.Buffer.nextPutIndex(Buffer.java:525)
at java.nio.HeapByteBuffer.put(HeapByteBuffer.java:173)
at com.refinitiv.ema.access.Utilities.copy(Utilities.java:275)
at com.refinitiv.ema.access.MsgImpl.msgPayload(MsgImpl.java:787)
at com.refinitiv.ema.access.ReqMsgImpl.payload(ReqMsgImpl.java:643)
and
2024-09-12 16:55:17.979 INFO 45566 --- [Worker-SUB-4] c.o.d.p.s.p.r.e.Level1MarketDataProvider : Failed to subscribe to [SEMR-Equity-TopOfBook]
java.lang.ArrayIndexOutOfBoundsException: -1
at com.refinitiv.eta.codec.Encoders.encodeElementListComplete(Encoders.java:3296)
at com.refinitiv.eta.codec.ElementListImpl.encodeComplete(ElementListImpl.java:40)
at com.refinitiv.ema.access.ElementListImpl.encodedData(ElementListImpl.java:395)
at com.refinitiv.ema.access.MsgImpl.msgPayload(MsgImpl.java:787)
at com.refinitiv.ema.access.ReqMsgImpl.payload(ReqMsgImpl.java:643)
Best Answer
-
Hello @fanghua.liu
I did a quick test by applying your request RIC code with the EMA Java ex360_MP_View example on the RTSDK 2.2.0.L1 (EMA 3.8.0.0).
consumer = EmaFactory.createOmmConsumer(EmaFactory.createOmmConsumerConfig().host("localhost:14002").username("user"));
ElementList view = EmaFactory.createElementList();
OmmArray array = EmaFactory.createOmmArray();
array.fixedWidth(2);
array.add(EmaFactory.createOmmArrayEntry().intValue(22));
array.add(EmaFactory.createOmmArrayEntry().intValue(25));
view.add(EmaFactory.createElementEntry().uintValue(EmaRdm.ENAME_VIEW_TYPE, 1));
view.add(EmaFactory.createElementEntry().array(EmaRdm.ENAME_VIEW_DATA, array));
ReqMsg reqMsg = EmaFactory.createReqMsg();
reqMsg.domainType(EmaRdm.MMT_MARKET_PRICE)
.serviceName("ELEKTRON_DD")
.name("JPY=")
.payload(view)
.priority(1, 1)
.initialImage(true)
.interestAfterRefresh(true);
long handle = consumer.registerClient(reqMsg, appClient);You RIC request code is valid. The code works fine on my environment.
Could you please give me more information about your application and code as follows?
- The version of EMA Java
- The version of Java SDK and your OS
- snippet code that constructs the equityFidView Element List payload
- Example RIC that encounters the problem
0
Answers
-
Hi @wasin.w
EMA is 3.6.2.2
JDK: openjdk version "1.8.0_345"
public static ElementList createEquityView() {
OmmArray array = EmaFactory.createOmmArray();
Arrays.asList(ReutersFieldName.EQUITIES).forEach(field -> array.add(EmaFactory.createOmmArrayEntry().intValue(field.getFid())));
ElementList view = EmaFactory.createElementList();
view.add(EmaFactory.createElementEntry().uintValue(EmaRdm.ENAME_VIEW_TYPE, 1));
view.add(EmaFactory.createElementEntry().array(EmaRdm.ENAME_VIEW_DATA, array));
return view;
}PHK and RETL got Internal error INCOMPLETE_DATA
SEMR got java.lang.ArrayIndexOutOfBoundsException: -1 error
MSFT--250620C00465000 got
ava.nio.BufferOverflowException: null
at java.nio.Buffer.nextPutIndex(Buffer.java:525)
at java.nio.HeapByteBuffer.put(HeapByteBuffer.java:173)
at com.refinitiv.ema.access.Utilities.copy(Utilities.java:275)
at com.refinitiv.ema.access.MsgImpl.msgPayload(MsgImpl.java:787)
at com.refinitiv.ema.access.ReqMsgImpl.payload(ReqMsgImpl.java:643)
0 -
Hello @fanghua.liu
Thank you for the information. I am not sure how you implemented your ReutersFieldName.EQUITIES variable, so I did a quick tested with the following code using EMA Java 3.6.2.2 and Java 1.8.0_261 connect to my local ADS.
ElementList view = EmaFactory.createElementList();
Integer fields[] = new Integer[] { 3, 22,25, 6,15,16,19,21,30,31,32};
Arrays.asList(fields).forEach(field -> array.add(EmaFactory.createOmmArrayEntry().intValue(field)));
view.add(EmaFactory.createElementEntry().uintValue(EmaRdm.ENAME_VIEW_TYPE, 1));
view.add(EmaFactory.createElementEntry().array(EmaRdm.ENAME_VIEW_DATA, array));
ReqMsg reqMsg = EmaFactory.createReqMsg();
reqMsg.domainType(EmaRdm.MMT_MARKET_PRICE)
.serviceName("ELEKTRON_DD")
.name("JPY=")
.payload(view)
.priority(1, 1)
.initialImage(true)
.interestAfterRefresh(true);
long handle = consumer.registerClient(reqMsg, appClient);The code works fine on my end.
I also checked the RTSDK Java CHANGELOG.md file but I cannot find any related issue logs in the file.
If you can replicate the issue on demand on your control environment, could you please test the issue with the EMA Java 3.7.3.0 (RTSDK Java 2.1.3.L1) to see if the issue has been fixed in newer version of the SDK?
- Note: The latest version of the SDK is EMA Java 3.8.0.0 (RTSDK Java 2.2.0.L1). However, this 3.8.0.0 version drops Java 8/1.8 supported.
Alternatively, you may contact the Real-Time APIs Support Team to investigate this null pointer issue in detail. You can submit a support ticket to the team by clicking the "Contact premium support" button on the https://developers.lseg.com/en/api-catalog/refinitiv-real-time-opnsrc/rt-sdk-java page.
0
Categories
- All Categories
- 3 Polls
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 34 Data Model Discovery
- 684 Datastream
- 1.4K DSS
- 614 Eikon COM
- 5.2K Eikon Data APIs
- 10 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 248 ETA
- 552 WebSocket API
- 37 FX Venues
- 14 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 23 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 275 Open PermID
- 44 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 22 RDMS
- 1.9K Refinitiv Data Platform
- 639 Refinitiv Data Platform Libraries
- 4 LSEG Due Diligence
- LSEG Due Diligence Portal API
- 4 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.2K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 12 World-Check Customer Risk Screener
- 1K World-Check One
- 46 World-Check One Zero Footprint
- 45 Side by Side Integration API
- 2 Test Space
- 3 Thomson One Smart
- 10 TR Knowledge Graph
- 151 Transactions
- 143 REDI API
- 1.8K TREP APIs
- 4 CAT
- 26 DACS Station
- 121 Open DACS
- 1.1K RFA
- 104 UPA
- 191 TREP Infrastructure
- 228 TRKD
- 915 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 91 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 46 中文论坛