sch17 / truetrade

Automatically exported from code.google.com/p/truetrade
0 stars 0 forks source link

Error when saving initial preferences #26

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
 Lucas said...

    I followed the instructions then hit apply - didn't really register,
but when I hit ok it said there was an error. Both the instruments and
strategies panel say: Unable to create view: An unexpected exception was
thrown. as it said before editing the JDBC lines- I think this is the
errlog below.

    !ENTRY org.eclipse.jface 4 0 2007-05-03 21:47:05.033
    !MESSAGE java.lang.NumberFormatException: empty String
    !STACK 0
    java.lang.NumberFormatException: empty String
    at sun.misc.FloatingDecimal.readJavaFormatString(Unknown Source)
    at java.lang.Double.parseDouble(Unknown Source)
    at
com.ats.client.preferences.BacktestOrderPage.performOk(BacktestOrderPage.java:14
4)
    at
org.eclipse.jface.preference.PreferenceDialog$11.run(PreferenceDialog.java:889)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
    at org.eclipse.core.runtime.Platform.run(Platform.java:843)
    at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:44)
    at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:149)
    at
org.eclipse.jface.preference.PreferenceDialog.okPressed(PreferenceDialog.java:86
9)
    at
org.eclipse.jface.preference.PreferenceDialog.buttonPressed(PreferenceDialog.jav
a:230)
    at org.eclipse.jface.dialogs.Dialog$3.widgetSelected(Dialog.java:660)
    at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:90)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3348)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2968)
    at org.eclipse.jface.window.Window.runEventLoop(Window.java:820)
    at org.eclipse.jface.window.Window.open(Window.java:796)
    at
com.ats.client.actions.OpenPreferencesAction.run(OpenPreferencesAction.java:50)
    at org.eclipse.jface.action.Action.runWithEvent(Action.java:499)
    at
org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionCont
ributionItem.java:539)
    at
org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.
java:488)
    at
org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContribution
Item.java:400)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3348)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2968)
    at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1914)
    at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878)
    at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:419)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
    at com.ats.client.ATSApp.run(ATSApp.java:18)
    at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java
:78)
    at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(Ecli
pseAppLauncher.java:92)
    at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLau
ncher.java:68)
    at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
    at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336)
    at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
    at org.eclipse.core.launcher.Main.run(Main.java:977)
    at org.eclipse.core.launcher.Main.main(Main.java:952) 

Original issue reported on code.google.com by tyrotra...@gmail.com on 4 May 2007 at 2:06

GoogleCodeExporter commented 8 years ago
I tried a reboot of the entire computer and then restarted the program, same 
issue. 
I placed the root password for the MYSQL - but am not sure about the user name-
perhaps I have set-up the SQL initiation wrong- I know i have the databases 
set-up
right though

Original comment by lydonsac...@gmail.com on 5 May 2007 at 1:43

GoogleCodeExporter commented 8 years ago
Is there anything else in your log file?  I fixed the problem which resulted in 
the
errors you're seeing, but this shouldn't be causing anything more than an 
irritation.
 It shouldn't prevent saving your properties file.

First, can you attach the ats.properties file?  It should be in the TrueTrade
directory if you're running the build image, or in your eclipse program 
directory if
you're running it from source.

Next, try pasting this into your ats.properties file:
-----------
#Wed May 02 14:34:05 PDT 2007
commission.perorder=true
interactivebrokers.port=7499
database.url=jdbc\:mysql\://localhost/ats?enable-named-pipe&socketFactory\=com.m
ysql.jdbc.NamedPipeSocketFactory
slippage.tick.value=1.0
slippage.tick=true
database.use_default=false
interactivebrokers.client_id=19
database.jdbc_provider=com.mysql.jdbc.Driver
commission.perorder.value=4.25
commission.pershare=false
slippage.percent=false
interactivebrokers.host=127.0.0.1
--------

Finally, I made changes to the com.ats.model project and the com.ats.client 
project.
 Can you synch with the repository and get any changes then run again?  It should
eliminate the problem with the logs and it will use MySQL by default instead of
Derby, so if you have MySQL setup, it should work without error.

Let me know.

Original comment by tyrotra...@gmail.com on 5 May 2007 at 5:11