Strange exception (IncompatibleClassChangeError) as super dev mod starts

3,559 views
Skip to first unread message

Francois ANDRE

unread,
Nov 19, 2014, 11:27:55 AM11/19/14
to google-we...@googlegroups.com
Hi all,

I'm migrating all my GWT apps to 2.7.0.
For one of these i've got this strange exception appearing quickly:

java.lang.IncompatibleClassChangeError: class com.google.gwt.dev.javac.BytecodeSignatureMaker$CompileDependencyVisitor has interface org.objectweb.asm.ClassVisitor as super class
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:792)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at com.google.gwt.dev.javac.BytecodeSignatureMaker.visitCompileDependenciesInBytecode(BytecodeSignatureMaker.java:227)
at com.google.gwt.dev.javac.BytecodeSignatureMaker.getCompileDependencySignature(BytecodeSignatureMaker.java:209)
at com.google.gwt.dev.javac.CompiledClass.getSignatureHash(CompiledClass.java:166)
at com.google.gwt.dev.javac.Dependencies$Ref.<init>(Dependencies.java:42)
at com.google.gwt.dev.javac.Dependencies$Ref.<init>(Dependencies.java:37)
at com.google.gwt.dev.javac.Dependencies.resolve(Dependencies.java:114)
at com.google.gwt.dev.javac.CompilationStateBuilder$CompileMoreLater.compile(CompilationStateBuilder.java:366)
at com.google.gwt.dev.javac.CompilationStateBuilder.doBuildFrom(CompilationStateBuilder.java:580)
at com.google.gwt.dev.javac.CompilationStateBuilder.buildFrom(CompilationStateBuilder.java:513)
at com.google.gwt.dev.javac.CompilationStateBuilder.buildFrom(CompilationStateBuilder.java:499)
at com.google.gwt.dev.cfg.ModuleDef.getCompilationState(ModuleDef.java:668)
at com.google.gwt.dev.codeserver.Recompiler.initWithoutPrecompile(Recompiler.java:198)
at com.google.gwt.dev.codeserver.Outbox.maybePrecompile(Outbox.java:82)
at com.google.gwt.dev.codeserver.Outbox.<init>(Outbox.java:61)
at com.google.gwt.dev.codeserver.CodeServer.makeOutboxes(CodeServer.java:156)
at com.google.gwt.dev.codeserver.CodeServer.start(CodeServer.java:118)
at com.google.gwt.dev.codeserver.CodeServer.main(CodeServer.java:91)
at com.google.gwt.dev.codeserver.CodeServer.main(CodeServer.java:50)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.google.gwt.dev.shell.SuperDevListener$1.run(SuperDevListener.java:82)

I've tried to clean everything possible (old generated files, jars ...), the exception is still there.

Has anybody experienced the same issue and found the answer ?

Thanks

François

Jens

unread,
Nov 19, 2014, 11:45:44 AM11/19/14
to google-we...@googlegroups.com
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.

Francois ANDRE

unread,
Nov 19, 2014, 4:38:59 PM11/19/14
to google-we...@googlegroups.com
Hi Jens,

Thank you so much.
It was exactly that !
Moreover, I've got to admit that I don't think I'd have ever found this out by myself.

Thank you again.

François 

2014-11-19 17:45 GMT+01:00 Jens <jens.ne...@gmail.com>:
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 a topic in the Google Groups "Google Web Toolkit" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-web-toolkit/_zaQy_Rh67c/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-web-tool...@googlegroups.com.
To post to this group, send email to google-we...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.



--
-------------------------
François ANDRE

maticpetek

unread,
Apr 3, 2015, 7:25:37 AM4/3/15
to google-we...@googlegroups.com
+1 for Jens. I was just try to update my project on GWT 2.8 snapshots and I got the some error.
Regards,
  Matic

zahi.h...@gmail.com

unread,
May 28, 2015, 9:11:23 AM5/28/15
to google-we...@googlegroups.com
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 ).

 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:

Thomas Broyer

unread,
May 28, 2015, 9:35:16 AM5/28/15
to google-we...@googlegroups.com, zahi.h...@gmail.com


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)

