|
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.
indicator compiles but does not load to jforex platform |
Ataman
|
Post subject: indicator compiles but does not load to jforex platform |
Post rating: 0
|
Posted: Mon 31 Mar, 2014, 00:22
|
|
User rating: 0
Joined: Thu 13 Mar, 2014, 17:17 Posts: 13 Location: Hungary,
|
Hi,
I managed to get an indicator, that is using an external jar file, to compile. But when I try to add it to the currently active chart I get the following stack trace:
java.lang.NoClassDefFoundError: Could not initialize class com.domain.tiny at com.dukascopy.indicators.EMAProbeEnvelopesIndicator.setInputParameter(EMAProbeEnvelopesIndicator.java:114) at com.dukascopy.charts.math.a.a.a(Unknown Source) at com.dukascopy.charts.math.dataprovider.AbstractDataProvider$e.c(Unknown Source) at com.dukascopy.charts.math.dataprovider.AbstractDataProvider$e.run(Unknown Source)
I used the source code of one of your indicators and added the following few lines of code to it:
import com.dukascopy.api.RequiresFullAccess; import com.dukascopy.api.Library; import com.domain.tiny; @Library("com.domain.tiny-0.1.0-SNAPSHOT-standalone.jar")
and modified one method this way:
public void setInputParameter(int index, Object array) { inputs[index] = (double[]) array; System.out.println("(binomial 5 3): " + tiny.binomial(5, 3)); System.out.println("(binomial 10042, 111): " + tiny.binomial(10042, 111)); }
i.e. minimally, just to test if the code works with external jars. The jar file/java class com.domain.tiny works if I use it as a library from a simple standalone java program outside of the JForex platform.
Can you advise what might go wrong here? thanks!
|
|
|
|
 |
API Support
|
Post subject: Re: indicator compiles but does not load to jforex platform |
Post rating: 0
|
Posted: Mon 31 Mar, 2014, 07:22
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
Could you please provide a full example indicator and the library file which replicate this?
|
|
|
|
 |
Ataman
|
Post subject: Re: indicator compiles but does not load to jforex platform |
Post rating: 0
|
Posted: Mon 31 Mar, 2014, 15:05
|
|
User rating: 0
Joined: Thu 13 Mar, 2014, 17:17 Posts: 13 Location: Hungary,
|
Hi, The jar file seems to be too large, the dukascopy website does not allow me to upload it. Here is a link where you can download it: https://tempsend.com/025AF8F93B This link will expire in a few days from now. I have attached the modified strategy file (EMAProbeEnvelopesIndicator.java), and the simple java program (Hello.java) with which the above linked jar file works. I used this command to compile Hello.java (with both the java and the jar file in the current working directory): javac -cp '.:com.domain.tiny-0.1.0-SNAPSHOT-standalone.jar' Hello.java Once compiled, the following java command runs the jar file with Hello.java: java -cp '.:com.domain.tiny-0.1.0-SNAPSHOT-standalone.jar' Hello
Attachments: |
Hello.java [293 Bytes]
Downloaded 121 times
|
EMAProbeEnvelopesIndicator.java [5.1 KiB]
Downloaded 116 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.
|
|
|
|
|
 |
API Support
|
Post subject: Re: indicator compiles but does not load to jforex platform |
Post rating: 0
|
Posted: Tue 01 Apr, 2014, 17:12
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
|
|
|
 |
Ataman
|
Post subject: Re: indicator compiles but does not load to jforex platform |
Post rating: 0
|
Posted: Wed 02 Apr, 2014, 18:29
|
|
User rating: 0
Joined: Thu 13 Mar, 2014, 17:17 Posts: 13 Location: Hungary,
|
Thanks. I hope you find the bug quickly.
Maybe it is worth pointing out that I can replicate the same strange behaviour with the supplied plugin code example in JForex-SDK/src/jforex/plugin/ordertable/...
I.e. if I modify the code in OrderTablePlugin.java (add a simple external jar) and use the order-table-plugin assembly, compile and attach it to the platform then the plugin starts and then instantly and unexpectedly stops. When I use the order-table-sdk assembly with unchanged code, and build a platform-independent app, everything works.
|
|
|
|
 |
API Support
|
Post subject: Re: indicator compiles but does not load to jforex platform |
Post rating: 0
|
Posted: Thu 03 Apr, 2014, 09:21
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
Ataman wrote: Maybe it is worth pointing out that I can replicate the same strange behaviour with the supplied plugin code example in JForex-SDK/src/jforex/plugin/ordertable/...
I.e. if I modify the code in OrderTablePlugin.java (add a simple external jar) and use the order-table-plugin assembly, compile and attach it to the platform then the plugin starts and then instantly and unexpectedly stops. When I use the order-table-sdk assembly with unchanged code, and build a platform-independent app, everything works. For plugins - you need to build the jar yourself, thus include as well the dependencies in your plugin jar file. You can do this by adding the dependencies in the maven assembly, see jar-assembly-summarizer-plugin.xml and the profile summarizer-plugin in the pom.xml.
|
|
|
|
 |
Ataman
|
Post subject: Re: indicator compiles but does not load to jforex platform |
Post rating: 0
|
Posted: Mon 28 Apr, 2014, 10:40
|
|
User rating: 0
Joined: Thu 13 Mar, 2014, 17:17 Posts: 13 Location: Hungary,
|
Yes. I clearly went through the right steps of plugin compilation as I got the original unchanged plugin code to work in the JForex platform.
Will this bug be fixed in JForex4 (or in the current stable release)?
thanks
|
|
|
|
 |
API Support
|
Post subject: Re: indicator compiles but does not load to jforex platform |
Post rating: 0
|
Posted: Mon 28 Apr, 2014, 13:12
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
Ataman wrote: Will this bug be fixed in JForex4 (or in the current stable release)? Both of them.
|
|
|
|
 |
Ataman
|
Post subject: Re: indicator compiles but does not load to jforex platform |
Post rating: 0
|
Posted: Wed 30 Apr, 2014, 17:58
|
|
User rating: 0
Joined: Thu 13 Mar, 2014, 17:17 Posts: 13 Location: Hungary,
|
Any indication of by when the bug is going to be fixed would be most welcome. (I am thinking of rather vague statements, like "probably within the next two months", or "by the JForex4 comes out of beta testing", etc..).
This would help me decide whether I should keep using the SDK or switch to the JForex platform (the latter would be a lot less work).
|
|
|
|
 |
API Support
|
Post subject: Re: indicator compiles but does not load to jforex platform |
Post rating: 0
|
Posted: Thu 08 May, 2014, 14:42
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
The issue is fixed on the JForex DEMO. Please check.
|
|
|
|
 |
|
Pages: [
1
]
|
|
|
|
|