Dukascopy
 
 
Wiki JStore Search Login

Attention! Read the forum rules carefully before posting a topic.

    Submit JForex API bug reports in this forum only.
    Submit Converter issues in Converter Issues.
    Off topics are strictly forbidden.

Any topics which do not satisfy these rules will be deleted.

JForex-SDK 2.42.2 problem with IClientInfo
 Post subject: JForex-SDK 2.42.2 problem with IClientInfo Post rating: 0   New post Posted: Mon 01 Dec, 2014, 17:03 
User avatar

User rating: 0
Joined: Wed 29 May, 2013, 04:14
Posts: 62
Hi,
here we go... another problem...
IClientInfo null..

Please see...
    public void onBar(Instrument instrument, Period period, IBar askBar, IBar bidBar) throws JFException {
        print("clientInfo.getClientId() "+clientInfo.getClientId());//<----NULLPointer
       
        /*//CLIENT ID
        for(IClientInfo clInfo : context.getAccount().getClients()){
            print("for: clientInfo.getClientId() "+clInfo.getClientId());

        }
        */       
    }

OutPut:
15:58:10 Strategy "ClientInfo" is stopped at 2014-12-01 15:58:12.285 GMT on the local computer with no parameters. Reason: Stopped by Engine
15:58:10 Stopping "ClientInfo" strategy at 2014-12-01 15:58:12.283 GMT on the local computer
15:58:10 java.lang.NullPointerException @ jforex.ClientInfo.onBar(ClientInfo.java:44)



Attachments:
ClientInfo.java [1.45 KiB]
Downloaded 112 times
DISCLAIMER: Dukascopy Bank SA's waiver of responsability - Documents, data or information available on this webpage may be posted by third parties without Dukascopy Bank SA being obliged to make any control on their content. Anyone accessing this webpage and downloading or otherwise making use of any document, data or information found on this webpage shall do it on his/her own risks without any recourse against Dukascopy Bank SA in relation thereto or for any consequences arising to him/her or any third party from the use and/or reliance on any document, data or information found on this webpage.
 
 Post subject: Re: JForex-SDK 2.42.2 problem with IClientInfo Post rating: 0   New post Posted: Mon 01 Dec, 2014, 17:26 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Hello!

Variable IClientInfo clientInfo in your strategy is not assigned, so it's obvious when you trying to use it you get NullPointerException. It has nothing to do with JForex-SDK.


 
 Post subject: Re: JForex-SDK 2.42.2 problem with IClientInfo Post rating: 0   New post Posted: Mon 01 Dec, 2014, 17:56 
User avatar

User rating: 0
Joined: Wed 29 May, 2013, 04:14
Posts: 62
Hi, please, can you show me an example?
Because until last release this code worked perfect:

        for(IClientInfo clInfo : context.getAccount().getClients()){
            print("for: clientInfo.getClientId() "+clInfo.getClientId());

        }


Now with JForex 2.42.2 not work..


 
 Post subject: Re: JForex-SDK 2.42.2 problem with IClientInfo Post rating: 0   New post Posted: Tue 02 Dec, 2014, 13:49 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
We will investigate.


 
 Post subject: Re: JForex-SDK 2.42.2 problem with IClientInfo Post rating: 0   New post Posted: Tue 02 Dec, 2014, 14:55 
User avatar

User rating: 0
Joined: Wed 29 May, 2013, 04:14
Posts: 62
API Support wrote:
We will investigate.


if you are sure it is not a bug, please show me one different way for my code.. I need client Id.
Thanks.


 
 Post subject: Re: JForex-SDK 2.42.2 problem with IClientInfo Post rating: 0   New post Posted: Mon 08 Dec, 2014, 19:11 
User avatar

User rating: 0
Joined: Wed 29 May, 2013, 04:14
Posts: 62
Hello Support,
some news about my problem??


 
 Post subject: Re: JForex-SDK 2.42.2 problem with IClientInfo Post rating: 0   New post Posted: Tue 09 Dec, 2014, 08:23 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
It's a bug, fix should be available in next platform and sdk releases.


 

Jump to:  

cron
  © 1998-2025 Dukascopy® Bank SA
On-line Currency forex trading with Swiss Forex Broker - ECN Forex Brokerage,
Managed Forex Accounts, introducing forex brokers, Currency Forex Data Feed and News
Currency Forex Trading Platform provided on-line by Dukascopy.com