Dukascopy
 
 
Wiki JStore Search Login

Compile with error Cannot load target class
 Post subject: Compile with error Cannot load target class Post rating: 0   New post Posted: Mon 29 Oct, 2012, 17:52 
User avatar

User rating: 2
Joined: Mon 30 May, 2011, 15:41
Posts: 86
Location: Czech Republic, Prague
When compiling strategy I receive "Cannot load target class" error.
Can I identify what class could not be loaded?
When compiling with JForex-SDK programatically all is OK and compiled jfx strategy is functional with JForex platform.
Thank you.


 
 Post subject: Re: Compile with error Cannot load target class Post rating: 0   New post Posted: Tue 30 Oct, 2012, 08:32 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Please send us what you receive on the java console:
viewtopic.php?f=81&t=39073


 
 Post subject: Re: Compile with error Cannot load target class Post rating: 0   New post Posted: Tue 30 Oct, 2012, 09:50 
User avatar

User rating: 2
Joined: Mon 30 May, 2011, 15:41
Posts: 86
Location: Czech Republic, Prague
Match: ignoring maxHeap: -1
   Match: selecting InitHeap: 536870912
   Match: digesting vmargs: null
   Match: digested vmargs: [JVMParameters: isSecure: true, args: ]
   Match: JVM args after accumulation: [JVMParameters: isSecure: true, args: ]
   Match: digest LaunchDesc: https://www.dukascopy.com/client/demo/jclient/jforex.jnlp
   
***************************************************************
*************** COMPILE HERE ******************
*****************************************************************
30.10.2012 09:46:01.763   SEVERE                            a.f ] null
java.lang.NullPointerException
   at java.lang.Class.forName0(Native Method)
   at java.lang.Class.forName(Class.java:247)
   at com.dukascopy.dds2.greed.agent.a.f.aB(Unknown Source)
   at com.dukascopy.dds2.greed.agent.a.e.b(Unknown Source)
   at com.dukascopy.dds2.greed.agent.a.e.a(Unknown Source)
   at com.dukascopy.dds2.greed.util.d.a(Unknown Source)
   at com.dukascopy.dds2.greed.actions.CompileStrategyAction.Ag(Unknown Source)
   at com.dukascopy.dds2.greed.actions.c.run(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
   at java.lang.Thread.run(Thread.java:662)
30.10.2012 09:46:01.763   SEVERE                            a.e ] Cannot load target class
java.lang.Exception: Cannot load target class
   at com.dukascopy.dds2.greed.agent.a.e.b(Unknown Source)
   at com.dukascopy.dds2.greed.agent.a.e.a(Unknown Source)
   at com.dukascopy.dds2.greed.util.d.a(Unknown Source)
   at com.dukascopy.dds2.greed.actions.CompileStrategyAction.Ag(Unknown Source)
   at com.dukascopy.dds2.greed.actions.c.run(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:909)
   at java.lang.Thread.run(Thread.java:662)


 
 Post subject: Re: Compile with error Cannot load target class Post rating: 0   New post Posted: Tue 30 Oct, 2012, 10:24 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Could you please provide the strategy? If you don't want to make it public, then send it to [email protected] with a reference to this topic.


 
 Post subject: Re: Compile with error Cannot load target class Post rating: 0   New post Posted: Tue 30 Oct, 2012, 10:54 
User avatar

User rating: 2
Joined: Mon 30 May, 2011, 15:41
Posts: 86
Location: Czech Republic, Prague
I found I can't compile any strategy. I tested W7 and W8 computers and I tested DEMO a LIVE environment.

package jforex.strategy;

import com.dukascopy.api.IAccount;
import com.dukascopy.api.IBar;
import com.dukascopy.api.IContext;
import com.dukascopy.api.IMessage;
import com.dukascopy.api.IStrategy;
import com.dukascopy.api.ITick;
import com.dukascopy.api.Instrument;
import com.dukascopy.api.JFException;
import com.dukascopy.api.Period;

public class PureStrategy implements IStrategy
{
    @Override public void onStart(IContext context) throws JFException { }
    @Override public void onTick(Instrument instrument, ITick tick) throws JFException { }
    @Override public void onBar(Instrument instrument, Period period, IBar askBar, IBar bidBar) throws JFException { }
    @Override public void onMessage(IMessage message) throws JFException {}
    @Override public void onAccount(IAccount account) throws JFException {}
    @Override public void onStop() throws JFException {}
}


 
 Post subject: Re: Compile with error Cannot load target class Post rating: 0   New post Posted: Tue 06 Nov, 2012, 10:31 
JForex Master
User avatar

User rating:
Joined: Wed 16 Sep, 2009, 18:23
Posts: 1054
Location: Geneva, Switzerland
We cannot repeat this.
Can you do a simple test? Right click on Strategies in the workspace tree, New strategy, Save, Compile.

Which version of JAVA do you use?


 
 Post subject: Re: Compile with error Cannot load target class Post rating: 0   New post Posted: Tue 06 Nov, 2012, 15:20 
User avatar

User rating: 2
Joined: Mon 30 May, 2011, 15:41
Posts: 86
Location: Czech Republic, Prague
Thank you for reply. I use JRockit as default Java for better performace. After change to standard Java for JForex platform all is ok. Thank you.


 

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