gwtexceptioncompiler-errorscross-domainmvp4g

Error while compiling GWT code with Cross-Site support


In our *EntryPoint.gwt.xml we include the following to get Cross-Site support:

<add-linker name="xs" />

With no changes to the code, we got the following error during compilation:

 [java]    Compile of permutations succeeded
 [java] Linking into ...
 [java]    Invoking Linker Cross-Site
 [java]       [ERROR] The module must not have multiple fragments when using the Cross-Site Linker.
 [java]       [ERROR] Failed to link
 [java] com.google.gwt.core.ext.UnableToCompleteException: (see previous log entries)
 [java]     at com.google.gwt.core.linker.XSLinker.doEmitCompilation(XSLinker.java:49)
 [java]     at com.google.gwt.core.ext.linker.impl.SelectionScriptLinker.link(SelectionScriptLinker.java:108)
 [java]     at com.google.gwt.core.ext.linker.impl.StandardLinkerContext.invokeLink(StandardLinkerContext.java:408)
 [java]     at com.google.gwt.dev.Link.doLink(Link.java:194)
 [java]     at com.google.gwt.dev.Link.link(Link.java:151)
 [java]     at com.google.gwt.dev.Compiler.run(Compiler.java:228)
 [java]     at com.google.gwt.dev.Compiler$1.run(Compiler.java:152)
 [java]     at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:87)
 [java]     at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:81)
 [java]     at com.google.gwt.dev.Compiler.main(Compiler.java:159)
 [java] Java Result: 1

What does it mean? We use mvp4g with multi-modules structure in our project, so there is lazy-loading for them. Does "mutiple fragments" mean that there are several .cache.html files as a result?

There is an issue 14 in GWT but no-one has any answers to it.


Solution

  • There is also an issue 5046 in GWT, and someone says that Code Splitting (used in Mvp4g Multi-Modules) with XS Linker works with GWT 2.1.1, but there is no time to update library for our project now, we plan to do it a little later. Anyway, it is an answer - update your GWT library or turn off Code-Splitting or don't use XS.

    Upd. Yes, we've updated GWT to 2.1.1 and *-xs.nocache.js works fine.