Hezouat Zahir

unread,
May 28, 2015, 9:56:13 AM5/28/15
to google-we...@googlegroups.com, zahi.h...@gmail.com

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.

Hezouat Zahir

unread,
May 28, 2015, 10:05:41 AM5/28/15
to google-we...@googlegroups.com, zahi.h...@gmail.com
Hello Thomas,

I have often this issue : java.lang.IncompatibleClassChangeError: class com.google.gwt.dev.javac.asm.CollectMethodData has interface org.objectweb.asm.MethodVisitor as super class . I have a conflict in my classPath..

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

Thomas Broyer

unread,
May 28, 2015, 10:46:32 AM5/28/15
to google-we...@googlegroups.com, zahi.h...@gmail.com


On Thursday, May 28, 2015 at 3:56:13 PM UTC+2, Hezouat Zahir wrote:

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.

“…or just don't put jetty-annotations on the classpath for GWT! (are you really using jetty-annotations in client-side code‽)”

Hezouat Zahir

unread,
May 28, 2015, 10:58:59 AM5/28/15
to google-we...@googlegroups.com, zahi.h...@gmail.com
Ok I removed jetty-annotations  (No we don't use jettty -annotations in client-side). But now, i get this exception " java.lang.IllegalArgumentException: Object of class 'com.fircosoft.cdb.server.JettyPlusLauncher.WebAppContextWithReload' is not of type 'org.eclipse.jetty.webapp.WebAppContext'. Object Class and type Class are from different loaders. "

Thomas Broyer

unread,
May 28, 2015, 11:43:33 AM5/28/15
to google-we...@googlegroups.com, zahi.h...@gmail.com


On Thursday, May 28, 2015 at 4:58:59 PM UTC+2, Hezouat Zahir wrote:
Ok I removed jetty-annotations  (No we don't use jettty -annotations in client-side). But now, i get this exception " java.lang.IllegalArgumentException: Object of class 'com.fircosoft.cdb.server.JettyPlusLauncher.WebAppContextWithReload' is not of type 'org.eclipse.jetty.webapp.WebAppContext'. Object Class and type Class are from different loaders. "

Oh, are you using DevMode with a custom ServletLauncher?
I'm afraid this is not going to work. Try launching your Jetty server separately and launching SuperDevMode through the CodeServer.

Hezouat Zahir

unread,
May 29, 2015, 4:27:31 AM5/29/15
to google-we...@googlegroups.com, zahi.h...@gmail.com

Thanks but I tried to launch my jetty separately but I got this issue again :
java.lang.IllegalArgumentException: Object of class 'org.eclipse.jetty.webapp.WebAppContext' is not of type 'org.eclipse.jetty.webapp.WebAppContext'. Object Class and type Class are from different loaders.

Thank you for your help ,

Thomas Broyer

unread,
May 29, 2015, 4:39:16 AM5/29/15
to google-we...@googlegroups.com, zahi.h...@gmail.com


On Friday, May 29, 2015 at 10:27:31 AM UTC+2, Hezouat Zahir wrote:

Thanks but I tried to launch my jetty separately but I got this issue again :
java.lang.IllegalArgumentException: Object of class 'org.eclipse.jetty.webapp.WebAppContext' is not of type 'org.eclipse.jetty.webapp.WebAppContext'. Object Class and type Class are from different loaders.


But now it's a Jetty-related issue, not a GWT-related one ;-)
(hint: make sure you don't have Jetty JARs –except for the few that you might really need– in your WEB-INF/lib)

Hezouat Zahir

unread,
May 29, 2015, 7:10:05 AM5/29/15
to google-we...@googlegroups.com, zahi.h...@gmail.com

I would like to known whether I can launch GWT using GWT plugin of eclipse.. because it  doesn't work too..

Hezouat Zahir

unread,
Jun 1, 2015, 8:04:55 AM6/1/15
to google-we...@googlegroups.com
Hello,

Do you know whether GWT plugin works with GWT 2.7 and jetty 8 in superdev mode ?

Could you help me for that, please ?

Zahir,
Reply all
Reply to author
Forward
0 new messages