GWT 2.9.0 无法编译应用程序。

问题描述 投票:1回答:1

我试图将GWT从2.8.2升级到2.9.0,但我的应用程序无法编译。

[INFO] --- gwt-maven-plugin:2.9.0:compile (default) @ some-gwt-project ---
[INFO] Loading inherited module 'com.example.AppEntryPointDev'
[INFO]    Module location: file:/C:/Users/username/IdeaProjects/project/target/project/WEB-INF/classes/com/example/AppEntryPointDev.gwt.xml
[INFO]    Loading inherited module 'com.google.gwt.core.Core'
... skiped other module loading messages
[INFO] Public resources found in...
[INFO] Translatable source found in...
[INFO] Persistent unit cache dir set to: C:\Users\username\IdeaProjects\project\target\gwt-unitCache
[INFO] Opening cache file: C:\Users\username\IdeaProjects\project\target\gwt-unitCache\gwt-unitCache-8c530...
[INFO] Looking for previously cached Compilation Units in C:\Users\username\IdeaProjects\project\target\gwt-unitCache
[INFO] Compiling module com.example.AppEntryPointDev
[INFO] [ERROR] Unexpected internal compiler error
[INFO] java.lang.IllegalArgumentException
[INFO]  at org.objectweb.asm.ClassVisitor.<init>(Unknown Source)
[INFO]  at org.objectweb.asm.ClassVisitor.<init>(Unknown Source)
[INFO]  at com.google.gwt.dev.javac.BytecodeSignatureMaker$CompileDependencyVisitor.<init>(BytecodeSignatureMaker.java:59)
[INFO]  at com.google.gwt.dev.javac.BytecodeSignatureMaker.visitCompileDependenciesInBytecode(BytecodeSignatureMaker.java:227)
[INFO]  at com.google.gwt.dev.javac.BytecodeSignatureMaker.getCompileDependencySignature(BytecodeSignatureMaker.java:209)
[INFO]  at com.google.gwt.dev.javac.CompiledClass.getSignatureHash(CompiledClass.java:166)
[INFO]  at com.google.gwt.dev.javac.Dependencies$Ref.<init>(Dependencies.java:41)
[INFO]  at com.google.gwt.dev.javac.Dependencies$Ref.<init>(Dependencies.java:36)
[INFO]  at com.google.gwt.dev.javac.Dependencies.resolve(Dependencies.java:100)
[INFO]  at com.google.gwt.dev.javac.CompilationStateBuilder$CompileMoreLater.compile(CompilationStateBuilder.java:349)
[INFO]  at com.google.gwt.dev.javac.CompilationStateBuilder.doBuildFrom(CompilationStateBuilder.java:532)
[INFO]  at com.google.gwt.dev.javac.CompilationStateBuilder.buildFrom(CompilationStateBuilder.java:464)
[INFO]  at com.google.gwt.dev.cfg.ModuleDef.getCompilationState(ModuleDef.java:423)
[INFO]  at com.google.gwt.dev.Precompile.precompile(Precompile.java:210)
[INFO]  at com.google.gwt.dev.Precompile.precompile(Precompile.java:190)
[INFO]  at com.google.gwt.dev.Precompile.precompile(Precompile.java:131)
[INFO]  at com.google.gwt.dev.Compiler.compile(Compiler.java:192)
[INFO]  at com.google.gwt.dev.Compiler.compile(Compiler.java:143)
[INFO]  at com.google.gwt.dev.Compiler.compile(Compiler.java:132)
[INFO]  at com.google.gwt.dev.Compiler$1.run(Compiler.java:110)
[INFO]  at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:55)
[INFO]  at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:50)
[INFO]  at com.google.gwt.dev.Compiler.main(Compiler.java:113)

使用v2.8.2的应用程序可以正常编译,我也在使用GXT 4.0.0,restyGWT 2.2.0。我也在使用GXT 4.0.0, restyGWT 2.2.4和mvp4g 1.5.0。

java gwt
1个回答
4
投票

这个错误信息很可怕,但它意味着你有一个旧版本的 asm.jar (org.ow2.asmasm)在你的classpath上,可能是通过项目中的其他依赖关系拉进来的。

GWT2.9编译器需要 asm-7.1.jar 或以后。

© www.soinside.com 2019 - 2024. All rights reserved.