java - com.google.gwt.dev.jjs.InternalCompilerException : Unexpected error during visit

标签 java gwt gwt-rpc gwt2

我在使用 2.6.0 版编译 gwt 应用程序时出现以下错误, 最初我用具有 gwt ver 2.6.1 的 maven 编译它,然后尝试通过具有 2.6.0 版的 eclipse 编译它。跟版本兼容有关系吗??

com.google.gwt.dev.jjs.InternalCompilerException: Unexpected error during visit.
    at com.google.gwt.dev.jjs.ast.JVisitor.translateException(JVisitor.java:110)
    at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:276)
    at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:265)
    at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:117)
    at com.google.gwt.dev.jjs.ast.JCastOperation.traverse(JCastOperation.java:65)
    at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
    at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
    at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:265)
    at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:117)
    at com.google.gwt.dev.jjs.ast.JDeclarationStatement.traverse(JDeclarationStatement.java:48)
    at com.google.gwt.dev.jjs.ast.JModVisitor$ListContextImmutable.traverse(JModVisitor.java:170)
    at com.google.gwt.dev.jjs.ast.JModVisitor.acceptWithInsertRemoveImmutable(JModVisitor.java:336)
    at com.google.gwt.dev.jjs.ast.JBlock.traverse(JBlock.java:83)
    at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
    at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
    at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:138)
    at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:134)
    at com.google.gwt.dev.jjs.ast.JMethodBody.traverse(JMethodBody.java:82)
    at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
    at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
    at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:265)
    at com.google.gwt.dev.jjs.ast.JMethod.visitChildren(JMethod.java:449)
    at com.google.gwt.dev.jjs.ast.JMethod.traverse(JMethod.java:418)
    at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
    at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
    at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:265)
    at com.google.gwt.dev.jjs.impl.UnifyAst.mainLoop(UnifyAst.java:940)
    at com.google.gwt.dev.jjs.impl.UnifyAst.exec(UnifyAst.java:665)
    at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.precompile(JavaToJavaScriptCompiler.java:672)
    at com.google.gwt.dev.jjs.JavaScriptCompiler.precompile(JavaScriptCompiler.java:34)
    at com.google.gwt.dev.Precompile.precompile(Precompile.java:271)
    at com.google.gwt.dev.Precompile.precompile(Precompile.java:223)
    at com.google.gwt.dev.Precompile.precompile(Precompile.java:139)
    at com.google.gwt.dev.Compiler.run(Compiler.java:167)
    at com.google.gwt.dev.Compiler.run(Compiler.java:132)
    at com.google.gwt.dev.Compiler$1.run(Compiler.java:99)
    at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:55)
    at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:50)
    at com.google.gwt.dev.Compiler.main(Compiler.java:106)
