Dear GWT-Team,
thank you that you have done a great job in the past. We have a large codebase strongly relying on GWT. However the last release has caused big pain to me:
I have tried to update from version 2.7 to 2.8.2 to get rid of my dirty bugfix hacks for chrome 61 positioning.
But I was not able to upgrade my codebase due to very many problems with dependencies in the current gwt 2.8.2 release.
BTW: I use maven to build our project:
1) gwt-dev has dependencies to different jetty versions and as far as I know, I need gwt-dev for the development mode:
Dependency convergence error for org.eclipse.jetty:jetty-io:9.2.13.v20150730 paths to dependency are:
+-myproject
+-com.google.gwt:gwt-dev:2.8.2
+-net.sourceforge.htmlunit:htmlunit:2.19
+-org.eclipse.jetty.websocket:websocket-client:9.2.13.v20150730
+-org.eclipse.jetty:jetty-io:9.2.13.v20150730
and
+-myproject
+-com.google.gwt:gwt-dev:2.8.2
+-net.sourceforge.htmlunit:htmlunit:2.19
+-org.eclipse.jetty.websocket:websocket-client:9.2.13.v20150730
+-org.eclipse.jetty.websocket:websocket-common:9.2.13.v20150730
+-org.eclipse.jetty:jetty-io:9.2.13.v20150730
and
+-myproject
+-com.google.gwt:gwt-dev:2.8.2
+-org.eclipse.jetty:jetty-webapp:9.2.14.v20151106
+-org.eclipse.jetty:jetty-servlet:9.2.14.v20151106
+-org.eclipse.jetty:jetty-security:9.2.14.v20151106
+-org.eclipse.jetty:jetty-server:9.2.14.v20151106
+-org.eclipse.jetty:jetty-io:9.2.14.v20151106
and
+-myproject
+-com.google.gwt:gwt-dev:2.8.2
+-org.eclipse.jetty:jetty-servlets:9.2.14.v20151106
+-org.eclipse.jetty:jetty-io:9.2.14.v20151106
Dependency convergence error for org.eclipse.jetty:jetty-util:9.2.13.v20150730 paths to dependency are:
+-myproject
+-com.google.gwt:gwt-dev:2.8.2
+-net.sourceforge.htmlunit:htmlunit:2.19
+-org.eclipse.jetty.websocket:websocket-client:9.2.13.v20150730
+-org.eclipse.jetty:jetty-util:9.2.13.v20150730
and
+-myproject
+-com.google.gwt:gwt-dev:2.8.2
+-net.sourceforge.htmlunit:htmlunit:2.19
+-org.eclipse.jetty.websocket:websocket-client:9.2.13.v20150730
+-org.eclipse.jetty.websocket:websocket-common:9.2.13.v20150730
+-org.eclipse.jetty:jetty-util:9.2.13.v20150730
and
+-myproject
+-com.google.gwt:gwt-dev:2.8.2
+-org.eclipse.jetty:jetty-webapp:9.2.14.v20151106
+-org.eclipse.jetty:jetty-xml:9.2.14.v20151106
+-org.eclipse.jetty:jetty-util:9.2.14.v20151106
and
+-myproject
+-com.google.gwt:gwt-dev:2.8.2
+-org.eclipse.jetty:jetty-servlets:9.2.14.v20151106
+-org.eclipse.jetty:jetty-http:9.2.14.v20151106
+-org.eclipse.jetty:jetty-util:9.2.14.v20151106
and
+-myproject
+-com.google.gwt:gwt-dev:2.8.2
+-org.eclipse.jetty:jetty-servlets:9.2.14.v20151106
+-org.eclipse.jetty:jetty-util:9.2.14.v20151106
and
+-myproject
+-com.google.gwt:gwt-dev:2.8.2
+-org.eclipse.jetty:jetty-annotations:9.2.14.v20151106
+-org.eclipse.jetty:jetty-plus:9.2.14.v20151106
+-org.eclipse.jetty:jetty-jndi:9.2.14.v20151106
+-org.eclipse.jetty:jetty-util:9.2.14.v20151106
We do not allow dependencies to different versions of the same library, since it is not possible to have to versions of the same library in the classpath.
So I tried to fix the jetty dependencies to version 9.2.14.v20151106 which is really sort of ugly.
2) Then I tried to build the project.
It said:
Execution default-compile of goal org.apache.maven.plugins:maven-compiler-plugin:3.7.0:compile failed: A required class was missing while executing org.apache.maven.plugins:maven-compiler-plugin:3.7.0:compile: javax/lang/model/element/ModuleElement
[ERROR] -----------------------------------------------------
[ERROR] realm = plugin>org.apache.maven.plugins:maven-compiler-plugin:3.7.0
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/home/joerg/ideaprojects/.m2/repository/org/apache/maven/plugins/maven-compiler-plugin/3.7.0/maven-compiler-plugin-3.7.0.jar
[ERROR] urls[1] = file:/home/joerg/ideaprojects/.m2/repository/org/codehaus/groovy/groovy-eclipse-compiler/2.9.2-03/groovy-eclipse-compiler-2.9.2-03.jar
[ERROR] urls[2] = file:/home/joerg/ideaprojects/.m2/repository/org/apache/xbean/xbean-reflect/3.7/xbean-reflect-3.7.jar
[ERROR] urls[3] = file:/home/joerg/ideaprojects/.m2/repository/com/google/collections/google-collections/1.0/google-collections-1.0.jar
[ERROR] urls[4] = file:/home/joerg/ideaprojects/.m2/repository/org/codehaus/groovy/groovy-eclipse-batch/2.4.13-01/groovy-eclipse-batch-2.4.13-01.jar
[ERROR] urls[5] = file:/home/joerg/ideaprojects/.m2/repository/org/sonatype/sisu/sisu-inject-bean/1.4.2/sisu-inject-bean-1.4.2.jar
[ERROR] urls[6] = file:/home/joerg/ideaprojects/.m2/repository/org/sonatype/sisu/sisu-guice/2.1.7/sisu-guice-2.1.7-noaop.jar
[ERROR] urls[7] = file:/home/joerg/ideaprojects/.m2/repository/org/codehaus/plexus/plexus-utils/2.0.4/plexus-utils-2.0.4.jar
[ERROR] urls[8] = file:/home/joerg/ideaprojects/.m2/repository/org/sonatype/aether/aether-util/1.7/aether-util-1.7.jar
[ERROR] urls[9] = file:/home/joerg/ideaprojects/.m2/repository/org/codehaus/plexus/plexus-interpolation/1.14/plexus-interpolation-1.14.jar
[ERROR] urls[10] = file:/home/joerg/ideaprojects/.m2/repository/org/codehaus/plexus/plexus-component-annotations/1.6/plexus-component-annotations-1.6.jar
[ERROR] urls[11] = file:/home/joerg/ideaprojects/.m2/repository/org/sonatype/plexus/plexus-sec-dispatcher/1.3/plexus-sec-dispatcher-1.3.jar
[ERROR] urls[12] = file:/home/joerg/ideaprojects/.m2/repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar
[ERROR] urls[13] = file:/home/joerg/ideaprojects/.m2/repository/org/apache/maven/shared/maven-shared-utils/3.1.0/maven-shared-utils-3.1.0.jar
[ERROR] urls[14] = file:/home/joerg/ideaprojects/.m2/repository/commons-io/commons-io/2.5/commons-io-2.5.jar
[ERROR] urls[15] = file:/home/joerg/ideaprojects/.m2/repository/org/apache/maven/shared/maven-shared-incremental/1.1/maven-shared-incremental-1.1.jar
[ERROR] urls[16] = file:/home/joerg/ideaprojects/.m2/repository/org/codehaus/plexus/plexus-java/0.9.2/plexus-java-0.9.2.jar
[ERROR] urls[17] = file:/home/joerg/ideaprojects/.m2/repository/org/ow2/asm/asm/6.0_BETA/asm-6.0_BETA.jar
[ERROR] urls[18] = file:/home/joerg/ideaprojects/.m2/repository/com/thoughtworks/qdox/qdox/2.0-M7/qdox-2.0-M7.jar
[ERROR] urls[19] = file:/home/joerg/ideaprojects/.m2/repository/org/codehaus/plexus/plexus-compiler-api/2.8.2/plexus-compiler-api-2.8.2.jar
[ERROR] urls[20] = file:/home/joerg/ideaprojects/.m2/repository/org/codehaus/plexus/plexus-compiler-manager/2.8.2/plexus-compiler-manager-2.8.2.jar
[ERROR] urls[21] = file:/home/joerg/ideaprojects/.m2/repository/org/codehaus/plexus/plexus-compiler-javac/2.8.2/plexus-compiler-javac-2.8.2.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import from realm ClassRealm[maven.api, parent: null]]
[ERROR]
[ERROR] -----------------------------------------------------
[ERROR] : javax.lang.model.element.ModuleElement
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1]
http://cwiki.apache.org/confluence/display/MAVEN/PluginContainerException[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
"javax/lang/model/element/ModuleElement" ??
Then I realized that you had said "GWT can now run on Java 9" in the release notes. You did not say: "GWT-Compiler must now run on Java 9"...
Nether the less I tried to set my JAVA_HOME to jdk 9 and error disappeared. (It caused many other problems to switch to Java 9 but that's a different story).
3) But Jetty 9.4.7 is the first jetty-project with basic java 9 support. So I had to upgrade my jetty-version.
4) Now I had to patch org.eclipse.jetty.server.Request because GWT calls a method getUri which has been renamed to getHttpURI() .
5) Then I had to patch org.eclipse.jetty.webapp.WebAppClassLoader because we have several dependencies probing for the existence of classes by trying to instancate them via reflection, which caused NullPointerExceptions in the Java 9 classloader. I had to catch them in the WebbAppClassLoader and convert them into ClassNotFoundExceptions.
The first GWT-Project has been built successfully and could be run in development mode. I thought: I'm done!
6) But then next project used GIN-Injection. And GIN does not build with Java9 due to SecurityException:
[INFO] [ERROR] Generator 'com.google.gwt.inject.rebind.GinjectorGenerator' threw an exception while rebinding 'myInjector'
[INFO] java.lang.SecurityException: Prohibited package name: java.lang
[INFO] at java.base/java.lang.ClassLoader.preDefineClass(ClassLoader.java:889)
[INFO] at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1005)
[INFO] at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:868)
[INFO] at com.google.gwt.inject.rebind.GinBridgeClassLoader.findClass(GinBridgeClassLoader.java:160)
[INFO] at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:563)
[INFO] at com.google.gwt.inject.rebind.GinBridgeClassLoader.loadClass(GinBridgeClassLoader.java:103)
[INFO] at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:496)
[INFO] at java.base/java.lang.ClassLoader.defineClass1(Native Method)
[INFO] at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1007)
[INFO] at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:868)
[INFO] at com.google.gwt.inject.rebind.GinBridgeClassLoader.findClass(GinBridgeClassLoader.java:160)
[INFO] at com.google.gwt.inject.rebind.GinBridgeClassLoader.loadClass(GinBridgeClassLoader.java:106)
[INFO] at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:496)
[INFO] at java.base/java.lang.ClassLoader.defineClass1(Native Method)
[INFO] at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1007)
[INFO] at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:868)
[INFO] at com.google.gwt.inject.rebind.GinBridgeClassLoader.findClass(GinBridgeClassLoader.java:160)
[INFO] at com.google.gwt.inject.rebind.GinBridgeClassLoader.loadClass(GinBridgeClassLoader.java:106)
[INFO] at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:496)
[INFO] at java.base/java.lang.Class.getDeclaredConstructors0(Native Method)
[INFO] at java.base/java.lang.Class.privateGetDeclaredConstructors(Class.java:3110)
[INFO] at java.base/java.lang.Class.getDeclaredConstructors(Class.java:2314)
[INFO] at com.google.gwt.inject.rebind.resolution.ImplicitBindingCreator.getInjectConstructor(ImplicitBindingCreator.java:270)
[INFO] at com.google.gwt.inject.rebind.resolution.ImplicitBindingCreator.createImplicitBindingForClass(ImplicitBindingCreator.java:146)
[INFO] at com.google.gwt.inject.rebind.resolution.ImplicitBindingCreator.create(ImplicitBindingCreator.java:140)
[INFO] at com.google.gwt.inject.rebind.resolution.DependencyExplorer.visit(DependencyExplorer.java:106)
[INFO] at com.google.gwt.inject.rebind.resolution.DependencyExplorer.explore(DependencyExplorer.java:89)
[INFO] at com.google.gwt.inject.rebind.resolution.BindingResolver.resolveBindings(BindingResolver.java:70)
[INFO] at com.google.gwt.inject.rebind.GinjectorBindings.resolveBindings(GinjectorBindings.java:238)
[INFO] at com.google.gwt.inject.rebind.BindingsProcessor.resolveAllUnresolvedBindings(BindingsProcessor.java:146)
[INFO] at com.google.gwt.inject.rebind.BindingsProcessor.process(BindingsProcessor.java:105)
[INFO] at com.google.gwt.inject.rebind.GinjectorGeneratorImpl.generate(GinjectorGeneratorImpl.java:79)
[INFO] at com.google.gwt.inject.rebind.GinjectorGenerator.generate(GinjectorGenerator.java:74)
[INFO] at com.google.gwt.core.ext.IncrementalGenerator.generateNonIncrementally(IncrementalGenerator.java:40)
[INFO] at com.google.gwt.dev.javac.StandardGeneratorContext.runGeneratorIncrementally(StandardGeneratorContext.java:745)
[INFO] at com.google.gwt.dev.cfg.RuleGenerateWith.realize(RuleGenerateWith.java:103)
[INFO] at com.google.gwt.dev.shell.StandardRebindOracle$Rebinder.rebind(StandardRebindOracle.java:78)
[INFO] at com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:262)
[INFO] at com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:251)
[INFO] at com.google.gwt.dev.PrecompilationContextCreator$1.getAllPossibleRebindAnswers(PrecompilationContextCreator.java:86)
[INFO] at com.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.createStaticRebindExpression(UnifyAst.java:519)
[INFO] at com.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.createRebindExpression(UnifyAst.java:487)
[INFO] at com.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.maybeHandleMagicMethodCall(UnifyAst.java:415)
[INFO] at com.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.visit(UnifyAst.java:402)
[INFO] at com.google.gwt.dev.jjs.ast.JMethodCall.traverse(JMethodCall.java:265)
[INFO] at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
[INFO] at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
[INFO] at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:265)
[INFO] at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:118)
[INFO] at com.google.gwt.dev.jjs.ast.JCastOperation.traverse(JCastOperation.java:76)
[INFO] at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
[INFO] at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
[INFO] at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:265)
[INFO] at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:118)
[INFO] at com.google.gwt.dev.jjs.ast.JDeclarationStatement.traverse(JDeclarationStatement.java:49)
[INFO] at com.google.gwt.dev.jjs.ast.JModVisitor$ListContext.traverse(JModVisitor.java:88)
[INFO] at com.google.gwt.dev.jjs.ast.JModVisitor.acceptWithInsertRemove(JModVisitor.java:331)
[INFO] at com.google.gwt.dev.jjs.ast.JBlock.traverse(JBlock.java:94)
[INFO] at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
[INFO] at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
[INFO] at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:139)
[INFO] at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:135)
[INFO] at com.google.gwt.dev.jjs.ast.JMethodBody.traverse(JMethodBody.java:83)
[INFO] at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
[INFO] at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
[INFO] at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:265)
[INFO] at com.google.gwt.dev.jjs.ast.JMethod.visitChildren(JMethod.java:786)
[INFO] at com.google.gwt.dev.jjs.ast.JMethod.traverse(JMethod.java:778)
[INFO] at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
[INFO] at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
[INFO] at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:265)
[INFO] at com.google.gwt.dev.jjs.impl.UnifyAst.mainLoop(UnifyAst.java:1401)
[INFO] at com.google.gwt.dev.jjs.impl.UnifyAst.exec(UnifyAst.java:896)
[INFO] at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.unifyJavaAst(JavaToJavaScriptCompiler.java:1410)
[INFO] at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.constructJavaAst(JavaToJavaScriptCompiler.java:1222)
[INFO] at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.precompile(JavaToJavaScriptCompiler.java:1140)
[INFO] at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.precompile(JavaToJavaScriptCompiler.java:255)
[INFO] at com.google.gwt.dev.Precompile.precompile(Precompile.java:255)
[INFO] at com.google.gwt.dev.Precompile.precompile(Precompile.java:202)
[INFO] at com.google.gwt.dev.Precompile.precompile(Precompile.java:143)
[INFO] at com.google.gwt.dev.Compiler.compile(Compiler.java:204)
[INFO] at com.google.gwt.dev.Compiler.compile(Compiler.java:155)
[INFO] at com.google.gwt.dev.Compiler.compile(Compiler.java:144)
[INFO] at com.google.gwt.dev.Compiler$1.run(Compiler.java:118)
[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:125)
I'm really upset after several days of work for nothing.
So:
Please publish a release with a bugfix for Chrome 61, that does not force me to upgrade my build to java9!
Please fix your jetty-dependencies!
Please do not mix bugfix releases (Chrome 61) and new feature releases (Java 9) in the future!
Kind regards
Jörg Pfründer