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.

Cannot delete cache files
 Post subject: Cannot delete cache files Post rating: 0   New post Posted: Mon 09 Sep, 2013, 11:53 
User avatar

User rating: 0
Joined: Wed 03 Jul, 2013, 14:08
Posts: 16
Location: BrazilBrazil
I'm trying to use ITesterClient to test my strategy.
After it download all historical data it return a exception while starting the strategy on client.startStrategy(new MyStrategy())

Exception in thread "main" java.lang.RuntimeException: com.dukascopy.charts.data.datacache.DataCacheException: Cannot delete cache files [C:\jforex\cache\EURUSD\2013\07\30\19h_ticks.bi5]

testClient.setCacheDirectory(cacheDir);

Future<?> future = testClient.downloadData(null);
future.get();
client.startStrategy(new MyStrategy())


I have fully write permission on folder. It's not a permission problem.

Why it's trying to delete my cache?
How to fix?


 
 Post subject: Re: Cannot delete cache files Post rating: 0   New post Posted: Mon 09 Sep, 2013, 18:10 
User avatar

User rating: 0
Joined: Wed 03 Jul, 2013, 14:08
Posts: 16
Location: BrazilBrazil
Strange.

On linux it work fine.


 
 Post subject: Re: Cannot delete cache files Post rating: 2   New post Posted: Tue 10 Sep, 2013, 09:23 
User avatar

User rating: 164
Joined: Mon 08 Oct, 2012, 10:35
Posts: 676
Location: NetherlandsNetherlands
Just some random thoughts:
- can you delete that problematic file manually?
- do you, by any chance, using the same cache location for the JForex platform and for the I SDK (ITesterClient)?
- what if you delete the cache manually and try to execute/run the ITesterClient again?
- do you have UAC in place? Rights to c:\ could be handled by UAC. Try to disable.

I don't think it is trying to delete the whole cache, rather just updating some temporary files.


 
 Post subject: Re: Cannot delete cache files Post rating: 1   New post Posted: Fri 13 Sep, 2013, 18:21 
User avatar

User rating: 70
Joined: Sat 22 Sep, 2012, 17:43
Posts: 118
Location: Brazil, Fortaleza, Ceará
You omitted the most important line - the definition of the variable cacheDir.
I presume this is properly escaped as either "C:\\jforex\\cache" or "C:/jforex/cache".

Make sure you are running a relatively recent copy of the JForex SDK (2.8.0+ should suffice although I was on 2.7.9 myself until 2 weeks ago) or at the very least that the Windows version matches the one you used in Linux.

Clear out the contents of the cache - completely empty - no old data e.g. historical data generated in the same directory by your Linux installation or as tcsabina suggested your installed JForex Platform.

Also consider the following wrapping for further information purposes:
try
{
   Future<?> future = testClient.downloadData(null);
   future.get();
}
catch(Exception e)
{
   //some output here regarding 'e' long before strategy start
}
If it hasn't been addressed by tcsabina's suggestions and still fails beyond these, it could be the 3 letter B word but let's see.


 
 Post subject: Re: Cannot delete cache files Post rating: 0   New post Posted: Mon 30 Sep, 2013, 10:14 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Please call "testClient.setCacheDirectory(cacheDir)" before "testClient.connect(jnlpUrl, userName, password)"
Due to "testClient.connect()" causes engine to start using default cache folder.


 

Jump to:  

  © 1998-2026 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