Caused by: java.lang.AbstractMethodError: org.apache.xerces.dom.ElementNSImpl.setUserData(Ljava/lang/String;Ljava/lang/Object;Lorg/w3c/dom/UserDataHandler;)Ljava/lang/Object;
    at com.google.gwt.uibinder.rebind.W3cDocumentBuilder.startElement(W3cDocumentBuilder.java:127)
    at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
    at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source)
    at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
    at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
    at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
    at javax.xml.parsers.SAXParser.parse(Unknown Source)
    at com.google.gwt.uibinder.rebind.W3cDomHelper.documentFor(W3cDomHelper.java:74)
    at com.google.gwt.uibinder.rebind.UiBinderGenerator.getW3cDoc(UiBinderGenerator.java:204)
    at com.google.gwt.uibinder.rebind.UiBinderGenerator.generateOnce(UiBinderGenerator.java:174)
    at com.google.gwt.uibinder.rebind.UiBinderGenerator.generate(UiBinderGenerator.java:129)
    at com.google.gwt.core.ext.IncrementalGenerator.generateNonIncrementally(IncrementalGenerator.java:40)
    at com.google.gwt.dev.javac.StandardGeneratorContext.runGeneratorIncrementally(StandardGeneratorContext.java:676)
    at com.google.gwt.dev.cfg.RuleGenerateWith.realize(RuleGenerateWith.java:41)
    at com.google.gwt.dev.shell.StandardRebindOracle$Rebinder.rebind(StandardRebindOracle.java:79)
    at com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:276)
    at com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:265)
    at com.google.gwt.dev.DistillerRebindPermutationOracle.getAllPossibleRebindAnswers(DistillerRebindPermutationOracle.java:91)
    at com.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.handleGwtCreate(UnifyAst.java:387)
    at com.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.handleMagicMethodCall(UnifyAst.java:465)
    at com.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.endVisit(UnifyAst.java:255)
    at com.google.gwt.dev.jjs.ast.JMethodCall.traverse(JMethodCall.java:244)
    at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
    at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
    ... 37 more
      [ERROR] at NativeHorizontalScrollbar.java(87): GWT.create(NativeHorizontalScrollbar$NativeHorizontalScrollbarUiBinder.class)
         com.google.gwt.dev.jjs.ast.JMethodCall
      [ERROR] at NativeHorizontalScrollbar.java(87): (NativeHorizontalScrollbar$NativeHorizontalScrollbarUiBinder) GWT.create(NativeHorizontalScrollbar$NativeHorizontalScrollbarUiBinder.class)
         com.google.gwt.dev.jjs.ast.JCastOperation
      [ERROR] at NativeHorizontalScrollbar.java(87): static NativeHorizontalScrollbar$NativeHorizontalScrollbarUiBinder uiBinder = (NativeHorizontalScrollbar$NativeHorizontalScrollbarUiBinder) GWT.create(NativeHorizontalScrollbar$NativeHorizontalScrollbarUiBinder.class)
         com.google.gwt.dev.jjs.ast.JDeclarationStatement
      [ERROR] at NativeHorizontalScrollbar.java(31): {
  AbstractNativeScrollbar.$clinit();
  static NativeHorizontalScrollbar$NativeHorizontalScrollbarUiBinder uiBinder = (NativeHorizontalScrollbar$NativeHorizontalScrollbarUiBinder) GWT.create(NativeHorizontalScrollbar$NativeHorizontalScrollbarUiBinder.class);
}
         com.google.gwt.dev.jjs.ast.JBlock
      [ERROR] at NativeHorizontalScrollbar.java(31): {
  AbstractNativeScrollbar.$clinit();
  static NativeHorizontalScrollbar$NativeHorizontalScrollbarUiBinder uiBinder = (NativeHorizontalScrollbar$NativeHorizontalScrollbarUiBinder) GWT.create(NativeHorizontalScrollbar$NativeHorizontalScrollbarUiBinder.class);
}

com.google.gwt.dev.jjs.ast.JMethodBody [错误] 在 NativeHorizo​​ntalScrollbar.java(31): private static final void $clinit();

 com.google.gwt.dev.jjs.ast.JMethod

最佳答案

我自己发现,如果您要升级到新版本,我们需要清除 gwt-Unitcache

关于java - com.google.gwt.dev.jjs.InternalCompilerException : Unexpected error during visit,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25401779/

相关文章:

java - 锁获取时的内存可见性

java - 使用 objectInputStream 读取时出现 EOFException

xml - GWT 和 Sencha GXT : FormPanel result fails

gwt - Java GWT remoteLoggingServlet - 我可以配置 java.util.Logging 以将其发送到日志文件吗?

现有 Java EE 应用程序中的 GWT 集成

java - 如何在 GWT 中使用文件发送 HashMap

java - 在使用 Cucumber 和 JUnit 时,如何截取屏幕截图并将其附加到 Allure 报告中?

java - 当前正在使用 eclipse,无法退出 Debug模式

java - GWT JUnit 测试 - 是否可以忽略同源策略

java - 如何在打印时应用 CSS 样式?