GWT EXT仅在图表中例外

时间:2014-07-05 13:45:19

标签: javascript gwt extjs charts gwt-ext

我正在尝试使用GWT-EXT展示中的折线图展示代码创建图表(图表),如http://www.gwt-ext.com/demo-charts/#lineChart 但是在浏览器中遇到以下错误:

onModuleLoad() threw an exception
Exception while loading module com.client.LineChartSample. See Development Mode for details.

java.lang.reflect.InvocationTargetException
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 com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:411)
at com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:200)
at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:526)
at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
at java.lang.Thread.run(Unknown Source)
Caused by: com.google.gwt.core.client.JavaScriptException: (TypeError) @com.gwtext.client.widgets.chart.yui.NumericAxis::create()([]): '$wnd.YAHOO.widget' is null or not an object
at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:249)
at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:576)
at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:284)
at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
at com.gwtext.client.widgets.chart.yui.NumericAxis.create(NumericAxis.java)
at com.gwtext.client.widgets.chart.yui.Axis.<init>(Axis.java:37)
at com.gwtext.client.widgets.chart.yui.NumericAxis.<init>(NumericAxis.java:33)
at com.client.LineChartSample.onModuleLoad(LineChartSample.java:66)
... 9 more

Eclipse IDE [ERROR] [linechartsample] - Failed to load module 'linechartsample' from user agent 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.153 Safari/537.36' at 127.0.0.1:54415的开发模式中出现以下错误 我已经尝试过从展示中运行的简单形式,按钮等的其他展示代码,没有任何问题。可能的原因是什么?

1 个答案:

答案 0 :(得分:0)

得到答案..我没有继承一个重要的模块...... 添加行后,相同的代码开始工作:

<inherits name="com.gwtext.Charts" />

到gwt.xml文件...... 其余的都保持不变。