gwtproject / gwt

GWT Open Source Project
http://www.gwtproject.org
1.49k stars 370 forks source link

Migration of GWT from 1.5.3 to 2.4.0 error in GWT compilations #7626

Closed dankurka closed 9 years ago

dankurka commented 9 years ago

Originally reported on Google Code with ID 7629


Found in GWT Release (e.g. 2.4.0, 2.5.0 RC):
2.4.0

Encountered on OS / Browser (e.g. WinXP, IE8-9, FF7):

Windows7

Detailed description (please be as specific as possible):
Hi,

We have migrating project from was6/Java 5 to was8/java6 in RAD IDE.
previous versions of GWT user n servlet was 1.5.3 now we using 2.4.0.
through maven pom.xml attached FYR.

While compiling web module through cmd using command mvn clean build, it uses gwt compiler
which is throughing below errors.

Please provide solution for it..

Error

[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building EMS Store :: Web
[INFO]    task-segment: [clean, install]
[INFO] ------------------------------------------------------------------------
[INFO] [clean:clean]
[INFO] Deleting directory C:\Documents and Settings\Pravin_Suryawanshi\Desktop\Store-Exp\store-web\target
[INFO] [message:generate-messages {execution: default}]
[INFO] Generating Message class com.ahold.ems.store.server.Errors
[INFO] checking maven compile source roots
[INFO] adding generated source folder (destdir) C:\Documents and Settings\Pravin_Suryawanshi\Desktop\Store-Exp\store-web\target\generated-sources\messages
to maven compile source root
[INFO] Generating Message class com.ahold.ems.store.server.Messages
[INFO] checking maven compile source roots
[INFO] generated source folder already added to maven compile source roots
[INFO] [gwt:i18n {execution: gwt-i18n}]
[INFO] establishing classpath list (buildClaspathList - scope = COMPILE)
[INFO] google.webtoolkit.home (gwtHome) *not* set, using project POM for GWT dependencies
[INFO] [dependency:unpack {execution: unpack}]
[INFO] Configured Artifact: com.google.gwt:gwt-dev:windows-libs:2.4.0:zip
[INFO] Configured Artifact: com.ahold.ems:gwt-ext:?:jar
[INFO] Unpacking C:\Documents and Settings\Pravin_Suryawanshi\.m2\repository\com\google\gwt\gwt-dev\2.4.0\gwt-dev-2.4.0-windows-libs.zipto
 C:\Documents and Settings\Pravin_Suryawanshi\.m2\repository\com\google\gwt\gwt-dev\2.4.0
with Includes null and excludes:null
[INFO] Unpacking C:\Documents and Settings\Pravin_Suryawanshi\.m2\repository\com\ahold\ems\gwt-ext\2.0.6\gwt-ext-2.0.6.jarto
 C:\Documents and Settings\Pravin_Suryawanshi\Desktop\Store-Exp\store-web\target\dependency
with Includes **/public/*,**/public/**/* and excludes:null
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:compile]
[INFO] Compiling 125 source files to C:\Documents and Settings\Pravin_Suryawanshi\Desktop\Store-Exp\store-web\target\classes
[INFO] [gwt:compile {execution: gwt-compile}]
[INFO] establishing classpath list (buildClaspathList - scope = COMPILE)
[INFO] google.webtoolkit.home (gwtHome) *not* set, using project POM for GWT dependencies
Compiling module com.ahold.ems.store.StoreModule
   Validating newly compiled units
      Ignored 74 units with compilation errors in first pass.
Compile with -strict or with -logLevel set to TRACE or DEBUG to see all errors.
   Finding entry point classes
      [ERROR] Errors in 'jar:file:/C:/Documents%20and%20Settings/Pravin_Suryawanshi/.m2/repository/com/extjs/gxt/1.2.1/gxt-1.2.1.jar!/com/extjs/gxt/ui/client/widget/Component.java'
         [ERROR] Line 1203: Cannot reduce the visibility of the inherited method from
Widget
      [ERROR] Errors in 'jar:file:/C:/Documents%20and%20Settings/Pravin_Suryawanshi/.m2/repository/com/extjs/gxt/1.2.1/gxt-1.2.1.jar!/com/extjs/gxt/ui/client/util/BaseEventPreview.java'
         [ERROR] Line 86: Referencing field 'com.google.gwt.user.client.DOM.sEventPreviewStack':
unable to resolve field
      [ERROR] Errors in 'jar:file:/C:/Documents%20and%20Settings/Pravin_Suryawanshi/.m2/repository/com/google/gwt/gwt-user/2.4.0/gwt-user-2.4.0.jar!/com/google/gwt/emul/java/util/Vector.java'
         [ERROR] Line 119: The type Enumeration is not generic; it cannot be parameterized
with arguments <E>
      [ERROR] Unable to find type 'com.ahold.ems.store.client.StoreModule'
         [ERROR] Hint: Previous compiler errors may have made this type unavailable
         [ERROR] Hint: Check the inheritance chain from your module; it may not be
