Thursday, May 28, 2015

Re: Strange exception (IncompatibleClassChangeError) as super dev mod starts


We are using jetty-annotations because we use spring framework . Moreover, we have chosen jetty 8.1.12.v20130726 and not jetty 9 and so we should change version of jetty.

On Thursday, May 28, 2015 at 3:35:16 PM UTC+2, Thomas Broyer wrote:


On Thursday, May 28, 2015 at 3:11:23 PM UTC+2, Hezouat Zahir wrote:
Hello all,

We migrated to GWT 2.7 and we are facing to this issue (I know that it's a problem with asm version but jetty-annotations has a dependency to asm 3.1 ).

Jetty-annotations was updated to ASM 4 in Jetty 9.1 and ASM 5 in Jetty 9.2; so update to one of these versions (ASM 5 is backwards-compatible with ASM 4).
…or just don't put jetty-annotations on the classpath for GWT! (are you really using jetty-annotations in client-side code‽)

ASM was quite clear that they didn't provide backwards-compatibility prior to version 4, so users of ASM should all have name ASM classes into their own package (and this is what GWT was doing up until –and including– 2.6.1). Unfortunately, many libraries didn't do it and just depended on the ASM artifacts deployed in Maven Central (under the "asm" groupId). And Jetty went one step farther and chose to deploy them under their own coordinates at org.eclipse.jetty.orbit:org.objectweb.asm.
ASM 4+ now guarantees backwards compatibility, so it's now safe to depend on the "official" artifacts without the need to repackage.
In Maven at least, both GWT and Jetty have now updated to use those "official" and backward-compatible artifacts, so it should be OK.

(note that GWT isn't always clean wrt dependencies; it still bundles Eclipse JDT without repackaging it for instance; that being said, chances that you use JDT in GWT generators or linkers or otherwise client-related code is very low; so fine-tune your classpath and all should be OK)
 
 java.lang.IncompatibleClassChangeError: class com.google.gwt.dev.javac.BytecodeSignatureMaker$CompileDependencyVisitor has interface org.objectweb.asm.ClassVisitor as super class
[ERROR]     at java.lang.ClassLoader.defineClass1(Native Method)
[ERROR]     at java.lang.ClassLoader.defineClass(Unknown Source)
[ERROR]     at java.security.SecureClassLoader.defineClass(Unknown Source)
[ERROR]     at java.net.URLClassLoader.defineClass(Unknown Source)
[ERROR]     at java.net.URLClassLoader.access$100(Unknown Source)
[ERROR]     at java.net.URLClassLoader$1.run(Unknown Source)
[ERROR]     at java.net.URLClassLoader$1.run(Unknown Source)
[ERROR]     at java.security.AccessController.doPrivileged(Native Method)
[ERROR]     at java.net.URLClassLoader.findClass(Unknown Source)
[ERROR]     at java.lang.ClassLoader.loadClass(Unknown Source)
[ERROR]     at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
[ERROR]     at java.lang.ClassLoader.loadClass(Unknown Source)
[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:42)
[ERROR]     at com.google.gwt.dev.javac.Dependencies$Ref.<init>(Dependencies.java:37)
[ERROR]     at com.google.gwt.dev.javac.Dependencies.resolve(Dependencies.java:114)
[ERROR]     at com.google.gwt.dev.javac.CompilationStateBuilder$CompileMoreLater.compile(CompilationStateBuilder.java:366)
[ERROR]     at com.google.gwt.dev.javac.CompilationStateBuilder.doBuildFrom(CompilationStateBuilder.java:580)
[ERROR]     at com.google.gwt.dev.javac.CompilationStateBuilder.buildFrom(CompilationStateBuilder.java:513)
[ERROR]     at com.google.gwt.dev.javac.CompilationStateBuilder.buildFrom(CompilationStateBuilder.java:499)
[ERROR]     at com.google.gwt.dev.cfg.ModuleDef.getCompilationState(ModuleDef.java:668)
[ERROR]     at com.google.gwt.dev.codeserver.Recompiler.initWithoutPrecompile(Recompiler.java:200)
[ERROR]     at com.google.gwt.dev.codeserver.Outbox.maybePrecompile(Outbox.java:82)
[ERROR]     at com.google.gwt.dev.codeserver.Outbox.<init>(Outbox.java:61)
[ERROR]     at com.google.gwt.dev.codeserver.CodeServer.makeOutboxes(CodeServer.java:156)
[ERROR]     at com.google.gwt.dev.codeserver.CodeServer.start(CodeServer.java:118)
[ERROR]     at com.google.gwt.dev.codeserver.CodeServer.main(CodeServer.java:91)
[ERROR]     at com.google.gwt.dev.codeserver.CodeServer.main(CodeServer.java:50)
[ERROR]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR]     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
[ERROR]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
[ERROR]     at java.lang.reflect.Method.invoke(Unknown Source)
[ERROR]     at com.google.gwt.dev.shell.SuperDevListener$1.run(SuperDevListener.java:84)


Could you help me, pls ?

Best regards,


On Wednesday, November 19, 2014 at 5:45:44 PM UTC+1, Jens wrote:
GWT 2.7. requires ASM 5.x (because of Java8 support in the future) and you probably have ASM 3.x on class path as well.

-- J.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment