Dukascopy
 
 
Wiki JStore Search Login

JFOREX-2636 Instrument.toStringSet causes NPE
 Post subject: JFOREX-2636 Instrument.toStringSet causes NPE Post rating: 0   New post Posted: Sat 15 Jan, 2011, 21:32 

User rating: 0
Joined: Wed 28 Oct, 2009, 10:25
Posts: 13
Hello,

I upgraded my JForex jars:

jForex-2.5.1 -> jForex-2.11.4
DDS2-Connector-1.1.9 -> DDS2-Connector-1.1.22
JForex-API-2.6.17 -> JForex-API-2.6.30

And when passing the instrument list (as I did in the previous version):

Set<Instrument> instruments = new HashSet<Instrument>();
instruments.addAll(Arrays.asList(Instrument.values()));
client.setSubscribedInstruments(instruments);


[CHF/JPY, NZD/CAD, EUR/CHF, EUR/USD, AUD/CHF, USD/SEK, XAG/USD, AUD/CAD, GBP/AUD, EUR/NOK, ZAR/JPY, AUD/USD, USD/PLN, EUR/AUD, USD/HUF, NZD/USD, USD/NOK, USD/SGD, USD/CAD, USD/RON, GBP/CAD, USD/RUB, CAD/CHF, EUR/GBP, GBP/USD, USD/TRY, AUD/NZD, USD/DKK, EUR/SEK, EUR/JPY, GBP/NZD, USD/JPY, NZD/CHF, AUD/JPY, EUR/DKK, EUR/NZD, GBP/JPY, USD/HKD, NZD/JPY, USD/CHF, EUR/HKD, XAU/USD, EUR/HUF, USD/ZAR, CAD/JPY, EUR/TRY, USD/CZK, EUR/CAD, GBP/CHF, EUR/PLN, USD/MXN]

I got:

java.lang.NullPointerException
at com.dukascopy.api.Instrument.toStringSet(Instrument.java:130)
at com.dukascopy.api.impl.connect.k.run(Unknown Source)
at com.dukascopy.api.impl.connect.k.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at com.dukascopy.api.impl.connect.DCClientImpl.setSubscribedInstruments(Unknown Source)
at com.xpfx.jforex.JFApi.login(JFApi.java:579)
at com.xpfx.jforex.TradesReport.main(TradesReport.java:33)

The list I am passing to setSubscribedInstruments has no null elements, when using a debugger I could see that the first element in the list passed to Instrument.toStringSet is null.
Downgrading the jars back again - got my system to be working normally again.

Please advice as I would like to upgrade my jars.


 
 Post subject: Re: JFOREX-2636 Instrument.toStringSet causes NPE Post rating: 0   New post Posted: Wed 26 Jan, 2011, 08:20 

User rating: 0
Joined: Wed 28 Oct, 2009, 10:25
Posts: 13
I tried again with "JForex-API-2.6.32", "jForex-2.12.1" and "DDS2 Connector-1.1.24" but got the same exception.

In which version it is fixed?


 
 Post subject: Re: JFOREX-2636 Instrument.toStringSet causes NPE Post rating: 0   New post Posted: Wed 26 Jan, 2011, 12:32 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
In a new one. It will be deployed today.


 
 Post subject: Re: JFOREX-2636 Instrument.toStringSet causes NPE Post rating: 0   New post Posted: Fri 28 Jan, 2011, 13:58 

User rating: 0
Joined: Wed 28 Oct, 2009, 10:25
Posts: 13
Thanks!
Works great on "JForex-API-2.6.33" + "jForex-2.12.4" + "DDS2-Connector-1.1.25".

Is there a place to view the change log of the API?


 

Jump to:  

  © 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