java.lang.NumberFormatException when calculating oneSecondBalance
Closed this issue · 3 comments
GoogleCodeExporter commented
When I leave JBT running past trading hours my EventReport fills with these
messages:
java.lang.NumberFormatException: For input string: "�" at
sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1224) at
java.lang.Double.valueOf(Double.java:475) at
com.jbooktrader.platform.marketdepth.MarketDepth.getMarketSnapshot(MarketDepth.j
ava:99)
at
com.jbooktrader.platform.marketbook.MarketBook.getNextMarketSnapshot(MarketBook.
java:58)
at
com.jbooktrader.platform.strategy.StrategyRunner$SnapshotHandler.run(StrategyRun
ner.java:28)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at
java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150) at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(
ScheduledThreadPoolExecutor.java:98)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic
(ScheduledThreadPoolExecutor.java:181)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Schedul
edThreadPoolExecutor.java:205)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:8
86)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
I noticed this problem when I was collecting data from Eurex exchange, I'm
not sure if same thing happens with Globex but I will try to test it.
Original issue reported on code.google.com by marcin.p...@gmail.com
on 20 Nov 2009 at 10:10
GoogleCodeExporter commented
[deleted comment]
GoogleCodeExporter commented
At first I thought that this bug does not affect other data streams but this is
not
the case. When I'm collecting data for European and U.S market products at the
same
time, data will stop coming at the end of euro session even though U.S data is
still
available.
This piece of code gets rid of the exception but then price goes close to zero
and it
doesn't look good on a chart.
if (Double.isNaN(averageBalance)) {
averageBalance = 0;
}
Original comment by marcin.p...@gmail.com
on 15 Dec 2009 at 1:18
GoogleCodeExporter commented
Fixed in release 7.08
Original comment by eugene.k...@gmail.com
on 7 Oct 2010 at 5:45
- Changed state: Fixed