NullPointerException on running one of example

Created at 11 Mar 2020, 12:48
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
ED

edgartrania

Joined 11.03.2020

NullPointerException on running one of example
11 Mar 2020, 12:48


Hi on reading the doc and im following the instruction here 

However upon running the one of example "in this case I execute ProtoOAAssetListReqExample.java" but I received error

Exception in thread "main" java.lang.NullPointerException
        at com.spotware.connect.netty.AuthHelper.authorizeOnlyOneTrader(AuthHelper.java:34)
        at com.spotware.example.ProtoOAAssetListReqExample.main(ProtoOAAssetListReqExample.java:21)

 

No idea whats wrong i'm sure I copied correctly all ids, key, token etc. Im using Java 8.


@edgartrania
Replies

ac@arconomy.digital
05 Apr 2020, 01:55

Did you mange to solve this? I am having the same issue.


@ac@arconomy.digital

ac@arconomy.digital
06 Apr 2020, 01:17

RE:

ac@arconomy.digital said:

Did you mange to solve this? I am having the same issue.

The issue for me was the timeout being too short.

In the ProtoMessageReceiver class update the timeout.

private static final int TIMEOUT_WAITING_MSG = 2000;

@ac@arconomy.digital

edgartrania
06 Apr 2020, 11:08

RE: RE:

ac@arconomy.digital said:

ac@arconomy.digital said:

Did you mange to solve this? I am having the same issue.

The issue for me was the timeout being too short.

In the ProtoMessageReceiver class update the timeout.

private static final int TIMEOUT_WAITING_MSG = 2000;

I'm not able to verify it in my end, im seeing new issue now like 

Unable to find cTID trader account with id=XXXXX

Im not really sure if i copied right cTID or there must other id from somewhere else -- in playgroud page I just copied the number appeared below Get full access for trading accounts (view accounts info and trading): after clicking get token button. Am i doing correct?


@edgartrania