简体   繁体   中英

GWT application fails with IllegalArgumentException in org.objectweb.asm.ClassVisitor

We have a larger GWT application that used to be built with GWT v2.8.0. I am trying to upgrade it to GWT v2.9.0.

Compilation and packaging etc. all works fine, but when I try to start it (via maven using the goal gwt:run ) I get the below error and stacktrace.

Any idea anyone, what is causing this and if and how one can fix this? I am using an AdopOpenJDK v8.0.292.10 (hotspot) as runtime.

[INFO] --- gwt-maven-plugin:2.9.0:run (default-cli) @ myapp-web ---
[INFO] create exploded Jetty webapp in D:\Projects\myapp-web\target\myapp
[INFO] Super Dev Mode starting up
[INFO]    workDir: C:\Users\mms\AppData\Local\Temp\gwt-codeserver-3584342502042631589.tmp
[INFO]    Loading Java files in com.example.myapp.MyApp.
[ERROR] java.lang.IllegalArgumentException
[ERROR]         at org.objectweb.asm.ClassVisitor.<init>(Unknown Source)
[ERROR]         at org.objectweb.asm.ClassVisitor.<init>(Unknown Source)
[ERROR]         at com.google.gwt.dev.javac.BytecodeSignatureMaker$CompileDependencyVisitor.<init>(BytecodeSignatureMaker.java:59)
[ERROR]         at com.google.gwt.dev.javac.BytecodeSignatureMaker.visitCompileDependenciesInBytecode(BytecodeSignatureMaker.java:227)
[ERROR]         at com.google.gwt.dev.javac.BytecodeSignatureMaker.getCompileDependencySignature(BytecodeSignatureMaker.java:209)
[ERROR]         at com.google.gwt.dev.javac.CompiledClass.getSignatureHash(CompiledClass.java:166)
[ERROR]         at com.google.gwt.dev.javac.Dependencies$Ref.<init>(Dependencies.java:41)
[ERROR]         at com.google.gwt.dev.javac.Dependencies$Ref.<init>(Dependencies.java:36)
[ERROR]         at com.google.gwt.dev.javac.Dependencies.resolve(Dependencies.java:100)
[ERROR]         at com.google.gwt.dev.javac.CompilationStateBuilder$CompileMoreLater.compile(CompilationStateBuilder.java:349)
[ERROR]         at com.google.gwt.dev.javac.CompilationStateBuilder.doBuildFrom(CompilationStateBuilder.java:532)
[ERROR]         at com.google.gwt.dev.javac.CompilationStateBuilder.buildFrom(CompilationStateBuilder.java:464)
[ERROR]         at com.google.gwt.dev.cfg.ModuleDef.getCompilationState(ModuleDef.java:423)
[ERROR]         at com.google.gwt.dev.codeserver.Recompiler.initWithoutPrecompile(Recompiler.java:213)
[ERROR]         at com.google.gwt.dev.codeserver.Outbox.maybePrecompile(Outbox.java:89)
[ERROR]         at com.google.gwt.dev.codeserver.Outbox.<init>(Outbox.java:61)
[ERROR]         at com.google.gwt.dev.codeserver.CodeServer.makeOutboxTable(CodeServer.java:192)
[ERROR]         at com.google.gwt.dev.codeserver.CodeServer.start(CodeServer.java:151)
[ERROR]         at com.google.gwt.dev.codeserver.CodeServer.main(CodeServer.java:104)
[ERROR]         at com.google.gwt.dev.codeserver.CodeServer.main(CodeServer.java:55)
[ERROR]         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR]         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[ERROR]         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERROR]         at java.lang.reflect.Method.invoke(Method.java:498)
[ERROR]         at com.google.gwt.dev.shell.SuperDevListener.runCodeServer(SuperDevListener.java:112)
[ERROR]         at com.google.gwt.dev.shell.SuperDevListener.start(SuperDevListener.java:91)
[ERROR]         at com.google.gwt.dev.DevMode.ensureCodeServerListener(DevMode.java:666)
[ERROR]         at com.google.gwt.dev.DevModeBase.doStartup(DevModeBase.java:785)
[ERROR]         at com.google.gwt.dev.DevMode.doStartup(DevMode.java:551)
[ERROR]         at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:888)
[ERROR]         at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:705)
[ERROR]         at com.google.gwt.dev.DevMode.main(DevMode.java:432)

Firstly I would make sure you have deleted any GWT caching files/directories. Look in C:\Users\mms\AppData\Local\Temp\ for any files/folders starting with gwt .

Another possibility is that you have dependencies in your project that are using an older version of the asm.jar library that is incompatible with the GWT compiler.

In more detail, com.google.gwt:gwt-dev:2.9.0 is built against org.ow2.asm:7.1. Check that your project does not have a dependency on ASM that is earlier than 7. (Note that this could be a transitive dependency.)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM