我在这里创建了一个演示项目。
它使用 GWT 编译,Eclipse 没有任何问题。当我在 SuperDevMode 中运行应用程序时,第一次编译失败并出现以下错误:
Compiling 1 permutation
Compiling permutation 0...
[ERROR] An internal compiler exception occurred
com.google.gwt.dev.jjs.InternalCompilerException: Unexpected error during visit.
at com.google.gwt.dev.jjs.ast.JVisitor.translateException(JVisitor.java:121)
at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:140)
at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:132)
at com.google.gwt.dev.jjs.impl.Devirtualizer.getStaticImpl(Devirtualizer.java:562)
at com.google.gwt.dev.jjs.impl.Devirtualizer.access$400(Devirtualizer.java:75)
at com.google.gwt.dev.jjs.impl.Devirtualizer$RewriteVirtualDispatches.ensureDevirtualVersionExists(Devirtualizer.java:184)
at com.google.gwt.dev.jjs.impl.Devirtualizer$RewriteVirtualDispatches.endVisit(Devirtualizer.java:101)
at com.google.gwt.dev.jjs.ast.JMethod.traverse(JMethod.java:580)
at com.google.gwt.dev.jjs.ast.JModVisitor$ListContextImmutable.traverse(JModVisitor.java:183)
at com.google.gwt.dev.jjs.ast.JModVisitor.acceptWithInsertRemoveImmutable(JModVisitor.java:355)
at com.google.gwt.dev.jjs.ast.JInterfaceType.traverse(JInterfaceType.java:75)
at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:380)
at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:292)
at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:284)
at com.google.gwt.dev.jjs.ast.JProgram.visitModuleTypes(JProgram.java:1192)
at com.google.gwt.dev.jjs.ast.JProgram.traverse(JProgram.java:1156)
at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:380)
at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:292)
at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:284)
at com.google.gwt.dev.jjs.impl.Devirtualizer.execImpl(Devirtualizer.java:320)
at com.google.gwt.dev.jjs.impl.Devirtualizer.exec(Devirtualizer.java:218)
at com.google.gwt.dev.jjs.MonolithicJavaToJavaScriptCompiler$MonolithicPermutationCompiler.normalizeSemantics(MonolithicJavaToJavaScriptCompiler.java:95)
at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler$PermutationCompiler.compilePermutation(JavaToJavaScriptCompiler.java:290)
at com.google.gwt.dev.jjs.MonolithicJavaToJavaScriptCompiler.compilePermutation(MonolithicJavaToJavaScriptCompiler.java:296)
at com.google.gwt.dev.jjs.UnifiedAst.compilePermutation(UnifiedAst.java:143)
at com.google.gwt.dev.CompilePerms.compile(CompilePerms.java:197)
at com.google.gwt.dev.ThreadedPermutationWorkerFactory$ThreadedPermutationWorker.compile(ThreadedPermutationWorkerFactory.java:50)
at com.google.gwt.dev.PermutationWorkerFactory$Manager$WorkerThread.run(PermutationWorkerFactory.java:74)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NullPointerException
at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:137)
... 27 more
[ERROR] <no source info>: <source info not available>
[ERROR] at JsonElement.java(19): public abstract JsonElement clear();
com.google.gwt.dev.jjs.ast.JMethod
[ERROR] at JsonElement.java(18): interface JsonElement extends Serializable
com.google.gwt.dev.jjs.ast.JInterfaceType
[ERROR] at Unknown(0): <JProgram>
com.google.gwt.dev.jjs.ast.JProgram
[ERROR] Unrecoverable exception, shutting down
com.google.gwt.core.ext.UnableToCompleteException: (see previous log entries)
at com.google.gwt.dev.javac.CompilationProblemReporter.logAndTranslateException(CompilationProblemReporter.java:106)
at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler$PermutationCompiler.compilePermutation(JavaToJavaScriptCompiler.java:367)
at com.google.gwt.dev.jjs.MonolithicJavaToJavaScriptCompiler.compilePermutation(MonolithicJavaToJavaScriptCompiler.java:296)
at com.google.gwt.dev.jjs.UnifiedAst.compilePermutation(UnifiedAst.java:143)
at com.google.gwt.dev.CompilePerms.compile(CompilePerms.java:197)
at com.google.gwt.dev.ThreadedPermutationWorkerFactory$ThreadedPermutationWorker.compile(ThreadedPermutationWorkerFactory.java:50)
at com.google.gwt.dev.PermutationWorkerFactory$Manager$WorkerThread.run(PermutationWorkerFactory.java:74)
at java.lang.Thread.run(Thread.java:745)
[ERROR] Not all permutation were compiled , completed (0/1)
[WARN] recompile failed
[WARN] continuing to serve previous version
库使用<super-source path="super" />
标签。从我找到的 GWT 文档(http://www.gwtproject.org/doc/latest/DevGuideOrganizingProjects.html)
“在开发模式下,本地 JRE 类总是取代从源代码编译的类。”
这是一个问题,因为我无法在 SuperDevMode 中使用该库。
有没有什么办法解决这一问题?我可以以某种方式省略超级源标签吗?