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.

JForex 3.5.8 access control issue
 Post subject: JForex 3.5.8 access control issue Post rating: 0   New post Posted: Thu 07 Mar, 2019, 19:50 

User rating: 1
Joined: Tue 24 Apr, 2012, 13:41
Posts: 39
Hi,

In JForex 3.5.8 I have problem with access control (see log below). I have the same problem on both Live and Demo account (latest Java, Windows 10 and 7). This problem have not happened in previous JForex versions.

The strategy is too big to quote but in short in onStart() I call SwingUtilities.invokeAndWait() where inside I insert tab where I insert and setup some widgets, read config files and draw/modify objects on charts. Unfortunately sometimes I get error like below. Problem occurs in more than 50% of runs and it occurs in series. Problem it is non deterministic: sometimes it is not working but few minutes after it works again (usually problem happens just after I run JForex). I do use @RequiresFullAccess.

If I removed SwingUtilities.invokeAndWait() call, problem disappears but performance drops dramatically - strategy starts few minutes instead of fraction of second...

Do you have any ideas, what might be the cause?

Regards,
FXer

Quote:
17:51:20 at java.awt.EventDispatchThread.run(Unknown Source)
17:51:20 at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
17:51:20 at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
17:51:20 at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
17:51:20 at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
17:51:20 at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
17:51:20 at java.awt.EventQueue.dispatchEvent(Unknown Source)
17:51:20 at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
17:51:20 at java.security.AccessController.doPrivileged(Native Method)
17:51:20 at java.awt.EventQueue$3.run(Unknown Source)
17:51:20 at java.awt.EventQueue$3.run(Unknown Source)
17:51:20 at java.awt.EventQueue.access$500(Unknown Source)
17:51:20 at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
17:51:20 at java.awt.event.InvocationEvent.dispatch(Unknown Source)
17:51:20 at jforex.strategy.tools.review.SChartObjectsReview$3.run(SChartObjectsReview.java:348)
17:51:20 at com.dukascopy.dds2.greed.agent.a.removeBottomTab(L:85)
17:51:20 at com.dukascopy.util.a.executeAndWait(L:108)
17:51:20 at com.dukascopy.dds2.greed.agent.c.invoke(L:83)
17:51:20 at com.dukascopy.dds2.greed.gui.component.chart.a.fe(L:247)
17:51:20 at com.dukascopy.dds2.greed.service.handler.c.a.f(L:92)
17:51:20 at com.dukascopy.docking.framework.b.b.i(L:140)
17:51:20 at com.dukascopy.docking.framework.tree.DockableTree.render(L:351)
17:51:20 at java.awt.KeyboardFocusManager.clearFocusOwner(Unknown Source)
17:51:20 at java.awt.KeyboardFocusManager.clearGlobalFocusOwner(Unknown Source)
17:51:20 at java.awt.KeyboardFocusManager.checkReplaceKFMPermission(Unknown Source)
17:51:20 at com.sun.javaws.security.JavaWebStartSecurity.checkPermission(Unknown Source)
17:51:20 at java.lang.SecurityManager.checkPermission(Unknown Source)
17:51:20 at java.security.AccessController.checkPermission(Unknown Source)
17:51:20 at java.security.AccessControlContext.checkPermission(Unknown Source)
17:51:20 Caused by: java.security.AccessControlException: access denied ("java.awt.AWTPermission" "replaceKeyboardFocusManager")
17:51:20 at java.lang.Thread.run(Unknown Source)
17:51:20 at com.dukascopy.api.impl.execution.f$a.run(L:926)
17:51:20 at com.dukascopy.api.impl.execution.f$a.e(L:904)
17:51:20 at java.util.concurrent.FutureTask.run(Unknown Source)
17:51:20 at com.dukascopy.api.impl.execution.j.call(L:34)
17:51:20 at com.dukascopy.api.impl.connect.JForexTaskManager$c.call(L:1313)
17:51:20 at com.dukascopy.api.impl.connect.JForexTaskManager$c.call(L:1329)
17:51:20 at com.dukascopy.api.impl.connect.at.onStop(L:162)
17:51:20 at com.dukascopy.api.impl.execution.t.call(L:13)
17:51:20 at com.dukascopy.api.impl.execution.t.call(L:29)
17:51:20 at jforex.strategy.tools.review.SChartObjectsReview.onStop(SChartObjectsReview.java:321)
17:51:20 at javax.swing.SwingUtilities.invokeAndWait(Unknown Source)
17:51:20 at java.awt.EventQueue.invokeAndWait(Unknown Source)
17:51:20 at java.awt.EventQueue.invokeAndWait(Unknown Source)
17:51:20 java.lang.reflect.InvocationTargetException
17:51:20 null
17:51:15 at java.awt.EventDispatchThread.run(Unknown Source)
17:51:15 at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
17:51:15 at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
17:51:15 at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
17:51:15 at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
17:51:15 at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
17:51:15 at java.awt.EventQueue.dispatchEvent(Unknown Source)
17:51:15 at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
17:51:15 at java.security.AccessController.doPrivileged(Native Method)
17:51:15 at java.awt.EventQueue$3.run(Unknown Source)
17:51:15 at java.awt.EventQueue$3.run(Unknown Source)
17:51:15 at java.awt.EventQueue.access$500(Unknown Source)
17:51:15 at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
17:51:15 at java.awt.event.InvocationEvent.dispatch(Unknown Source)
17:51:15 at jforex.strategy.tools.review.SChartObjectsReview$1.run(SChartObjectsReview.java:186)
17:51:15 at com.dukascopy.dds2.greed.agent.a.getBottomTab(L:28)
17:51:15 at com.dukascopy.dds2.greed.agent.a.s(L:52)
17:51:15 at com.dukascopy.dds2.greed.agent.a.a(L:68)
17:51:15 at com.dukascopy.util.a.executeAndWait(L:108)
17:51:15 at com.dukascopy.dds2.greed.agent.b.invoke(L:66)
17:51:15 at com.dukascopy.dds2.greed.gui.component.chart.a.a(L:117)
17:51:15 at com.dukascopy.dds2.greed.gui.component.chart.a.a(L:173)
17:51:15 at com.dukascopy.dds2.greed.gui.docking.client.c.a(L:117)
17:51:15 at com.dukascopy.docking.framework.tree.DockableTree.render(L:351)
17:51:15 at java.awt.KeyboardFocusManager.clearFocusOwner(Unknown Source)
17:51:15 at java.awt.KeyboardFocusManager.clearGlobalFocusOwner(Unknown Source)
17:51:15 at java.awt.KeyboardFocusManager.checkReplaceKFMPermission(Unknown Source)
17:51:15 at com.sun.javaws.security.JavaWebStartSecurity.checkPermission(Unknown Source)
17:51:15 at java.lang.SecurityManager.checkPermission(Unknown Source)
17:51:15 at java.security.AccessController.checkPermission(Unknown Source)
17:51:15 at java.security.AccessControlContext.checkPermission(Unknown Source)
17:51:15 Caused by: java.security.AccessControlException: access denied ("java.awt.AWTPermission" "replaceKeyboardFocusManager")
17:51:15 at java.lang.Thread.run(Unknown Source)
17:51:15 at com.dukascopy.api.impl.execution.f$a.run(L:926)
17:51:15 at com.dukascopy.api.impl.execution.f$a.e(L:904)
17:51:15 at java.util.concurrent.FutureTask.run(Unknown Source)
17:51:15 at com.dukascopy.api.impl.execution.j.call(L:34)
17:51:15 at com.dukascopy.api.impl.connect.by.call(L:689)
17:51:15 at com.dukascopy.api.impl.connect.by.call(L:730)
17:51:15 at com.dukascopy.api.impl.connect.at.a(L:140)
17:51:15 at com.dukascopy.api.impl.execution.s.call(L:15)
17:51:15 at com.dukascopy.api.impl.execution.s.call(L:30)
17:51:15 at jforex.strategy.tools.review.SChartObjectsReview.onStart(SChartObjectsReview.java:182)
17:51:15 at javax.swing.SwingUtilities.invokeAndWait(Unknown Source)
17:51:15 at java.awt.EventQueue.invokeAndWait(Unknown Source)
17:51:15 at java.awt.EventQueue.invokeAndWait(Unknown Source)
17:51:15 java.lang.reflect.InvocationTargetException
17:51:15 null


 
 Post subject: Re: JForex 3.5.8 access control issue Post rating: 0   New post Posted: Fri 08 Mar, 2019, 12:19 

