我正在开发一个简单的Web应用程序。我正在使用sencha(gxt)框架向用户显示图表。
当我编译项目时,我遇到了以下错误。
[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 :(得分:3)
威尔姆是对的。缺少模块描述符中的<inherits>
- 标记。
但看起来Ranjeet正在使用GXT 3。
在这种情况下,它应该是:
<inherits name='com.sencha.gxt.ui.GXT'/>
<inherits name='com.sencha.gxt.chart.Chart' />
答案 1 :(得分: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" />