I'm new to Highcharts and fairly new to GWT. I'm getting the below stacktrace when attempting to add a Moxie/Highcharts Chart to my GWT app. The app deploys and runs fine if I don't add the chart. I've gotten the below error regardless of whether I add the Chart to a SimplePanel programmatically (using @UiField for the SimplePanel) or include it directly in my ViewImpl.ui.xml and declare a @UiFactory method for the Chart (which is shown below). Configuration follows.
Caused by: com.google.gwt.core.client.JavaScriptException: (TypeError): undefined is not a function
at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:248)
at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:561)
at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:269)
at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
at org.moxieapps.gwt.highcharts.client.BaseChart.nativeRenderChart(BaseChart.java)
at org.moxieapps.gwt.highcharts.client.BaseChart.onLoad(BaseChart.java:1963)
at com.google.gwt.user.client.ui.Widget.onAttach(Widget.java:350)
at com.google.gwt.user.client.ui.AttachDetachException$1.execute(AttachDetachException.java:34)
at com.google.gwt.user.client.ui.AttachDetachException.tryCommand(AttachDetachException.java:74)
at com.google.gwt.user.client.ui.Panel.doAttachChildren(Panel.java:170)
at com.google.gwt.user.client.ui.Widget.onAttach(Widget.java:345)
at com.google.gwt.user.client.ui.AttachDetachException$1.execute(AttachDetachException.java:34)
at com.google.gwt.user.client.ui.AttachDetachException.tryCommand(AttachDetachException.java:74)
at com.google.gwt.user.client.ui.Panel.doAttachChildren(Panel.java:170)
at com.google.gwt.user.client.ui.Widget.onAttach(Widget.java:345)
at com.google.gwt.user.client.ui.AttachDetachException$1.execute(AttachDetachException.java:34)
at com.google.gwt.user.client.ui.AttachDetachException.tryCommand(AttachDetachException.java:74)
at com.google.gwt.user.client.ui.Panel.doAttachChildren(Panel.java:170)
at com.google.gwt.user.client.ui.Widget.onAttach(Widget.java:345)
at com.google.gwt.user.client.ui.Widget.setParent(Widget.java:475)
at com.google.gwt.user.client.ui.Panel.adopt(Panel.java:127)
at com.google.gwt.user.client.ui.ComplexPanel.add(ComplexPanel.java:97)
at com.google.gwt.user.client.ui.AbsolutePanel.add(AbsolutePanel.java:97)
at com.google.gwt.user.client.ui.Panel.add(Panel.java:71)
at mycorp.miser.client.MiserEntryPoint.onModuleLoad(MiserEntryPoint.java:30)
ViewImpl.java excerpt (This is intended to be a pie chart in the future... but is just the demo example chart for now):
publicclassViewImplimplementsIsWidget,View{interfaceBinderextendsUiBinder<Panel,ViewImpl>{}...//InstantiatedwithaUIFactorymethod,belowChartusagePie;...@UiFactorypublicChartgetUsagePie(){//UsagePiechartChartpie=newChart().setType(Series.Type.SPLINE).setChartTitleText("Lawn Tunnels").setMarginRight(10);Seriesseries=pie.createSeries().setName("Moles per Yard").setPoints(newNumber[]{163,203,276,408,547,729,628});pie.addSeries(series);returnpie;}...
My Module html (excerpt). The highstock.js file is resolvable in my deployment container as http://127.0.0.1:8888/js/highstock.js (devmode) and localhost:8080/js/highstock.js (jetty), and the complete highstock distribution has been copied into my /js directory (but not in addition to highcharts, according to the instructions on the Moxie installation page).
The contents of my war/WEB-INF/lib. The moxie jar is included on my classpath using the following ant directive: fileset dir="${war.dir}/WEB-INF/lib" includes="*/.jar" << multiple asterisks not showing up in forum... but are correct in the ant script...
I'm new to Highcharts and fairly new to GWT. I'm getting the below stacktrace when attempting to add a Moxie/Highcharts Chart to my GWT app. The app deploys and runs fine if I don't add the chart. I've gotten the below error regardless of whether I add the Chart to a SimplePanel programmatically (using @UiField for the SimplePanel) or include it directly in my ViewImpl.ui.xml and declare a @UiFactory method for the Chart (which is shown below). Configuration follows.
Miser.gwt.xml excerpt:
ViewImpl.ui.xml excerpt. Chart included below using "m:Chart"
ViewImpl.java excerpt (This is intended to be a pie chart in the future... but is just the demo example chart for now):
My Module html (excerpt). The highstock.js file is resolvable in my deployment container as http://127.0.0.1:8888/js/highstock.js (devmode) and localhost:8080/js/highstock.js (jetty), and the complete highstock distribution has been copied into my /js directory (but not in addition to highcharts, according to the instructions on the Moxie installation page).
The contents of my war/WEB-INF/lib. The moxie jar is included on my classpath using the following ant directive: fileset dir="${war.dir}/WEB-INF/lib" includes="*/.jar" << multiple asterisks not showing up in forum... but are correct in the ant script...
Thanks in advance for any insight! Regards ~Dan
Last edit: Dan Goemans 2012-03-27
The above stacktrace was from Chrome. When I test the same build in Firefox 7, I get a slightly different exception message: