|
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.
NoSuchField error when running console java tester |
flight16
|
Post subject: NoSuchField error when running console java tester |
Post rating: 0
|
Posted: Sat 25 Jun, 2011, 01:58
|
|
User rating: 0
Joined: Sat 25 Jun, 2011, 01:46 Posts: 2 Location: JP
|
I'm running the "TesterMain.java" example and get the following stacktrace: run: log4j:WARN No appenders could be found for logger (org.apache.log4j.chainsaw.Main). log4j:WARN Please initialize the log4j system properly. Exception in thread "main" java.lang.NoSuchFieldError: EXCEPTION_CAUGHT at com.dukascopy.transport.client.ClientState.<init>(ClientState.java:21) at com.dukascopy.transport.client.ClientConnector.<init>(ClientConnector.java:37) at com.dukascopy.transport.client.ClientProtocolHandler.init(ClientProtocolHandler.java:99) at com.dukascopy.transport.client.ClientProtocolHandler.<init>(ClientProtocolHandler.java:73) at com.dukascopy.transport.client.TransportClient.<init>(TransportClient.java:306) at com.dukascopy.charts.data.datacache.CurvesJsonProtocolHandler.connect(CurvesJsonProtocolHandler.java:158) at com.dukascopy.charts.data.datacache.FeedDataProvider.connectToHistoryServer(FeedDataProvider.java:357) at com.dukascopy.api.impl.connect.TesterClientImpl.connect(TesterClientImpl.java:193) at com.dukascopy.api.impl.connect.TesterClientImpl.connect(TesterClientImpl.java:171) at scanner.Testing.main(Testing.java:103) Java Result: 1 I had the example working several months ago. I downloaded the latest version of the jforex api and cleared the java cache as well as deleting the jforex cache. Has anybody seen a problem like this?
|
|
|
|
 |
Guidera
|
Post subject: TesterMainGuiMode Ma_Play Exception |
Post rating: 0
|
Posted: Mon 27 Jun, 2011, 04:43
|
|
User rating: 0
Joined: Mon 23 May, 2011, 16:03 Posts: 13 Location: BrazilBrazil
|
Hi Support, I was trying to run TesterMainGuiMode from Wiki with the MA_Play but didn't suceeded. This was the Exeption I had:
Exception in thread "Thread-3" java.lang.NoSuchFieldError: EXCEPTION_CAUGHT at com.dukascopy.transport.client.ClientState.<init>(ClientState.java:21) at com.dukascopy.transport.client.ClientConnector.<init>(ClientConnector.java:37) at com.dukascopy.transport.client.ClientProtocolHandler.init(ClientProtocolHandler.java:99) at com.dukascopy.transport.client.ClientProtocolHandler.<init>(ClientProtocolHandler.java:73) at com.dukascopy.transport.client.TransportClient.<init>(TransportClient.java:306) at com.dukascopy.charts.data.datacache.CurvesJsonProtocolHandler.connect(CurvesJsonProtocolHandler.java:158) at com.dukascopy.charts.data.datacache.FeedDataProvider.connectToHistoryServer(FeedDataProvider.java:357) at com.dukascopy.api.impl.connect.TesterClientImpl.connect(TesterClientImpl.java:193) at com.dukascopy.api.impl.connect.TesterClientImpl.connect(TesterClientImpl.java:171) at originais.TesterMainGUIMode.startStrategy(TesterMainGUIMode.java:138) at originais.TesterMainGUIMode$3$1.run(TesterMainGUIMode.java:251) at java.lang.Thread.run(Unknown Source)
Thanks
|
|
|
|
 |
API Support
|
Post subject: Re: NoSuchField error when running console java tester |
Post rating: 0
|
Posted: Mon 27 Jun, 2011, 14:15
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
We were not able to reproduce the error. Does the problem persist?
|
|
|
|
 |
flight16
|
Post subject: Re: NoSuchField error when running console java tester |
Post rating: 0
|
Posted: Tue 28 Jun, 2011, 12:24
|
|
User rating: 0
Joined: Sat 25 Jun, 2011, 01:46 Posts: 2 Location: JP
|
It still happens. The URL I've set it to is https://mk2-live.kakakufx.com/fo/platform/?jnlp=jforex , linked to from https://kakakufx.com/mk2/ . It looks like they have a partnership with Dukascopy. I'm using Dukascopy's iPhone client and Java client just fine. It's just the api I can no longer get to connect. Is there any way I can see what field it's complaining about? It should also be noted the exception happens after it authenticates. I tried a bogus password and it complained about no user account existing. When I use a good password and login I get the exception. It's a bit disappointing since I was demoing for 6 months fine, then the month I sign up and try the old strategies I wrote I can no longer run them. Thanks for your help.
|
|
|
|
 |
