将GWT 2.6迁移到GWT 2.7

时间:2015-11-17 16:35:57

标签: gwt

您好,我在将GWT 2.6迁移到2.7时遇到问题。 我下载了GWT 2.7 SDK并将其从构建路径添加到项目中的Web工具包中。 但在编译时我面临以下错误。

[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.JModVisitor.accept(JModVisitor.java:296)
        at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:285)
        at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:128)
        at com.google.gwt.dev.jjs.ast.JCastOperation.traverse(JCastOperation.java:67)
        at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:381)
        at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:293)
        at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:285)
        at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:128)
        at com.google.gwt.dev.jjs.ast.JDeclarationStatement.traverse(JDeclarationStatement.java:49)
        at com.google.gwt.dev.jjs.ast.JModVisitor$ListContext.traverse(JModVisitor.java:95)
        at com.google.gwt.dev.jjs.ast.JModVisitor.acceptWithInsertRemove(JModVisitor.java:351)
        at com.google.gwt.dev.jjs.ast.JBlock.traverse(JBlock.java:92)
        at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:381)
        at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:293)
        at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:149)
        at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:145)
        at com.google.gwt.dev.jjs.ast.JMethodBody.traverse(JMethodBody.java:83)
        at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:381)
        at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:293)
        at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:285)
        at com.google.gwt.dev.jjs.ast.JMethod.visitChildren(JMethod.java:600)
        at com.google.gwt.dev.jjs.ast.JMethod.traverse(JMethod.java:569)
        at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:381)
        at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:293)
        at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:285)
        at com.google.gwt.dev.jjs.impl.UnifyAst.mainLoop(UnifyAst.java:1505)
        at com.google.gwt.dev.jjs.impl.UnifyAst.exec(UnifyAst.java:870)
        at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler$Precompiler.unifyJavaAst(JavaToJavaScriptCompiler.java:1305)
        at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler$Precompiler.constructJavaAst(JavaToJavaScriptCompiler.java:1038)
        at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler$Precompiler.precompile(JavaToJavaScriptCompiler.java:954)
        at com.google.gwt.dev.jjs.MonolithicJavaToJavaScriptCompiler.precompile(MonolithicJavaToJavaScriptCompiler.java:303)
        at com.google.gwt.dev.jjs.JavaScriptCompiler.precompile(JavaScriptCompiler.java:38)
        at com.google.gwt.dev.Precompile.precompile(Precompile.java:286)
        at com.google.gwt.dev.Precompile.precompile(Precompile.java:229)
        at com.google.gwt.dev.Precompile.precompile(Precompile.java:145)
        at com.google.gwt.dev.Compiler.run(Compiler.java:206)
        at com.google.gwt.dev.Compiler.run(Compiler.java:158)
        at com.google.gwt.dev.Compiler$1.run(Compiler.java:120)
        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:127)
    Caused by: java.lang.NoSuchMethodError: com.google.gwt.user.rebind.rpc.SerializableTypeOracleBuilder.<init>(Lcom/google/gwt/core/ext/TreeLogger;Lcom/google/gwt/core/ext/PropertyOracle;Lcom/google/gwt/core/ext/GeneratorContext;)V
        at org.atmosphere.gwt20.rebind.SerializerGenerator.generateIncrementally(SerializerGenerator.java:88)
        at com.google.gwt.dev.javac.StandardGeneratorContext.runGeneratorIncrementally(StandardGeneratorContext.java:754)
        at com.google.gwt.dev.cfg.RuleGenerateWith.realize(RuleGenerateWith.java:160)
        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:87)
        at com.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.createStaticRebindExpression(UnifyAst.java:485)
        at com.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.createRebindExpression(UnifyAst.java:443)
        at com.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.handleMagicMethodCall(UnifyAst.java:576)
        at com.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.endVisit(UnifyAst.java:306)
        at com.google.gwt.dev.jjs.ast.JMethodCall.traverse(JMethodCall.java:248)
        at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:381)
        at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:293)
        ... 40 more
          [ERROR] at MainEntryPoint.java(122): GWT.create(RPCSerializer.class)
             com.google.gwt.dev.jjs.ast.JMethodCall
          [ERROR] at MainEntryPoint.java(122): (RPCSerializer) GWT.create(RPCSerializer.class)
             com.google.gwt.dev.jjs.ast.JCastOperation
          [ERROR] at MainEntryPoint.java(122): RPCSerializer rpc_serializer = (RPCSerializer) GWT.create(RPCSerializer.class)
             com.google.gwt.dev.jjs.ast.JDeclarationStatement
          [ERROR] at MainEntryPoint.java(121): {
      RPCSerializer rpc_serializer = (RPCSerializer) GWT.create(RPCSerializer.class);
      MainEntryPoint.logger.info(GWT.getModuleBaseURL()); **/

1 个答案:

答案 0 :(得分:1)

似乎问题是org.atmosphere.gwt20.rebind.SerializerGenerator,一个不属于GWT的生成器,似乎是针对旧版本的GWT编译的。它需要针对GWT 2.7重新编译才能工作。