1

我正在开发一个简单的 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

请帮我解决这个问题。

4

2 回答 2

3

威洛姆是对的。模块描述符中的<inherits>-tags 缺失。

但看起来 Ranjeet 正在使用 GXT 3。

在这种情况下,它应该是:

<inherits name='com.sencha.gxt.ui.GXT'/>
<inherits name='com.sencha.gxt.chart.Chart' />
于 2013-07-23T13:00:26.980 回答
0

您需要在主模块 (yourapp.gwt.xml) 中继承 GXT 模块

<inherits name="com.extjs.gxt.ui.GXT" />
<inherits name="com.extjs.gxt.themes.Themes" />
<inherits name="com.extjs.gxt.charts.Chart" />
于 2013-07-19T09:19:29.627 回答