Guidera
|
Post subject: JForex New Release TesterMainGUIMode Exception NoSuchField |
Post rating: 0
|
Posted: Tue 28 Jun, 2011, 17:51
|
|
User rating: 0
Joined: Mon 23 May, 2011, 16:03 Posts: 13 Location: BrazilBrazil
|
Hi Support, I was trying to run TesterMainGuiMode from Wiki with the new JForex release and MA_Play strategy, but didn't suceeded. The strategy compiles fine and opens a GUI interface. When I click the button Run Strategy it gives the Exception below: Exception in thread "Thread-3" java.lang.NoSuchFieldError: EXCEPTION_CAUGHT at com.dukascopy.transport.client.ClientState.<init>(ClientState.java:21) at com.dukascopy.transport.client.ClientConnector.<init>(ClientConnector.java:37) at com.dukascopy.transport.client.ClientProtocolHandler.init(ClientProtocolHandler.java:99) at com.dukascopy.transport.client.ClientProtocolHandler.<init>(ClientProtocolHandler.java:73) at com.dukascopy.transport.client.TransportClient.<init>(TransportClient.java:306) at com.dukascopy.charts.data.datacache.CurvesJsonProtocolHandler.connect(CurvesJsonProtocolHandler.java:158) at com.dukascopy.charts.data.datacache.FeedDataProvider.connectToHistoryServer(FeedDataProvider.java:357) at com.dukascopy.api.impl.connect.TesterClientImpl.connect(TesterClientImpl.java:193) at com.dukascopy.api.impl.connect.TesterClientImpl.connect(TesterClientImpl.java:171) at originais.TesterMainGUIMode.startStrategy(TesterMainGUIMode.java:138) at originais.TesterMainGUIMode$3$1.run(TesterMainGUIMode.java:251) at java.lang.Thread.run(Unknown Source)
Thanks
|
|
|
|
 |
eduardobasilio
|
Post subject: Re: JForex New Release TesterMainGUIMode Exception NoSuchFie |
Post rating: 0
|
Posted: Wed 29 Jun, 2011, 02:11
|
|
User rating: -
|
Hi, Guidera.
Could you please tell me where did you find this new release?
Thanks a lot.
Eduardo.
|
|
|
|
 |
eduardobasilio
|
Post subject: Re: NoSuchField error when running console java tester |
Post rating: 0
|
Posted: Wed 29 Jun, 2011, 02:16
|
|
User rating: -
|
|
|
|
 |
API Support
|
Post subject: Re: NoSuchField error when running console java tester |
Post rating: 0
|
Posted: Wed 29 Jun, 2011, 14:15
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
Make sure you are using all libraries from the same installation. Remove old libraries if there is any. NoSuchField or NoSuchMethod errors usually happen when incompatible libraries are used.
|
|
|
|
 |
Guidera
|
Post subject: Problem TesterMainGUIMode Exception NoSuchFieldError |
Post rating: 0
|
Posted: Fri 01 Jul, 2011, 20:09
|
|
User rating: 0
Joined: Mon 23 May, 2011, 16:03 Posts: 13 Location: BrazilBrazil
|
Still having problem running class TesterMainGUIMode with MA_Play. It compiles fine but when running it, clicking the button Start Strategy will result in a exception. Imported project as downloaded from the Dukas site and configured the build path correctly. Can anyone help with the problem? Could anyone run it correctly?
Attached a photo of the exception when the problem happens
Attachments: |
File comment: Exception Photo
TesterMainGuiMode.jpg [151.35 KiB]
Downloaded 619 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.
|
|
|
|
|
 |
Guidera
|
Post subject: Re: Problem TesterMainGUIMode Exception NoSuchFieldError |
Post rating: 0
|
Posted: Mon 04 Jul, 2011, 19:26
|
|
User rating: 0
Joined: Mon 23 May, 2011, 16:03 Posts: 13 Location: BrazilBrazil
|
Hi Support,
I would like to apologise myself for posting twice in diferent topics. I did that because I realised that in the other topic the main subject being discussed wasn't exactly the same problem I have. Anyway, I looked the answer in the other topic you suggested and I would like to say that I believe I imported the jforex libs correctly and that I'm not using old libraries. I believe the exception is not due to bad path configuration. So I posted the photo with the libraries I am using. The photo also shows the moment the exception happens so you can help me with the problem with TesterMainGUIMode.
Thanks,
|
|
|
|
 |
API Support
|
Post subject: Re: Problem TesterMainGUIMode Exception NoSuchFieldError |
Post rating: 0
|
Posted: Tue 05 Jul, 2011, 07:37
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
Please try the following: 1) Backup your eclipse project. 2) remove .jar files which start with JForex-API-2.6.42. If this does not solve the problem, please check if the problem persists if you import an unchanged copy of JForex project into Eclipse.
|
|
|
|
 |
