Exception Type='OmmJsonConverterException', Text='Failed to convert JSON message'
When i try to subscribe to ALINN.PA i receive this exception :
Exception Type='OmmJsonConverterException', Text='Failed to convert JSON message: {"ID":24187,"Type":"Error","Text":"JSON Converter unexpected value: Invalid date value: 2022-11, code = -22","Debug":{"File":"com.refinitiv.eta.json.converter.JsonDateConverter","Line":68,"Message":"{\"ID\":24187,\"Type\":\"Refresh\",\"Key\":{\"Service\":\"ELEKTRON_DD\",\"Name\":\"ALINN.PA\"},\"State\":{\"Stream\":\"Open\",\"Data\":\"Ok\"},\"Qos\":{\"Timeliness\":\"Realtime\",\"Rate\":\"JitConflated\"},\"PermData\":\"AwEBgTLA\",\"SeqNumber\":3904,\"Fields\":{\"RDNDISPLAY\":116,\"DSPLY_NAME\":\"INNELEC MULTIMED\",\"RDN_EXCHID\":\"PAR\",\"TIMACT\":\"13:05:00\",\"TRDPRC_1\":5.2,\"TRDPRC_2\":5.2,\"TRDPRC_3\":5.22,\"TRDPRC_4\":5.2,\"TRDPRC_5\":5.22,\"NETCHNG_1\":0.0,\"HIGH_1\":5.22,\"LOW_1\":5.2,\"PRCTCK_1\":\"⇩\",\"CURRENCY\":\"EUR\",\"TRADE_DATE\":\"2022-08-30\",\"TRDTIM_1\":\"13:05:00\",\"OPEN_PRC\":5.2,\"HST_CLOSE\":5.2,\"BID\":5.18,\"ASK\":5.2,\"NEWS_TIME\":null,\"BIDSIZE\":143,\"ASKSIZE\":385,\"ACVOL_1\":1849,\"EARNINGS\":0.3861,\"YIELD\":3.846,\"PERATIO\":13.468,\"DIVPAYDATE\":\"2022-11\",\"EXDIVDATE\":\"2022-09-27\",\"LOTSZUNITS\":\"UNITS\",\"PCTCHNG\":0.0,\"SETTLE\":null,\"DIVIDEND\":0.2,\"NUM_MOVES\":14,\"HSTCLSDATE\":\"2022-08-29\",\"YRHIGH\":10.0,\"YRLOW\":4.62,\"TURNOVER\":9640,\"BOND_TYPE\":null,\"PRC_QL_CD\":\" \",\"TRDVOL_1\":85,\"LOT_SIZE_A\":1.0,\"RECORDTYPE\":113,\"NO_BIDMMKR\":1,\"NO_ASKMMKR\":1,\"BID_TONE\":\" \",\"ASK_TONE\":\" \",\"YRHIGHDAT\":\"2021-09-28\",\"YRLOWDAT\":\"2022-07-12\",\"TNOVER_SC\":\" \",\"GV8_TEXT\":\"OSUMRY\",\"PREF_DISP\":9184,\"ADJUST_CLS\":null,\"RDN_EXCHD2\":\"PAR\",\"YR_PCTCH\":-27.37,\"TRDVOL_2\":100,\"TRDVOL_3\":10,\"TRDVOL_4\":50,\"TRDVOL_5\":105,\"PROV_SYMB\":\"1110393\",\"NETCHNG_2\":null,\"PCTCHNG_2\":null}}"}}', ErrorCode='-1', SessionInfo='hostname: eu-west-1-aws-3-lrg.optimized-pricing-api.refinitiv.net
IP address: null
port: 443
connected component info: unavailable
channel state: active
connection type: encrypted
protocol type: Rssl JSON format
encrypted connection type: webSocket
major version: 14
minor version: 1
ping timeout: 30
max fragmentation size: 0
max output buffers: 0
guaranteed output buffers: 0
number input buffers: 0
system send buffer size: 0
system receive buffer size: 0
compression type: none
compression threshold: 0'
at com.refinitiv.ema.access.OmmBaseImpl.ommJCExcept(OmmBaseImpl.java:1651)
at com.refinitiv.ema.access.OmmConsumerImpl.handleJsonConverterError(OmmConsumerImpl.java:653)
at com.refinitiv.ema.access.OmmBaseImpl.reactorJsonConversionEventCallback(OmmBaseImpl.java:327)
at com.refinitiv.eta.valueadd.reactor.Reactor.performChannelRead(Reactor.java:3422)
at com.refinitiv.eta.valueadd.reactor.Reactor.dispatchChannel(Reactor.java:2672)
at com.refinitiv.eta.valueadd.reactor.ReactorChannel.dispatch(ReactorChannel.java:610)
at com.refinitiv.ema.access.OmmBaseImpl.rsslReactorDispatchLoop(OmmBaseImpl.java:1543)
at com.refinitiv.ema.access.OmmBaseImpl.run(OmmBaseImpl.java:1685)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
Why i receive this ?
Best Answer
-
This issue has been fixed in RTSDK Java Release 2.0.7.L1 (EMA 3.6.7)
RTSDK Java Release 2.0.7.L1 (Oct 7, 2022)
This release introduces Warm Standby consumer feature in ETA-Reactor and EMA. It also include maintenance/fixes for issues.
Customer Issues
[Case Number: 11147646] - [RTSDK-6167] - Uncaught NPE in EMA due to race condition in cleanup after timeout
[Case Number: 11444081] - [RTSDK-6411] - Memory leak upon repeated OMMConsumer initialize and un-intialize
[Github #201] - [RTSDK-6395] - Apache commons-configuration2 version 2.7 vulnerability in EMAJ
[GitHub #204] - [RTSDK-6412] - Documentation: Fix EMAJ configuration guide, section 4.5.3: add innerElementList.clear()
[GitHub #207] - [RTSDK-6531] - JSON Converter unexpected value with date of 2022-110
Answers
-
Hello @prestataire.marc.gastineau,
The error message states that it is unable to parse "DIVPAYDATE": "2022-11" into a date object - this seems to be a limitation of the exchange since it is sending malformed data as a date field.
You can get past this issue by using the ChannelType::RSSL_ENCRYPTED instead of the RSSL_WEBSOCKET protocol in the EMA API. RSSL is a binary optimized protocol and better suited for market data delivery and does not have to undergo parsing of JSON text into an OMM object like Websocket does.
Please see the Example 113 in the EMA API and use the Consumer_4 for your data requests.
1 -
Thank you for reporting this issue.
I have submitted this issue (207) on GitHub. You can check the progress of this issue on GitHub.
The workaround is using the EncryptedProtocolType::RSSL_SOCKET instead. For example:
<Channel>
<Name value="Channel_5"/>
<ChannelType value="ChannelType::RSSL_ENCRYPTED"/>
<CompressionType value="CompressionType::None"/>
<GuaranteedOutputBuffers value="5000"/>
<Location value="us-east-1"/>
<EnableSessionManagement value="1"/>
<EncryptedProtocolType value="EncryptedProtocolType::RSSL_SOCKET"/>
</Channel>2 -
I can't use EncryptedProtocolType::RSSL_SOCKET so do you have a solution to keep my application running after this error? Indeed I do not receive any more updates after this one.
0 -
Hi @prestataire.marc.gastineau
Do you need the 'DIVPAYDATE' field value? If not, you could consider using a View as a workaround - whereby you specify only the fields you require. This would also have the added benefit of less data bandwidth requirement and less field payload processing - i.e. just the fields you are interested in.
You can refer to the ema\examples\training\consumer\series300\ex360_MP_View\Consumer.java example with creates a View request - as well as the following article Enterprise Messaging API (Java) - Batch and View features | Refinitiv Developers
1 -
Hi @umer.nalla,
Thanks for your answer.
Yes unfortunately i need this field. I had similar erros on AMT_OS which i removed from view but i need DIVPAYDATE.
I'm going to do tests with several channels and consumers to see if i can find a workaround.0
Categories
- All Categories
- 6 AHS
- 39 Alpha
- 161 App Studio
- 4 Block Chain
- 4 Bot Platform
- 16 Connected Risk APIs
- 47 Data Fusion
- 30 Data Model Discovery
- 608 Datastream
- 1.3K DSS
- 577 Eikon COM
- 4.9K Eikon Data APIs
- 7 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- Trading API
- 2.7K Elektron
- 1.3K EMA
- 236 ETA
- 519 WebSocket API
- 33 FX Venues
- 10 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 20 Messenger Bot
- 2 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 59 Open Calais
- 264 Open PermID
- 39 Entity Search
- 2 Org ID
- PAM
- PAM - Logging
- 8.4K Private Comments
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 20 RDMS
- 1.4K Refinitiv Data Platform
- 367 Refinitiv Data Platform Libraries
- 3 Refinitiv Due Diligence
- LSEG Due Diligence Portal API
- 3 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.1K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 10 World-Check Customer Risk Screener
- 990 World-Check One
- 44 World-Check One Zero Footprint
- 45 Side by Side Integration API
- Test Space
- 3 Thomson One Smart
- 1.2K TR Internal
- Global Hackathon 2015
- 2 Specialists Who Code
- 10 TR Knowledge Graph
- 150 Transactions
- 142 REDI API
- 1.7K TREP APIs
- 4 CAT
- 21 DACS Station
- 117 Open DACS
- 1.1K RFA
- 103 UPA
- 172 TREP Infrastructure
- 224 TRKD
- 886 TRTH
- 5 Velocity Analytics
- 5 Wealth Management Web Services
- 59 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