inheriting a required module or a module may not be adding its source path entries
properly
Compiling module com.ahold.ems.store.StoreClusterModule
   Validating newly compiled units
      Ignored 74 units with compilation errors in first pass.
Compile with -strict or with -logLevel set to TRACE or DEBUG to see all errors.
   Computing all possible rebind results for 'com.google.gwt.user.client.DocumentModeAsserter'
      Rebinding com.google.gwt.user.client.DocumentModeAsserter
         Checking rule <generate-with class='com.google.gwt.editor.rebind.SimpleBeanEditorDriverGenerator'/>
            [WARN] Detected warnings related to 'com.google.gwt.editor.client.SimpleBeanEditorDriver'.
  Are validation-api-<version>.jar and validation-api-<version>-sources.jar on the
classpath?
            Specify -logLevel DEBUG to see all errors.
            [WARN] Unknown type 'com.google.gwt.editor.client.SimpleBeanEditorDriver'
specified in deferred binding rule
   [ERROR] Errors in 'jar:file:/C:/Documents%20and%20Settings/Pravin_Suryawanshi/.m2/repository/com/extjs/gxt/1.2.1/gxt-1.2.1.jar!/com/extjs/gxt/ui/client/widget/Component.java'
      [ERROR] Line 1203:  Cannot reduce the visibility of the inherited method from
Widget
   [ERROR] Errors in 'jar:file:/C:/Documents%20and%20Settings/Pravin_Suryawanshi/.m2/repository/com/google/gwt/gwt-user/2.4.0/gwt-user-2.4.0.jar!/com/google/gwt/emul/java/util/Collections.java'
      [ERROR] Line 800:  The type Enumeration is not generic; it cannot be parameterized
with arguments <T>
      [ERROR] Line 802:  The type Enumeration is not generic; it cannot be parameterized
with arguments <T>
      [ERROR] Line 830:  The type Enumeration is not generic; it cannot be parameterized
with arguments <T>
      [ERROR] Line 831:  T cannot be resolved to a type
      [ERROR] Line 831:  T cannot be resolved to a type
   [ERROR] Errors in 'jar:file:/C:/Documents%20and%20Settings/Pravin_Suryawanshi/.m2/repository/com/extjs/gxt/1.2.1/gxt-1.2.1.jar!/com/extjs/gxt/ui/client/widget/grid/GridView.java'
      [ERROR]  Internal compiler error
java.lang.IncompatibleClassChangeError: com/google/gwt/core/ext/typeinfo/JClassType.getOverridableMethods()[Lcom/google/gwt/core/ext/typeinfo/JMethod;
    at com.extjs.gxt.ui.rebind.core.TemplatesGenerator$SourceGenerator.validateType(TemplatesGenerator.java:142)
    at com.extjs.gxt.ui.rebind.core.TemplatesGenerator$SourceGenerator.generate(TemplatesGenerator.java:97)
    at com.extjs.gxt.ui.rebind.core.TemplatesGenerator.generate(TemplatesGenerator.java:56)
    at com.google.gwt.core.ext.GeneratorExtWrapper.generate(GeneratorExtWrapper.java:48)
    at com.google.gwt.core.ext.GeneratorExtWrapper.generateIncrementally(GeneratorExtWrapper.java:60)
    at com.google.gwt.dev.javac.StandardGeneratorContext.runGeneratorIncrementally(StandardGeneratorContext.java:647)
    at com.google.gwt.dev.cfg.RuleGenerateWith.realize(RuleGenerateWith.java:41)
    at com.google.gwt.dev.shell.StandardRebindOracle$Rebinder.rebind(StandardRebindOracle.java:78)
    at com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:268)
    at com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:257)
    at com.google.gwt.dev.DistillerRebindPermutationOracle.getAllPossibleRebindAnswers(DistillerRebindPermutationOracle.java:91)
    at com.google.gwt.dev.jdt.WebModeCompilerFrontEnd.doFindAdditionalTypesUsingRebinds(WebModeCompilerFrontEnd.java:96)
    at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox$CompilerImpl.process(AbstractCompiler.java:254)
    at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:444)
    at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox$CompilerImpl.compile(AbstractCompiler.java:173)
    at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox$CompilerImpl.compile(AbstractCompiler.java:288)
    at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox$CompilerImpl.access$400(AbstractCompiler.java:139)
    at com.google.gwt.dev.jdt.AbstractCompiler.compile(AbstractCompiler.java:588)
    at com.google.gwt.dev.jdt.BasicWebModeCompiler.getCompilationUnitDeclarations(BasicWebModeCompiler.java:97)
    at com.google.gwt.dev.jdt.WebModeCompilerFrontEnd.getCompilationUnitDeclarations(WebModeCompilerFrontEnd.java:52)
    at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.precompile(JavaToJavaScriptCompiler.java:569)
    at com.google.gwt.dev.jjs.JavaScriptCompiler.precompile(JavaScriptCompiler.java:33)
    at com.google.gwt.dev.Precompile.precompile(Precompile.java:284)
    at com.google.gwt.dev.Precompile.precompile(Precompile.java:233)
    at com.google.gwt.dev.Precompile.precompile(Precompile.java:145)
    at com.google.gwt.dev.GWTCompiler.run(GWTCompiler.java:198)
    at com.google.gwt.dev.GWTCompiler.run(GWTCompiler.java:168)
    at com.google.gwt.dev.GWTCompiler$1.run(GWTCompiler.java:135)
    at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:88)
    at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:82)
    at com.google.gwt.dev.GWTCompiler.main(GWTCompiler.java:142)

   [ERROR] Unexpected internal compiler error