User rating: 1
Joined: Tue 24 Apr, 2012, 13:41
Posts: 39
Hi,

I have moved tab creation before invokeAndWait() call. Now, after I run JForex, consistently I get following message:
Quote:
11:06:24 Strategy "SChartDashboardSMA" is stopped at 2019-03-08 11:06:24.621 GMT on the local computer with parameters: periodsBack=125, side=Bid, appliedPrice=Close price, oneMinSMAsOn=true. Reason: Stopped on exception caught
11:06:24 Stopping "SChartDashboardSMA" strategy at 2019-03-08 11:06:24.568 GMT on the local computer
11:06:24 java.security.AccessControlException: access denied ("java.awt.AWTPermission" "replaceKeyboardFocusManager") @ java.security.AccessControlContext.checkPermission(Unknown Source)
11:06:24 Strategy "SChartDashboardSMA" Strategy ID: C6984C3BBE636C5A3C044A97A38A45B8 is started at 2019-03-08 11:06:24.499 GMT on the local computer with parameters: periodsBack=125, side=Bid, appliedPrice=Close price, oneMinSMAsOn=true
11:06:24 Starting "SChartDashboardSMA" strategy at 2019-03-08 11:06:24.453 GMT on the local computer
11:06:09 Connected to l-ja-eu-w-109-100-b

In my code I do not use any mechanism that deal with keyboard.

But surprisingly, if I recompile my strategy (without touching source code) it starts working in current JForex session without any errors/exceptions. If I quit JForex and run it again whole situation happens again.

Do you have any ideas where I should to look for the clue?

Regards,
FXer


 
 Post subject: Re: JForex 3.5.8 access control issue Post rating: 0   New post Posted: Fri 08 Mar, 2019, 13:00 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Hello,

Can you provide code fragment related to this line?
17:51:15 at jforex.strategy.tools.review.SChartObjectsReview.onStart(SChartObjectsReview.java:182)


 
 Post subject: Re: JForex 3.5.8 access control issue Post rating: 0   New post Posted: Fri 08 Mar, 2019, 14:22 

User rating: 1
Joined: Tue 24 Apr, 2012, 13:41
Posts: 39
Hi,

Below I've attached:
  • "minimal" sourcecode example that replicates problem in my environment. It is little messy, but it "works" ;-)
  • case 1: strategy output for error type #1 - file access issue,
  • case 2: strategy output and JForex log for error type #2 - keyboard access issue,
  • case 3: proper output (after recompilation).

Best regards,
FXer


Attachments:
TestInvokeAndWait.java [4.27 KiB]
Downloaded 139 times
case 2 error 2019-03-08 access5 JForex log.log [1.24 KiB]
Downloaded 133 times
case 2 error 2019-03-08 access5 strategy log.log [3.16 KiB]
Downloaded 130 times
case 3 noerror 2019-03-08 access5.log [471 Bytes]
Downloaded 130 times
case 1 error 2019-03-08 access4.log [5.8 KiB]
Downloaded 136 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.
 
 Post subject: Re: JForex 3.5.8 access control issue Post rating: 0   New post Posted: Tue 12 Mar, 2019, 17:33 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Hello,

Thanks for information. Problem was rectified. Fix will be available in next platform release.


 
 Post subject: Re: JForex 3.5.8 access control issue Post rating: 0   New post Posted: Tue 14 May, 2019, 19:08 

User rating: 1
Joined: Tue 24 Apr, 2012, 13:41
Posts: 39
Hello,

Is there a chance that a new version of JForex will be released on production soon? :D

Regards,
FXer


 
 Post subject: Re: JForex 3.5.8 access control issue Post rating: 0   New post Posted: Wed 15 May, 2019, 08:31 
JForex Master
User avatar

User rating:
Joined: Wed 16 Sep, 2009, 18:23
Posts: 1049
Location: Geneva, Switzerland
You can expect one more version on the DEMO before it goes LIVE. We plan to release it on LIVE next week.


 

Jump to:  

  © 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