question

Upvotes
Accepted
5 1 2 3

Velocity Analytics 8 - Connect to QueryRouter

I am using DeltaStreamDemoAPI.java to execute Query from the Java API.
For example, Query is the following that you want to run.

getTicks[`symList`dataType`startDate`endDate`startTime`endTime`timeZone`time`assetClass!(`1306.T;`trade;.z.D-1;.z.D-1;10:00:00;11:00:00;`Japan;`exchangeTime;`equity)]

However, executing DeltaStreamDemoAPI.java causes an exception inside initialiseDeltaAPIService().
I get an error saying that the value of the properties file is wrong, but I do not know which parameter has a problem.

[main] INFO com.fd.delta.stream.queryrouter.DeltaQueryRouterService - Initialising the DeltaQueryRouterService
[main] ERROR com.fd.delta.stream.DeltaStreamDemoAPI - Exception creating DeltaStream, check contents of properties. Properties:
{exclusive=true, deltacontrol-primary-port=2001, loginString=userX:XXXXXX, deltacontrol-secondary-host=, encrypted=false, deltacontrol-secondary-port=, retryMaxTimeOutPeriod=10000, apiAlias=getTicks, instanceName=ExampleStreamClient, deltacontrol-tlsEnabled=false, deltacontrol-primary-host=XX.XX.XX.XX, retryTimeoutStep=1000}
java.lang.NullPointerException
    at com.fd.delta.control.impl.DCConfigurationManager.getQueryRouters(DCConfigurationManager.java:598)
    at com.fd.delta.stream.impl.DefaultDeltaStream.initialiseDeltaQueryRouterService(DefaultDeltaStream.java:691)
    at com.fd.delta.stream.impl.DefaultDeltaStream.initialiseDeltaAPIService(DefaultDeltaStream.java:739)
    at com.fd.delta.stream.DeltaStreamDemoAPI.<init>(DeltaStreamDemoAPI.java:63)
    at com.fd.delta.stream.DeltaStreamDemoAPI.main(DeltaStreamDemoAPI.java:40)
Exception in thread "main" java.lang.NullPointerException
    at com.fd.delta.stream.DeltaStreamDemoAPI.testDeltaStreamAPI(DeltaStreamDemoAPI.java:79)
    at com.fd.delta.stream.DeltaStreamDemoAPI.main(DeltaStreamDemoAPI.java:42)

How can I resolve this Exception?
In the properties file (deltastream) for DeltaStreamDemoAPI.java, the only unknown parameter is "apiAlias" parameter, what should this be specified?

apijavavelocity-analytics
icon clock
10 |1500

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

Upvotes
Accepted
61 1 0 2

Hi @yokoyama-ryouta,

Apologies if I have caused confusion with my previous response.

It turns out that DeltaStreamDemoAPI.java is not the correct file to use for the VA8 Java API sample. The correct file is the DeltaJStreamAPITestHarness. If you do not have this file, or if you are having any issues with this file, please open a support case with Refinitiv Customer Support, rather than using this developer portal. At this time, the VA8 Java API will be supported through Refinitiv Customer Support.

icon clock
10 |1500

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

Case closed on 30 October. A config change on the client VA 8 resolved the issue.

Upvotes
61 1 0 2

Hi @yokoyama-ryouta,

I am checking with our engineers about this issue and will get back to you as soon as possible.

icon clock
10 |1500

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

Upvotes
61 1 0 2

Hi @yokoyama-ryouta ,

Please replace the existing method "testDeltaStreamAPI" with the attached code. The apiAlias and query parameters will be set from the query that will be run. test-ds-api-snippet.txt


icon clock
10 |1500

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

Upvotes
5 1 2 3

Hi @mary e,

Replacing "testDeltaStreamAPI" did not fix the error.
The contents of Exception are also the same.

There are two places where errors are output.
Both are in DeltaStreamAPI.java.
The first one is when DeltaStreamDemoAPI() executes the following method.

deltaStream.initialiseDeltaAPIService(access);

The Exception output at this time is as follows.

java.lang.NullPointerException
    at com.fd.delta.control.impl.DCConfigurationManager.getQueryRouters(DCConfigurationManager.java:598)
    at com.fd.delta.stream.impl.DefaultDeltaStream.initialiseDeltaQueryRouterService(DefaultDeltaStream.java:691)
    at com.fd.delta.stream.impl.DefaultDeltaStream.initialiseDeltaAPIService(DefaultDeltaStream.java:739)
    at com.fd.delta.stream.DeltaStreamDemoAPI.<init>(DeltaStreamDemoAPI.java:63)
    at com.fd.delta.stream.DeltaStreamDemoAPI.main(DeltaStreamDemoAPI.java:40)
Exception in thread "main" java.lang.NullPointerException
    at com.fd.delta.stream.DeltaStreamDemoAPI.testDeltaStreamAPI(DeltaStreamDemoAPI.java:79)
    at com.fd.delta.stream.DeltaStreamDemoAPI.main(DeltaStreamDemoAPI.java:42)

The second is when the following method of testDeltaStreamAPI () is executed.

Map<String, IDeltaAPI> apiMap = apiService.getAPI();

The Exception output at this time is as follows.

Exception in thread "main" java.lang.NullPointerException
    at com.fd.delta.stream.DeltaStreamDemoAPI.testDeltaStreamAPI(DeltaStreamDemoAPI.java:129)
    at com.fd.delta.stream.DeltaStreamDemoAPI.main(DeltaStreamDemoAPI.java:51)
icon clock
10 |1500

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

Click below to post an Idea Post Idea