Guidera
|
Post subject: Re: Problem TesterMainGUIMode Exception NoSuchFieldError |
Post rating: 0
|
Posted: Tue 05 Jul, 2011, 18:03
|
|
User rating: 0
Joined: Mon 23 May, 2011, 16:03 Posts: 13 Location: BrazilBrazil
|
Tryed both solutions 1 and 2, still having the same problem. Another picture follow attached with the second option tested ".jar files which start with JForex-API-2.6.42 removed".
Does anyone suceed in running this class?
Attachments: |
teste2.png [79.01 KiB]
Downloaded 628 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: Problem TesterMainGUIMode Exception NoSuchFieldError |
Post rating: 0
|
Posted: Wed 06 Jul, 2011, 08:18
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
Guidera wrote: Tryed both solutions 1 and 2, still having the same problem. The library list looks ok. Did you try to import a new instance of JForexClientLibrary (i.e. make a new project) to your eclipse workspace?
|
|
|
|
 |
Guidera
|
Post subject: Re: NoSuchField error when running console java tester |
Post rating: 0
|
Posted: Thu 07 Jul, 2011, 14:37
|
|
User rating: 0
Joined: Mon 23 May, 2011, 16:03 Posts: 13 Location: BrazilBrazil
|
Hi Support,
As I said before, I tried both solutions. I tried importing a new instance of JForexClientLibrary and also removing .jar files which start with JForex-API-2.6.42 (that come inside a new instance of JForexClientLibrary downloaded from site).
Support, from your posts I can understand that the class TesterMainGUIMode work fine so could you please post a picture, an example so I can see better where I am making the mistake.
Thanks
|
|
|
|
 |
FXace
|
Post subject: Re: NoSuchField error when running console java tester |
Post rating: 0
|
Posted: Sat 09 Jul, 2011, 10:58
|
|
User rating: 0
Joined: Tue 05 Jul, 2011, 15:21 Posts: 28 Location: Switzerland,
|
My experience:
1. when running from Eclipse everything works fine (using the project created from the latest API archive available) 2. however when exporting in standalone .jar file and trying to run it (java -jar <jar file name>) I get exactly the same error message as reported above, even after clearing Java cache and rebooting the machine. Same happens also for my other applications using old ITesterClient.startStrategy(IStrategy strategy, LoadingProgressListener testerProgressListener) call
I also noticed that when exporting to runnable JAR file and using option "Extract required libraries into generated JAR" I'm getting massive amount of "duplicate entries" warnings, see the two attachments. Happens also when I remove the two .jars having "42" in their name.
Hope this helps clarify the issue.
Attachments: |
Duplicate entries in exported JAR.jpg [294.78 KiB]
Downloaded 636 times
|
JAR extract dialogue.jpg [58.39 KiB]
Downloaded 532 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: NoSuchField error when running console java tester |
Post rating: 0
|
Posted: Mon 11 Jul, 2011, 15:34
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
FXace wrote: 2. however when exporting in standalone .jar file and trying to run it (java -jar <jar file name>) I get exactly the same error message as reported above, even after clearing Java cache and rebooting the machine. Same happens also for my other applications using old ITesterClient.startStrategy(IStrategy strategy, LoadingProgressListener testerProgressListener) call We tried the following, but we could not reproduce the error - TesterMainGUIMode worked as expected: - Import a new project into eclipse workspace from the zip file.
- Export the project as a runnable jar with TesterMainGUIMode run configuration.
- Launch the jar file from console.
FXace wrote: I also noticed that when exporting to runnable JAR file and using option "Extract required libraries into generated JAR" I'm getting massive amount of "duplicate entries" warnings, see the two attachments. We also got the same warnings, however the jar file worked as expected. Moreover, when exporting the corresponding eclipse project of JForex API 2.6.38 (presumably you are testing now with JForex API 2.6.43) you get the same warnings and this jar, as we tested, also worked as expected.
|
|
|
|
 |
API Support
|
Post subject: Re: NoSuchField error when running console java tester |
Post rating: 0
|
Posted: Tue 12 Jul, 2011, 13:56
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
We was able to reproduce the problem, fix is coming
|
|
|
|
 |
API Support
|
Post subject: Re: NoSuchField error when running console java tester |
Post rating: 0
|
Posted: Thu 14 Jul, 2011, 14:19
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
The problem is fixed now, redownload the library
|
|
|
|
 |
FXace
|
Post subject: Re: NoSuchField error when running console java tester |
Post rating: 0
|
Posted: Thu 14 Jul, 2011, 22:39
|
|
User rating: 0
Joined: Tue 05 Jul, 2011, 15:21 Posts: 28 Location: Switzerland,
|
Thanks Support, I can confirm that the newest version solves the problem with standalone .jar. However contrary to my hopes the new API version doesn't solve my other problem  , see "JFOREX-3097 Severe differences in data with ITesterClient" viewtopic.php?f=43&t=38909
|
|
|
|
 |
Guidera
|
Post subject: Re: NoSuchField error when running console java tester |
Post rating: 0
|
Posted: Fri 15 Jul, 2011, 01:37
|
|
User rating: 0
Joined: Mon 23 May, 2011, 16:03 Posts: 13 Location: BrazilBrazil
|
Works! Splendid! I was really ansious for that. It seems preety nice!
Thanks Support
|
|
|
|
 |
|
Pages: [
1
]
|
|
|
|
|