2013-07-17 105 views
1

我正在开发一个简单的Web应用程序。我正在使用sencha(gxt)框架向用户显示图表。编译GWT(Sencha Framework)项目时出错

当我编译项目时,出现以下错误。

[ERROR] Errors in 'file:/E:/eclipse%20Workspace/Chart_Demo/src/com/project/client/Chart_Demo.java' 
     [ERROR] Line 74: No source code is available for type com.sencha.gxt.chart.client.chart.Chart<M>; did you forget to inherit a required module? 

[ERROR] Line 78: No source code is available for type com.sencha.gxt.chart.client.draw.Gradient; did you forget to inherit a required module? 

[ERROR] Line 79: No source code is available for type com.sencha.gxt.chart.client.draw.RGB; did you forget to inherit a required module? 

[ERROR] Line 84: No source code is available for type com.sencha.gxt.chart.client.chart.axis.CategoryAxis<M,V>; did you forget to inherit a required module? 

[ERROR] Line 85: No source code is available for type com.sencha.gxt.chart.client.chart.Chart<M>.Position; did you forget to inherit a required module? 

[ERROR] Line 87: No source code is available for type com.sencha.gxt.chart.client.draw.sprite.TextSprite; did you forget to inherit a required module? 

[ERROR] Line 102: No source code is available for type com.sencha.gxt.chart.client.chart.series.BarSeries<M>; did you forget to inherit a required module? 


[ERROR] Unable to find type 'com.project.client.Chart_Demo' 
     [ERROR] Hint: Previous compiler errors may have made this type unavailable 
     [ERROR] Hint: Check the inheritance chain from your module; it may not be inheriting a required module or a module may not be adding its source path entries properly 
Exception in thread "pool-1-thread-1" java.lang.RuntimeException: Unable to read from byte cache 

请帮我解决这个问题。

回答

0

你需要继承GXT模块的主模块(yourapp.gwt.xml)

<inherits name="com.extjs.gxt.ui.GXT" /> 
<inherits name="com.extjs.gxt.themes.Themes" /> 
<inherits name="com.extjs.gxt.charts.Chart" /> 
2

wilome是正确的。模块描述符中的<inherits>标签缺失。

但它看起来像兰吉特使用GXT 3.

在这种情况下,它schould是:

<inherits name='com.sencha.gxt.ui.GXT'/> 
<inherits name='com.sencha.gxt.chart.Chart' />