question

Upvotes
Accepted
1 0 0 3

Null pointer exception in RFA TS1 (7.6.1.L1), when decoding time series

Hello, I am getting null pointer exceptions from TS1 when decoding time series data for some RICs, for example for "3398.HK"

I checked the TimeSeriesTrend.java TS1 example in the SDK and with 90 samples it also throws the exception. Java RFA SDK 7.6.1.L1 (Legacy examples).

Can someone please help?, stack trace from TimeSeriesTrend example below

Thanks

--------

TimeSeries: Requesting series for symbol 3398.HK:
Period: Daily, NumSamples: 90
java.lang.NullPointerException
at com.reuters.ts1.tsds.Tsds.events(Unknown Source)
at com.reuters.ts1.tsds.Tsds.data(Unknown Source)
at com.reuters.ts1.tsds.Tsds.decodeUnpackedData(Unknown Source)
at com.reuters.ts1.tsds.Tsds.decode(Unknown Source)
at com.reuters.ts1.tsds.TsdsRecord.decode(Unknown Source)
at com.reuters.ts1.tsds.TsdsSeries.secondaryDecode(Unknown Source)
at com.reuters.ts1.tsds.TsdsSeries.decode(Unknown Source)
at com.reuters.rfa.legacyexample.framework.idn.TS1TimeSeries.processTimeSeries(TS1TimeSeries.java:149)
at com.reuters.rfa.legacyexample.framework.idn.TS1TimeSeries.processItemEvent(TS1TimeSeries.java:118)
at com.reuters.rfa.legacyexample.framework.idn.TS1TimeSeries.processEvent(TS1TimeSeries.java:94)
at com.reuters.rfa.internal.common.ResponseMessage.dispatchToClient(Unknown Source)
at com.reuters.rfa.internal.common.ResponseMessage.dispatch(Unknown Source)
at com.reuters.rfa.internal.common.EventQueueImpl.localDispatch(Unknown Source)
at com.reuters.rfa.internal.common.EventQueueImpl.dispatch(Unknown Source)
at com.reuters.rfa.legacyexample.framework.sub.AppContextMainLoop$1.run(AppContextMainLoop.java:108)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
java.lang.NullPointerException
at com.reuters.rfa.legacyexample.idn.tstrend.TSTrendCanvas.update(TSTrendCanvas.java:123)
at com.reuters.rfa.legacyexample.idn.tstrend.TSTrendPanel.processTimeSeriesComplete(TSTrendPanel.java:167)
at com.reuters.rfa.legacyexample.framework.idn.TS1TimeSeries.processTimeSeries(TS1TimeSeries.java:168)
at com.reuters.rfa.legacyexample.framework.idn.TS1TimeSeries.processItemEvent(TS1TimeSeries.java:118)
at com.reuters.rfa.legacyexample.framework.idn.TS1TimeSeries.processEvent(TS1TimeSeries.java:94)
at com.reuters.rfa.internal.common.ResponseMessage.dispatchToClient(Unknown Source)
at com.reuters.rfa.internal.common.ResponseMessage.dispatch(Unknown Source)
at com.reuters.rfa.internal.common.EventQueueImpl.localDispatch(Unknown Source)
at com.reuters.rfa.internal.common.EventQueueImpl.dispatch(Unknown Source)
at com.reuters.rfa.legacyexample.framework.sub.AppContextMainLoop$1.run(AppContextMainLoop.java:108)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

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

Upvotes
Accepted
14.3k 23 8 12

Hi @tdlc

Please be informed that the issue has been fixed in RFA Java 7.6.1 E1. I did a quick test and the TimeSeriesTrend example can display data successfully without any error messages.

You can download the API from Developer Portal RFA Java Download page.


result-success.png (43.0 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.

Upvotes
14.7k 39 12 18

@tdlc, I tried that instrument with RFA Java 8.x and can get data without issues. See attached screenshot:


tstrend.png (20.4 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.

Upvotes
28.3k 30 11 15

Hello @tdlc,

I just tested example TimeSeriesTrend and was able to retrieve and to chart 3398.HK.

Firstly, if you are looking to retrieve time series data, I would not use this legacy example that uses deprecated interfaces and GUI, but instead, use a simpler OMM TimeSeriesConsole example.

If you require to use this specific example, I would make sure that the session you are passing is an SSL session, not RSSL, that user is permissioned via DACS to the content being requested, and that Market Data (not OMM) data dictionaries are either requested from the infra or, if loaded locally, are 100% in synch with the market data dictionaries on the infrastructure.

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
1 0 0 3

@Gurpreet.

@zoya.farberov

Thanks for the reply. The GUI is able to display some data, but you still get the exception on stderr (unless our problem is in our TREP installation).

Could you please send the messages printed to the stderr/stdout by the example so I can compare?

To clarify, I checked the TimeSeriesTrend example because we get this exception in our application, I am not writing a new application, I just wanted to make sure our application was decoding the data in the right way, and it is doing exactly the same as in the example.

Unfortunately migrating to OMM is currently not an option, that's why the need to make this work properly with this specific version of RFA.

Thanks in advance

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.

@tdlc,

We do not get any exceptions or errors on the run.

If the problem did not manifest until recently, I would look for what have changed. The programmatic changes first, the configuration changes second, the infrastructure updates next, check with your market data team on this.

There are no miracles in computer science :), therefore something must have changed, and sometimes, it can be very challenging to track the change, we understand!

The fact that the examples (TimeSeriesTrend and now TimeSeriesConsole) and the application fail in the same way, makes me suspect that the problem is in TREP.

I'll get in touch with support.

Thanks again

Upvotes
1 0 0 3

@zoya.farberov

How can I get the dictionaries on the infrastructure?, where are they located?

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
14.7k 39 12 18

@tdlc Console output as requested by you. Please note that I am using my local data dictionaries for decoding the data:

>>>java -classpath .\;..\Libs\rfa.jar com.reuters.rfa.example.omm.idn.tstrend.TimeSeriesTrend -rdmFieldDictionary ..\etc\RDM\RDMFieldDictionary -enumType ..\etc\RDM\enumtype.def -session ADS::Session1 -serviceName ELEKTRON_AD
Successfully acquired session: ADS::Session1
May 23, 2019 9:38:19 AM com.reuters.rfa.internal.session.omm.OMMInteractiveLoginStatusProvider processOpenStreamForRefresh
WARNING: com.reuters.rfa.session.ADS.Session1
Connection ADS::ADS2 does not support Pause/Resume. Pause and Resume requests for this connection will be ignored.

May 23, 2019 9:38:19 AM com.reuters.rfa.internal.session.omm.OMMInteractiveLoginStatusProvider processOpenStreamForRefresh
WARNING: com.reuters.rfa.session.ADS.Session1
Connection ADS::ADS2 does not support optimized Pause/Resume. Optimized Pause/Resume requests will be converted to individual item Pause/Resume requests for this connection.

MESSAGE
Msg Type: MsgType.REFRESH_RESP
Msg Model Type: LOGIN
Indication Flags: REFRESH_COMPLETE
Hint Flags: HAS_ATTRIB_INFO | HAS_ITEM_GROUP | HAS_RESP_TYPE_NUM | HAS_STATE
State: OPEN, SUSPECT, NONE, "All connections pending"
Group: 0000
RespTypeNum: 0 (RespType.SOLICITED)
AttribInfo
Name: gsbal
NameType: 1 (USER_NAME)
Attrib
ELEMENT_LIST
ELEMENT_ENTRY ApplicationId: 256
ELEMENT_ENTRY Position: 10.116.81.180/Carbon2
ELEMENT_ENTRY AllowSuspectData: 1
ELEMENT_ENTRY SingleOpen: 1
ELEMENT_ENTRY SupportBatchRequests: 7
ELEMENT_ENTRY SupportOptimizedPauseResume: 1
ELEMENT_ENTRY SupportPauseResume: 1
ELEMENT_ENTRY SupportViewRequests: 1
ELEMENT_ENTRY SupportEnhancedSymbolList: 1
ELEMENT_ENTRY SupportOMMPost: 1
Payload: None
MESSAGE
Msg Type: MsgType.STATUS_RESP
Msg Model Type: LOGIN
Indication Flags:
Hint Flags: HAS_ATTRIB_INFO | HAS_STATE
State: OPEN, OK, NONE, "Login accepted by host cil-ads2."
AttribInfo
Name: gsbal
NameType: 1 (USER_NAME)
Attrib
ELEMENT_LIST
ELEMENT_ENTRY ApplicationId: 256
ELEMENT_ENTRY ApplicationName: ADS
ELEMENT_ENTRY Position: 10.116.81.180/Carbon2
ELEMENT_ENTRY ProvidePermissionExpressions: 1
ELEMENT_ENTRY ProvidePermissionProfile: 0
ELEMENT_ENTRY AllowSuspectData: 1
ELEMENT_ENTRY SingleOpen: 1
ELEMENT_ENTRY SupportBatchRequests: 7
ELEMENT_ENTRY SupportOptimizedPauseResume: 1
ELEMENT_ENTRY SupportPauseResume: 1
ELEMENT_ENTRY SupportViewRequests: 1
ELEMENT_ENTRY SupportEnhancedSymbolList: 1
ELEMENT_ENTRY SupportOMMPost: 1
Payload: None
MESSAGE
Msg Type: MsgType.REFRESH_RESP
Msg Model Type: DIRECTORY
Indication Flags: REFRESH_COMPLETE
Hint Flags: HAS_ATTRIB_INFO | HAS_ITEM_GROUP | HAS_RESP_TYPE_NUM | HAS_STATE
State: OPEN, OK, NONE, ""
Group: 0000
RespTypeNum: 0 (RespType.SOLICITED)
AttribInfo
Filter: 3 (INFO | STATE)
Payload: 293 bytes
MAP
flags:
MAP_ENTRY (Action.ADD) :
flags:
Key: ELEKTRON_AD
Value:
FILTER_LIST
flags:
FILTER_ENTRY 1 (Action.SET) :
flags:
ELEMENT_LIST
ELEMENT_ENTRY Name: ELEKTRON_AD
ELEMENT_ENTRY Vendor: Thomson Reuters
ELEMENT_ENTRY Capabilities:
ARRAY
ARRAY_ENTRY: 5
ARRAY_ENTRY: 6
ARRAY_ENTRY: 7
ARRAY_ENTRY: 8
ARRAY_ENTRY: 9
ARRAY_ENTRY: 10
ARRAY_ENTRY: 11
ARRAY_ENTRY: 13
ARRAY_ENTRY: 18
ARRAY_ENTRY: 19
ARRAY_ENTRY: 20
ARRAY_ENTRY: 21
ARRAY_ENTRY: 23
ARRAY_ENTRY: 24
ARRAY_ENTRY: 25
ARRAY_ENTRY: 26
ARRAY_ENTRY: 28
ARRAY_ENTRY: 33
ARRAY_ENTRY: 126
ELEMENT_ENTRY DictionariesProvided:
ARRAY
ARRAY_ENTRY: RWFFld
ARRAY_ENTRY: RWFEnum
ELEMENT_ENTRY DictionariesUsed:
ARRAY
ARRAY_ENTRY: RWFFld
ARRAY_ENTRY: RWFEnum
ELEMENT_ENTRY QoS:
ARRAY
ARRAY_ENTRY: (RT, TbT)
ELEMENT_ENTRY SupportsQoSRange: 0
ELEMENT_ENTRY ServiceID: 356
FILTER_ENTRY 2 (Action.SET) :
flags:
ELEMENT_LIST
ELEMENT_ENTRY ServiceState: 1
ELEMENT_ENTRY AcceptingRequests: 1
Received dictionary: RWFEnum
Enum Dictionary Refresh is complete
Received dictionary: RWFFld
Field Dictionary Refresh is complete
TimeSeries: Requesting series for symbol 3398.HK:
Period: Daily, NumSamples: 90

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
14.3k 23 8 12

Hello @tdlc

The API development team can replicate the issue with the same RFA Java example. The team is working on this issue.

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.