question

Upvote
Accepted

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 ?

ema-apiwebsocketsjavaexceptionjson-decode-errorstreaming
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.

Upvotes
Accepted
52.9k 136 44 63

@prestataire.marc.gastineau

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-11
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.

Upvote
16.7k 42 12 19

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.

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.

Upvotes
52.9k 136 44 63

@prestataire.marc.gastineau

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>
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.

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.

Upvote
24.9k 87 10 22

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

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.

Upvotes

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.

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.