I have written the simplest code example that returns a refresh message and it gets a internal stack trace on unregister(). What's wrong in these 40 lines?
OnMsgTest onMsgTest = new OnMsgTest(ommConsumer, symbol);<br /> long handle = ommConsumer.registerClient(reqMsg.serviceName(source).name(symbol), onMsgTest);
and later
@Override<br /> public void onAllMsg(Msg msg, OmmConsumerEvent consumerEvent) {<!-- --><br /> Long handle = consumerEvent.handle();<br /> String s = "onAllMsg symbol=" + symbol + " handle=" + handle + " msg=" + msg.toString();<br /> logger.info(s);<br /> ommConsumer.unregister(handle);<br /> }<br />
and the stack trace [1;31mjava.lang.NullPointerException[m: [1;31mCannot invoke "com.refinitiv.ema.access.OmmConsumerClient.onRefreshMsg(com.refinitiv.ema.access.RefreshMsg, com.refinitiv.ema.access.OmmConsumerEvent)" because the return value of "com.refinitiv.ema.access.Item.client()" is null[m<br /> [1mat[m com.refinitiv.ema.access.ItemCallbackClientConsumer.notifyOnRefreshMsg ([1mItemCallbackClient.java:2567[m)<br /> [1mat[m com.refinitiv.ema.access.ItemCallbackClient.processRefreshMsg ([1mItemCallbackClient.java:1789[m)<br /> [1mat[m com.refinitiv.ema.access.ItemCallbackClient.defaultMsgCallback ([1mItemCallbackClient.java:1626[m)<br /> [1mat[m com.refinitiv.eta.valueadd.reactor.Reactor.sendDefaultMsgCallback ([1mReactor.java:2084[m)<br />