java.lang.IncompatibleClassChangeError: com/google/gwt/core/ext/typeinfo/JClassType.getOverridableMethods()[Lcom/google/gwt/core/ext/typeinfo/JMethod;
    at com.extjs.gxt.ui.rebind.core.TemplatesGenerator$SourceGenerator.validateType(TemplatesGenerator.java:142)
    at com.extjs.gxt.ui.rebind.core.TemplatesGenerator$SourceGenerator.generate(TemplatesGenerator.java:97)
    at com.extjs.gxt.ui.rebind.core.TemplatesGenerator.generate(TemplatesGenerator.java:56)
    at com.google.gwt.core.ext.GeneratorExtWrapper.generate(GeneratorExtWrapper.java:48)
    at com.google.gwt.core.ext.GeneratorExtWrapper.generateIncrementally(GeneratorExtWrapper.java:60)
    at com.google.gwt.dev.javac.StandardGeneratorContext.runGeneratorIncrementally(StandardGeneratorContext.java:647)
    at com.google.gwt.dev.cfg.RuleGenerateWith.realize(RuleGenerateWith.java:41)
    at com.google.gwt.dev.shell.StandardRebindOracle$Rebinder.rebind(StandardRebindOracle.java:78)
    at com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:268)
    at com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:257)
    at com.google.gwt.dev.DistillerRebindPermutationOracle.getAllPossibleRebindAnswers(DistillerRebindPermutationOracle.java:91)
    at com.google.gwt.dev.jdt.WebModeCompilerFrontEnd.doFindAdditionalTypesUsingRebinds(WebModeCompilerFrontEnd.java:96)
    at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox$CompilerImpl.process(AbstractCompiler.java:254)
    at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:444)
    at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox$CompilerImpl.compile(AbstractCompiler.java:173)
    at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox$CompilerImpl.compile(AbstractCompiler.java:288)
    at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox$CompilerImpl.access$400(AbstractCompiler.java:139)
    at com.google.gwt.dev.jdt.AbstractCompiler.compile(AbstractCompiler.java:588)
    at com.google.gwt.dev.jdt.BasicWebModeCompiler.getCompilationUnitDeclarations(BasicWebModeCompiler.java:97)
    at com.google.gwt.dev.jdt.WebModeCompilerFrontEnd.getCompilationUnitDeclarations(WebModeCompilerFrontEnd.java:52)
    at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.precompile(JavaToJavaScriptCompiler.java:569)
    at com.google.gwt.dev.jjs.JavaScriptCompiler.precompile(JavaScriptCompiler.java:33)
    at com.google.gwt.dev.Precompile.precompile(Precompile.java:284)
    at com.google.gwt.dev.Precompile.precompile(Precompile.java:233)
    at com.google.gwt.dev.Precompile.precompile(Precompile.java:145)
    at com.google.gwt.dev.GWTCompiler.run(GWTCompiler.java:198)
    at com.google.gwt.dev.GWTCompiler.run(GWTCompiler.java:168)
    at com.google.gwt.dev.GWTCompiler$1.run(GWTCompiler.java:135)
    at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:88)
    at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:82)
    at com.google.gwt.dev.GWTCompiler.main(GWTCompiler.java:142)
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Exception attempting to run script - compile.cmd

Embedded error: compile.cmd script exited abnormally with code - 1
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3 minutes 49 seconds
[INFO] Finished at: Wed Aug 29 18:17:57 GMT+05:30 2012
[INFO] Final Memory: 61M/101M
[INFO] ------------------------------------------------------------------------

Workaround if you have one:

Reported by pravin.suryawanshi03 on 2012-08-29 13:17:28


dankurka commented 9 years ago
Some errors (including the fatal one) come from the GXT version being too old and incompatible
with GWT 2.4 (there was a change in GWT 2.2, that broke binary compatibility, so 3rd-party
generators have to be compiled against GWT 2.2+)

You might also want to update your gwt-maven-plugin version.

The Enumeration / generics errors look highly suspicious. Please comment back if you
still experience them after updating GXT and gwt-maven-plugin.

Reported by t.broyer on 2012-08-29 14:47:01