question

Upvotes
Accepted
5 1 1 6

Uncaught NPE in EMA thread

We are working with below EMA SDK:

<dependency>
    <groupId>com.refinitiv.ema</groupId>
    <artifactId>ema</artifactId>
    <version>3.6.3.1</versio
</dependency>


These days we found some uncaught NulllPointerException in not .log file but standard output.

Exception in thread "pool-25-thread-1" java.lang.NullPointerException
        at com.refinitiv.ema.access.ItemCallbackClientConsumer.notifyOnAllMsg(ItemCallbackClient.java:2555)
        at com.refinitiv.ema.access.ItemCallbackClient.processRefreshMsg(ItemCallbackClient.java:1788)
        at com.refinitiv.ema.access.ItemCallbackClient.defaultMsgCallback(ItemCallbackClient.java:1626)
        at com.refinitiv.eta.valueadd.reactor.Reactor.sendDefaultMsgCallback(Reactor.java:1942)
        at com.refinitiv.eta.valueadd.reactor.Reactor.sendAndHandleDefaultMsgCallback(Reactor.java:1957)
        at com.refinitiv.eta.valueadd.reactor.WlItemHandler.callbackUser(WlItemHandler.java:2935)
        at com.refinitiv.eta.valueadd.reactor.WlItemHandler.readRefreshMsg(WlItemHandler.java:2186)
        at com.refinitiv.eta.valueadd.reactor.WlItemHandler.readMsg(WlItemHandler.java:1900)
        at com.refinitiv.eta.valueadd.reactor.Watchlist.readMsg(Watchlist.java:292)
        at com.refinitiv.eta.valueadd.reactor.Reactor.processRwfMessage(Reactor.java:2995)
        at com.refinitiv.eta.valueadd.reactor.Reactor.performChannelRead(Reactor.java:3317)
        at com.refinitiv.eta.valueadd.reactor.Reactor.dispatchChannel(Reactor.java:2529)
        at com.refinitiv.eta.valueadd.reactor.ReactorChannel.dispatch(ReactorChannel.java:601)
        at com.refinitiv.ema.access.OmmBaseImpl.rsslReactorDispatchLoop(OmmBaseImpl.java:1510)
        at com.refinitiv.ema.access.OmmBaseImpl.run(OmmBaseImpl.java:1652)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)


After discussing with Elektron Supports , we assume it should be a EMA SDK Bug.

Please help us check it out.

Thanks.





ema-api
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
Accepted
52.6k 134 44 63

@pengshuolin

I checked the call stack and found that it is similar to the issue that has been fixed in RTSDK Java 2.0.5.L1 aka EMA/ETA 3.6.5.L1 aka 3.6.5.0.

  • [Case Number: 11101002] - [RTSDK-6069] - Fixed null pointer exception with request timeout

Please upgrade to the latest version of EMA.

<dependency>
    <groupId>com.refinitiv.ema</groupId>
    <artifactId>ema</artifactId>
    <version>3.6.5.0</version>
</dependency>


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 am currently using version 3.6.5.0 but am getting the same error.
Upvotes
16.7k 42 12 19

Hi @pengshuolin,

Can you please update the EMA to latest version and try again - the dev team has fixed two NPE bugs in the SDK.

For the team to investigate, they would need to be able to reproduce the exception. Can you also document the steps required that led to this uncaught null pointer.

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
5 1 1 6


Hi @Gurpreet ,

Such situation occurred when there are some ADS error.

And we thing the client should notify user properly instead just throwing the NEP and exit the thread.

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.

Hi @pengshuolin,

I agree, if it is an exception condition, it should be raised up to the application layer for user code to react to it. Unfortunately, it becomes very hard for dev team to advise or fix an issue which they are unable to reproduce. So, I would recommend that you capture all the logs from EMA and ADS when it happens next time.

The Realtime SDK is supported by development team at this github site - https://github.com/Refinitiv/Real-Time-SDK. You can directly interact with developers by opening an issue there.

Upvotes
5 1 1 6

Hi @Gurpreet ,

we can't upload picture, please check it in <img src="xxx"/>

92333-1.png






92333-1.png (70.1 KiB)
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.