如果我从Eclipse调试该应用程序,但是当我尝试编译时,我得到了这个:
Compiling module org.uk.xxx.web.stuff
Validating newly compiled units
[WARN] Warnings in 'jar:file:/C:/javacvs/gwt-incubator-20101117-r1766.jar!/com/google/gwt/widgetideas/client/impl/GlassPanelImpl.java'
[WARN] Line 30: Referencing deprecated class 'com.google.gwt.user.client.impl.DocumentRootImpl'
[WARN] Line 38: Referencing deprecated class 'com.google.gwt.user.client.impl.DocumentRootImpl'
[WARN] Warnings in 'jar:file:/C:/javacvs/gwt-incubator-20101117-r1766.jar!/com/google/gwt/widgetideas/table/client/FixedWidthGridBulkRenderer.java'
[WARN] Line 122: Referencing deprecated class 'com.google.gwt.widgetideas.table.client.overrides.HTMLTable'
[WARN] Warnings in 'jar:file:/C:/javacvs/gwt-incubator-20101117-r1766.jar!/com/google/gwt/widgetideas/table/client/GridBulkRenderer.java'
[WARN] Line 102: Referencing deprecated class 'com.google.gwt.widgetideas.table.client.overrides.HTMLTable'
[WARN] Line 103: Referencing deprecated class 'com.google.gwt.widgetideas.table.client.overrides.Grid'
[WARN] Line 104: Referencing deprecated class 'com.google.gwt.widgetideas.table.client.overrides.Grid'
[WARN] Line 104: Referencing deprecated class 'com.google.gwt.widgetideas.table.client.overrides.HTMLTable'
[WARN] Warnings in 'jar:file:/C:/javacvs/gwt-incubator-20101117-r1766.jar!/com/google/gwt/widgetideas/table/client/TableBulkRenderer.java'
[WARN] Line 404: Referencing deprecated class 'com.google.gwt.widgetideas.table.client.overrides.HTMLTable'
[ERROR] Errors in 'jar:file:/C:/javacvs/gwt-incubator-20101117-r1766.jar!/com/google/gwt/gen2/widgetbase/client/Gen2CssInjector.java'
[ERROR] Internal compiler error
java.lang.IncompatibleClassChangeError: Found interface com.google.gwt.core.ext.typeinfo.JClassType, but class was expected
at com.google.gwt.libideas.resources.rebind.context.AbstractResourceBundleGenerator.generate(AbstractResourceBundleGenerator.java:142)
at com.google.gwt.core.ext.GeneratorExtWrapper.generate(GeneratorExtWrapper.java:48)
at com.google.gwt.core.ext.GeneratorExtWrapper.generateIncrementally(GeneratorExtWrapper.java:60)
at com.google.gwt.dev.javac.StandardGeneratorContext.runGeneratorIncrementally(StandardGeneratorContext.java:662)
at com.google.gwt.dev.cfg.RuleGenerateWith.realize(RuleGenerateWith.java:41)
at com.google.gwt.dev.shell.StandardRebindOracle$Rebinder.rebind(StandardRebindOracle.java:74)
at com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:259)
at com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:248)
at com.google.gwt.dev.DistillerRebindPermutationOracle.getAllPossibleRebindAnswers(DistillerRebindPermutationOracle.java:91)
at com.google.gwt.dev.jdt.WebModeCompilerFrontEnd.doFindAdditionalTypesUsingRebinds(WebModeCompilerFrontEnd.java:106)
at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox$CompilerImpl.process(AbstractCompiler.java:254)
at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:444)
at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox$CompilerImpl.compile(AbstractCompiler.java:175)
at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox$CompilerImpl.compile(AbstractCompiler.java:288)
at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox$CompilerImpl.access$400(AbstractCompiler.java:145)
at com.google.gwt.dev.jdt.AbstractCompiler.compile(AbstractCompiler.java:632)
at com.google.gwt.dev.jdt.BasicWebModeCompiler.getCompilationUnitDeclarations(BasicWebModeCompiler.java:124)
at com.google.gwt.dev.jdt.WebModeCompilerFrontEnd.getCompilationUnitDeclarations(WebModeCompilerFrontEnd.java:54)
at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.precompile(JavaToJavaScriptCompiler.java:517)
at com.google.gwt.dev.jjs.JavaScriptCompiler.precompile(JavaScriptCompiler.java:35)
at com.google.gwt.dev.Precompile.precompile(Precompile.java:541)
at com.google.gwt.dev.Precompile.precompile(Precompile.java:495)
at com.google.gwt.dev.Precompile.precompile(Precompile.java:407)
at com.google.gwt.dev.Compiler.run(Compiler.java:215)
at com.google.gwt.dev.Compiler.run(Compiler.java:187)
at com.google.gwt.dev.Compiler$1.run(Compiler.java:159)
at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:87)
at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:81)
at com.google.gwt.dev.Compiler.main(Compiler.java:166)
[ERROR] Unexpected
java.lang.IncompatibleClassChangeError: Found interface com.google.gwt.core.ext.typeinfo.JClassType, but class was expected
at com.google.gwt.libideas.resources.rebind.context.AbstractResourceBundleGenerator.generate(AbstractResourceBundleGenerator.java:142)
at com.google.gwt.core.ext.GeneratorExtWrapper.generate(GeneratorExtWrapper.java:48)
at com.google.gwt.core.ext.GeneratorExtWrapper.generateIncrementally(GeneratorExtWrapper.java:60)
at com.google.gwt.dev.javac.StandardGeneratorContext.runGeneratorIncrementally(StandardGeneratorContext.java:662)
at com.google.gwt.dev.cfg.RuleGenerateWith.realize(RuleGenerateWith.java:41)
at com.google.gwt.dev.shell.StandardRebindOracle$Rebinder.rebind(StandardRebindOracle.java:74)
at com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:259)
at com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:248)
at com.google.gwt.dev.DistillerRebindPermutationOracle.getAllPossibleRebindAnswers(DistillerRebindPermutationOracle.java:91)
at com.google.gwt.dev.jdt.WebModeCompilerFrontEnd.doFindAdditionalTypesUsingRebinds(WebModeCompilerFrontEnd.java:106)
at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox$CompilerImpl.process(AbstractCompiler.java:254)
at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:444)
at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox$CompilerImpl.compile(AbstractCompiler.java:175)
at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox$CompilerImpl.compile(AbstractCompiler.java:288)
at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox$CompilerImpl.access$400(AbstractCompiler.java:145)
at com.google.gwt.dev.jdt.AbstractCompiler.compile(AbstractCompiler.java:632)
at com.google.gwt.dev.jdt.BasicWebModeCompiler.getCompilationUnitDeclarations(BasicWebModeCompiler.java:124)
at com.google.gwt.dev.jdt.WebModeCompilerFrontEnd.getCompilationUnitDeclarations(WebModeCompilerFrontEnd.java:54)
at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.precompile(JavaToJavaScriptCompiler.java:517)
at com.google.gwt.dev.jjs.JavaScriptCompiler.precompile(JavaScriptCompiler.java:35)
at com.google.gwt.dev.Precompile.precompile(Precompile.java:541)
at com.google.gwt.dev.Precompile.precompile(Precompile.java:495)
at com.google.gwt.dev.Precompile.precompile(Precompile.java:407)
at com.google.gwt.dev.Compiler.run(Compiler.java:215)
at com.google.gwt.dev.Compiler.run(Compiler.java:187)
at com.google.gwt.dev.Compiler$1.run(Compiler.java:159)
at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:87)
at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:81)
at com.google.gwt.dev.Compiler.main(Compiler.java:166)
任何帮助都没问题。
答案 0 :(得分:2)
这是一个GWT 2.2问题,com.google.gwt.core.ext.typeinfo
包中的类被转换为接口,这会导致项目中使用这些类的jar文件出现此错误。
解决方案是获取库的更新版本,或检查源代码并构建库,或者如果两个选项都不可用,您可以修改jar中的字节码,如本站所述:http://grack.com/blog/2011/03/03/gwt-2-2-and-java-lang-incompatibleclasschangeerror/
答案 1 :(得分:0)