Dukascopy
 
 
Wiki JStore Search Login

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

    Try to find an answer in Wiki before asking a question.
    Submit programming questions in this forum only.
    Off topics are strictly forbidden.

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

correct jar file for com.dukascopy.api.impl.connect.DCClientImpl ??
 Post subject: correct jar file for com.dukascopy.api.impl.connect.DCClientImpl ?? Post rating: 0   New post Posted: Mon 23 Jan, 2012, 06:35 

User rating: 0
Joined: Sun 22 Jan, 2012, 09:54
Posts: 2
Hello,

When trying to login via an API using a demo login, when using the command
ClientFactory.getDefaultInstance()

the following error is received:
Quote:
java.lang.ClassNotFoundException: java.lang.ClassNotFoundException: com.dukascopy.api.impl.connect.DCClientImpl


any indication of the correct jar file to be included would be appreciated.

Thanks


 
 Post subject: Re: correct jar file for com.dukascopy.api.impl.connect.DCClientImpl ?? Post rating: 0   New post Posted: Mon 23 Jan, 2012, 10:02 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Which JForex-API version are you using? Aren't there any compilation errors before you launch the program? Also please provide full stack trace.


 
 Post subject: Re: correct jar file for com.dukascopy.api.impl.connect.DCClientImpl ?? Post rating: 0   New post Posted: Mon 23 Jan, 2012, 17:57 

User rating: 0
Joined: Sun 22 Jan, 2012, 09:54
Posts: 2
Hello,

I am using the JForex-API-2.6.53 along with Jython (2.5.2)

The code is:
import sys
sys.path.append("libs/JForex-API-2.6.53.jar")
sys.path.append("libs/indicators-sources.jar")
sys.path.append("libs/DDS2-Connector-1.1.47.jar")       
sys.path.append("libs/dds2-common-2.3.75.jar")

from com.dukascopy.api import ITick
from com.dukascopy.api import IHistory
from com.dukascopy.api import Instrument
from com.dukascopy.api.system import IClient
from com.dukascopy.api.system import ClientFactory
from java.lang  import *

iclientObj = ClientFactory.getDefaultInstance()


The resulting stack trace due to the last command (call to getDefaultInstance) is :
Quote:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:315)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:330)
at java.lang.ClassLoader.loadClass(ClassLoader.java:250)
at com.dukascopy.api.system.ClientFactory.getDefaultInstance(ClientFactory.java:26)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)

java.lang.ClassNotFoundException: java.lang.ClassNotFoundException: com.dukascopy.api.impl.connect.DCClientImpl


Any suggestions are welcome.


 
 Post subject: Re: correct jar file for com.dukascopy.api.impl.connect.DCClientImpl ?? Post rating: 0   New post Posted: Tue 24 Jan, 2012, 09:51 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Apparently there are problems with the classpath, we don't provide support for Jython IDE. Have you succeeded to launch Standalone either in Eclipse or Netbeans?


 

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