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.

Exception in Main.java in project JForex-3-SDK
 Post subject: Exception in Main.java in project JForex-3-SDK Post rating: 0   New post Posted: Tue 08 May, 2018, 03:54 

User rating: 0
Joined: Tue 08 May, 2018, 03:37
Posts: 2
Location: China,
I want to develop my strategies on my demo account ,
and i have imported the project JForex-3-SDF into my workspace with Eclipse,
when i ran the Main.java as a java application,exception showed up:



2018-05-08 01:35:22.029 INFO Main - Connecting...
2018-05-08 01:35:23.701 INFO AuthorizationClient - environment(jnlp.client.mode)=null, platformInstanceId=null
2018-05-08 01:35:23.705 ERROR AuthorizationClient -
java.lang.NullPointerException
at com.dukascopy.api.impl.connect.AuthorizationClient.encodeLoginName(AuthorizationClient.java:1366)
at com.dukascopy.api.impl.connect.AuthorizationClient.getAPIsAndTicketUsingLogin_SRP6(AuthorizationClient.java:915)
at com.dukascopy.api.impl.connect.AuthorizationClient.getAPIsAndTicketUsingLogin_SRP6(AuthorizationClient.java:783)
at com.dukascopy.api.impl.connect.DCClientImpl.authenticate(DCClientImpl.java:557)
at com.dukascopy.api.impl.connect.DCClientImpl.connect(DCClientImpl.java:339)
at com.dukascopy.api.impl.connect.DCClientImpl.connect(DCClientImpl.java:329)
at singlejartest.Main.tryToConnect(Main.java:105)
at singlejartest.Main.main(Main.java:64)
Exception in thread "main" com.dukascopy.api.JFException: Internal error. Error: -9
at com.dukascopy.api.impl.connect.DCClientImpl.authenticate(DCClientImpl.java:625)
at com.dukascopy.api.impl.connect.DCClientImpl.connect(DCClientImpl.java:339)
at com.dukascopy.api.impl.connect.DCClientImpl.connect(DCClientImpl.java:329)
at singlejartest.Main.tryToConnect(Main.java:105)
at singlejartest.Main.main(Main.java:64)

I am sure the parameters are all correct,how can i fix this?



The dependencies i used :

<dependencies>
<dependency>
<groupId>com.dukascopy.dds2</groupId>
<artifactId>DDS2-jClient-JForex</artifactId>
<!-- find the latest available version here:
https://www.dukascopy.com/client/jforexl ... nt-JForex/
-->
<version>3.3.11</version>
</dependency>
<dependency>
<groupId>com.dukascopy.api</groupId>
<artifactId>JForex-API</artifactId>
<!-- find the latest available version here:
https://www.dukascopy.com/client/jforexl ... Forex-API/
-->
<version>2.13.54</version>
<classifier>sources</classifier>
</dependency>
</dependencies>


Any help would be appreciated.


 
 Post subject: Re: Exception in Main.java in project JForex-3-SDK Post rating: 0   New post Posted: Wed 09 May, 2018, 08:08 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
For temporary fix please add the following arguments to VM options
Quote:
-Djnlp.client.mode=DEMO
-Djnlp.platform.mode=jclient


 

Jump to:  

cron
  © 1998-2024 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