When compiling the project, I get this obscure Exception
Looking for precompiled archives. To disable, use -Dgwt.usearchives=false
Loading archived module: jar:
In my case I had to remove the asm 3.1 from my classpath and there are few jars which has internal dependency on asm 3.1. Which i had to exclude from the dependency in my pom. example:
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-jaxws</artifactId>
<version>2.7.18</version>
<exclusions>
<exclusion> <!-- exclude version 3 of asm -->
<groupId>asm</groupId>
<artifactId>asm</artifactId>
</exclusion>
</exclusions>
</dependency>
There were other jars which has such internal dependency, use maven dependency tree to identify. and exclude asm dependency.
Note: you can even upgrade these jars to higher versions which in fact support higher versions of ASM(>4.0), which should be fine with GWT 2.7 or 2.8
This happened to me when I had gwt-servlet.jar
on my classpath during the compilation. If using maven, mark (set the scope) the dependency of gwt-servlet.jar
as provided
In my case I had to exclude an asm artefact coming from a hibernate validator library so you should be fine excluding any asm artefact in your maven configs for your gwt module.
Please try it again after removing all the generated stub and re-compiling the project again.
I have highlighted all the stubs that needs to be deleted as shown in below snapshot.
Here is the list of folders (name can vary based on your GWT project compilation module name) that need to be removed.
In my project, a modular GWT application, I had to add a dependency to gwt-dev into the module that started the whole app.
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-dev</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>asm</groupId>
<artifactId>asm</artifactId>
<version>4.0</version>
</dependency>
I migrated the asm version to 4.0 and the issue got solved