google-code-export / gwt-test-utils

Automatically exported from code.google.com/p/gwt-test-utils
1 stars 0 forks source link

NSME: ModuleDefLoader.createSyntheticModule() with GWT 2.6.0-rc1 #179

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. upgrade GWT to 2.6.rc-1
2. used with latest version of gwt-test-utils: gwt-test-utils-0.45.jar
3. Tests failing with NSME-Exception:

FAILURE initializationError: 
com.google.gwt.dev.cfg.ModuleDefLoader.createSyntheticModule(Lcom/google/gwt/cor
e/ext/TreeLogger;Ljava/lang/String;[Ljava/lang/String;Z)Lcom/google/gwt/dev/cfg/
ModuleDef;
java.lang.NoSuchMethodError: 
com.google.gwt.dev.cfg.ModuleDefLoader.createSyntheticModule(Lcom/google/gwt/cor
e/ext/TreeLogger;Ljava/lang/String;[Ljava/lang/String;Z)Lcom/google/gwt/dev/cfg/
ModuleDef;
    at com.googlecode.gwt.test.internal.GwtFactory.createModuleDef(GwtFactory.java:158)
    at com.googlecode.gwt.test.internal.GwtFactory.<init>(GwtFactory.java:105)
    at com.googlecode.gwt.test.internal.GwtFactory.initializeIfNeeded(GwtFactory.java:45)
    at com.googlecode.gwt.test.internal.junit.AbstractGwtRunner.<init>(AbstractGwtRunner.java:30)
    at com.googlecode.gwt.test.GwtRunner.<init>(GwtRunner.java:19)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
    at org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:29)
    at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:21)
    at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
    at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:26)
    at org.junit.runner.Computer.getRunner(Computer.java:40)
    at org.junit.runner.Computer$1.runnerForClass(Computer.java:31)
    at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
    at org.junit.runners.model.RunnerBuilder.runners(RunnerBuilder.java:101)
    at org.junit.runners.model.RunnerBuilder.runners(RunnerBuilder.java:87)
    at org.junit.runners.Suite.<init>(Suite.java:80)
    at org.junit.runner.Computer.getSuite(Computer.java:28)
    at com.facebook.buck.junit.JUnitRunner.run(JUnitRunner.java:88)
    at com.facebook.buck.junit.JUnitRunner.main(JUnitRunner.java:250)

Please provide any additional information below.

The build is failing both with Buck and from Eclipse

Original issue reported on code.google.com by David.Os...@gmail.com on 19 Jan 2014 at 4:28

GoogleCodeExporter commented 9 years ago
In final 2.6 (same error). 

Original comment by matej.cr...@gmail.com on 3 Feb 2014 at 6:40

GoogleCodeExporter commented 9 years ago
Upgrading the GWT version to 2.6.0 in pom.xml produces dozen of compile error, 
among others this one:

 [ERROR] /home/davido/projects/gwt-test-utils/gwt-test-utils/src/main/java/com/googlecode/gwt/test/internal/GwtFactory.java:[151,22] error: method getCompilationState in class ModuleDef cannot be applied to given types;
 [ERROR] required: TreeLogger,CompilerContext
 [ERROR] found: TreeLogger
 [ERROR] reason: actual and formal argument lists differ in length

The method defined as:

   /**
   * Creates a module in memory that is not associated with a
   * <code>.gwt.xml</code> file on disk.
   *
   * @param logger logs the process
   * @param compilerContext shared read only compiler state
   * @param moduleName the synthetic module to create
   * @param inherits a set of modules to inherit from
   * @param refresh whether to refresh the module
   * @return the loaded module
   * @throws UnableToCompleteException
   */
  public static ModuleDef createSyntheticModule(TreeLogger logger,
      CompilerContext compilerContext, String moduleName, final String[] inherits, boolean refresh)
      throws UnableToCompleteException

and called as:

  private ModuleDef createModuleDef(ConfigurationLoader configurationLoader) {
      try {
         List<String> gwtModules = configurationLoader.getGwtModules();
         String[] inherits = gwtModules.toArray(new String[gwtModules.size()]);
         return ModuleDefLoader.createSyntheticModule(GwtTreeLogger.get(),
                  "com.googlecode.gwt.test.Aggregator", inherits, false);
      } catch (UnableToCompleteException e) {
         throw new GwtTestConfigurationException(
                  "Error while creating global ModuleDef for module' :", e);
      }
   }

So the compilerContext parameters is missing.

Original comment by David.Os...@gmail.com on 24 Feb 2014 at 8:45

GoogleCodeExporter commented 9 years ago
Hi,

A 0.47-SNAPSHOT compatible with GWT 2.6.0 is already available on Sonatype OSS 
repository.

The 0.47 version will be released on Maven Central soon. See here : 
https://github.com/gwt-test-utils/gwt-test-utils/issues/62

Original comment by gael.laz...@gmail.com on 25 Feb 2014 at 3:10

GoogleCodeExporter commented 9 years ago

Original comment by gael.laz...@gmail.com on 25 Feb 2014 at 3:10