question

Upvotes
Accepted
17 0 1 3

EMA API : OmmInvalidUsageException error code : 4048

We noted below error message related to OmmInvalidUsage Exception with error code : 4048, this can happen several time per day. any help on issue identification is welcome.

Error message:

Exception in thread "pool-2-thread-1" Exception Type='OmmInvalidUsageException', Text='Attempt to state() while it is NOT set.', Error Code='-4048'

at com.refinitiv.ema.access.MsgImpl.ommIUExcept(MsgImpl.java:393)

at com.refinitiv.ema.access.StatusMsgImpl.state(StatusMsgImpl.java:107)

at marketprice.MarketPriceImpl.onStatusMsg(MarketPriceImpl.java:232)

at com.refinitiv.ema.access.ItemCallbackClientConsumer.notifyOnStatusMsg(ItemCallbackClient.java:2573)

at com.refinitiv.ema.access.ItemCallbackClient.processStatusMsg(ItemCallbackClient.java:1881)

at com.refinitiv.ema.access.ItemCallbackClient.defaultMsgCallback(ItemCallbackClient.java:1628)

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:2940)

at com.refinitiv.eta.valueadd.reactor.WlItemHandler.readStatusMsg(WlItemHandler.java:2317)

at com.refinitiv.eta.valueadd.reactor.WlItemHandler.readMsg(WlItemHandler.java:1916)

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:581)

at com.refinitiv.ema.access.OmmBaseImpl.rsslReactorDispatchLoop(OmmBaseImpl.java:1509)

at com.refinitiv.ema.access.OmmBaseImpl.run(OmmBaseImpl.java:1651)

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)

#technologyema-api#product
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.

1 Answer

· Write an Answer
Upvotes
Accepted
23k 60 15 21

Hi @y.attar,

It looks like your app is trying to get the null State object in the status callback function. Please add a validation check before accessing the object - something like:

public void onStatusMsg(StatusMsg msg, OmmConsumerEvent event) {
  if(msg.hasState()) {
    // get the OMM State message
    OmmState st = msg.state();
    .
    .



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 Gurpreet,
Thanks a lot for your help, I'll do the necessary as suggested and initiate connection for test.

Kind Regards

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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