GWT 2.12.0 with net.ltgt.gwt.maven gwt maven plugin: [ERROR] Unable to find 'com/medhok/mm/OEV.gwt.xml' on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source?

171 views
Skip to first unread message

Venkateswara Rao

unread,
Nov 11, 2024, 12:49:42 PM (7 days ago) Nov 11
to GWT Users
Hello,

Currently I am migration my gwt application from 2.11.0 to 2.12.0 with .  During this migration we are getting the following error:
[ERROR] Unable to find 'com/medhok/mm/OEV.gwt.xml' on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source?
Any leads on this error.

However, as part of the following article https://tbroyer.github.io/gwt-maven-plugin/ I have moved my src to src/main/java.

Still I am getting the above error.

Appreciate your help.

Thanks,
Venkat.

Frank Hossfeld

unread,
Nov 11, 2024, 4:01:23 PM (7 days ago) Nov 11
to GWT Users
Have you tried to move your OEV.gwt.xml  into the main folder and rename it to: module.gwt.xml? 

Venkateswara Rao

unread,
Nov 11, 2024, 4:05:19 PM (7 days ago) Nov 11
to GWT Users
I have moved to src/main/java. Didn't rename.

Venkateswara Rao

unread,
Nov 11, 2024, 4:12:47 PM (7 days ago) Nov 11
to GWT Users

Thanks Frank to look into this.  Following is the entry in my pom.xml:

<plugin>

<groupId>net.ltgt.gwt.maven</groupId>

<artifactId>gwt-maven-plugin</artifactId>

<version>1.1.0</version>

<executions>

<execution>

<goals>

<goal>compile</goal>

</goals>

</execution>

</executions>

<configuration>

<moduleName>com.medhok.mm.OEV</moduleName>

<moduleShortName>MedicalMgmt</moduleShortName>

<failOnError>true</failOnError>

<!-- GWT compiler 2.8 and above requires 1.8, hence define sourceLevel here if you use

a different source language for java compilation -->

<sourceLevel>1.8</sourceLevel>

<!-- Compiler configuration -->

<compilerArgs>

<!-- Ask GWT to create the Story of Your Compile (SOYC) (gwt:compile) -->

<arg>-compileReport</arg>

<arg>-XcompilerMetrics</arg>

</compilerArgs>

<!-- DevMode configuration -->

<warDir>${webappDirectory}</warDir>

<classpathScope>compile+runtime</classpathScope>

<!-- URL(s) that should be opened by DevMode (gwt:devmode). -->

<startupUrls>

<startupUrl>index.html</startupUrl>

</startupUrls>

</configuration>

</plugin>

As per entry in the plugin it has to look into src/main/java.  Some how it's not finding the right classpath entry.

Appreciate your help.

Colin Alworth

unread,
Nov 11, 2024, 6:01:24 PM (7 days ago) Nov 11
to GWT Users
Can you describe your project layout, how the modules are structured, depend on each other, how your source directories are laid out? What is the <packaging> of this client project where the pom is, and what command are you running to build (and from which directory)?

Consider downgrading to GWT 2.11 and only change the plugin, rather than changing both plugin and GWT version at the same time, so that you don't confuse issues from one change with the other.

Also consider using one of the archetypes to generate a sample project, and then look at the differences between your project and that sample. You can adjust the archetype-created project to be more like your own, and when it stops building, you may have a better idea about what is going on.

Venkateswara Rao

unread,
Nov 11, 2024, 9:27:22 PM (7 days ago) Nov 11
to GWT Users
Thanks for your input Colin,

i have created sample project with GWT 2.11.0 and gwt-maven-plugin.  I am getting the following error:

[1m--- [0;32mgwt:1.1.0:compile [m [1m(default) [m @ [36mOEV [0;1m --- [m

[INFO] Compiling module com.mm.medhok.OEV

[INFO] Tracing compile failure path for type 'com.google.gwt.validation.client.impl.NodeImpl'

[INFO] [ERROR] Errors in 'com/google/gwt/validation/client/impl/NodeImpl.java'

[INFO] [ERROR] Line 81: The method getKey() of type NodeImpl must override or implement a supertype method

[INFO] [ERROR] Line 76: The method getIndex() of type NodeImpl must override or implement a supertype method

[INFO] [ERROR] Line 42: Node cannot be resolved to a type

[INFO] [ERROR] Line 30: Node cannot be resolved to a type

[INFO] [ERROR] Line 102: The method isInIterable() of type NodeImpl must override or implement a supertype method

[INFO] [ERROR] Line 38: Node cannot be resolved to a type

[INFO] [ERROR] Line 20: The import javax.validation.Path cannot be resolved

[INFO] [ERROR] Line 25: Node cannot be resolved to a type

[INFO] [ERROR] Line 28: Node cannot be resolved to a type

[INFO] [ERROR] Line 34: Node cannot be resolved to a type

[INFO] [ERROR] Line 86: The method getName() of type NodeImpl must override or implement a supertype method

[INFO] Tracing compile failure path for type 'com.google.gwt.validation.client.constraints.MinValidatorForNumber'

even though I have added below dependency.

<dependency>

<groupId>javax.validation</groupId>

<artifactId>validation-api</artifactId>

<version>1.0.0.GA</version>

</dependency>

Please let me know If I missed any.

Colin Alworth

unread,
Nov 12, 2024, 8:33:11 AM (6 days ago) Nov 12
to GWT Users
To use any classes in your GWT code, you need sources (though you need bytecode too to compile with javac). Add the source version of that same jar as well:


            <dependency>
                <groupId>javax.validation</groupId>
                <artifactId>validation-api</artifactId>
                <version>1.0.0.GA</version>
                <classifier>sources</classifier>
            </dependency>

Venkateswara Rao

unread,
Nov 12, 2024, 10:19:33 AM (6 days ago) Nov 12
to GWT Users
I do have the mentioned dependency in my pom.xml file:

<dependency>

<groupId>javax.validation</groupId>

<artifactId>validation-api</artifactId>

<version>1.0.0.GA</version>

<!-- Note: use classifier=sources rather than type=java-sources so they're added to the classpath -->

<classifier>sources</classifier>

</dependency>


Colin Alworth

unread,
Nov 12, 2024, 12:08:33 PM (6 days ago) Nov 12
to GWT Users
If you'd like to share the full example project that fails so that we can look at it and understand what is misconfigured, that would help here, but we can't guess about code and configuration we can't see. My steps in past messages were to give you questions to ask yourself or to answer in your replies so we would have enough information to help, or steps to take to experiment and spot important differences between "works" and "doesn't work".

Best guess, you've managed the version somewhere else in your project to no longer match 1.0.0.GA, but if you literally only have the archetype sources and none of your own pom or own sources, that shouldn't be possible.

Venkateswara Rao

unread,
Nov 12, 2024, 3:35:42 PM (6 days ago) Nov 12
to GWT Users

Here are the my project folder structure:
MedicalMgmt:
   src
        com.med.mm
               OEV.gwt.xml
               MedicalMgmt.gwt.xml
        com.med.mm.client
        com.med.mm.server
        com.med.mm.shared
   src/main/resources
   webapp
   pom.xml

The plugin entry in pom as follows:

<build>

<sourceDirectory>src</sourceDirectory>

<!-- Generate compiled stuff in the folder used for developing mode -->

<outputDirectory>${webappDirectory}/WEB-INF/classes</outputDirectory>


<plugins>

<plugin>

<groupId>org.codehaus.mojo</groupId>

<artifactId>buildnumber-maven-plugin</artifactId>

<version>1.4</version>

<executions>

<execution>

<phase>validate</phase>

<goals>

<goal>create</goal>

</goals>

</execution>

</executions>

<configuration>

<doCheck>false</doCheck>

<getRevisionOnlyOnce>true</getRevisionOnlyOnce>

<shortRevisionLength>8</shortRevisionLength>

<scmBranchPropertyName>scmBranch</scmBranchPropertyName>

</configuration>

</plugin>


<plugin>

<groupId>org.apache.maven.plugins</groupId>

<artifactId>maven-scm-plugin</artifactId>

<version>1.12.0</version>

<configuration>

<providerImplementations>

<git>jgit</git>

</providerImplementations>

</configuration>

<dependencies>

<dependency>

<groupId>org.apache.maven.scm</groupId>

<artifactId>maven-scm-provider-jgit</artifactId>

<version>1.12.0</version>

</dependency>

</dependencies>

</plugin>

<plugin>

<groupId>org.apache.maven.plugins</groupId>

<artifactId>maven-compiler-plugin</artifactId>

<configuration>

<fork>false</fork>

<debug>false</debug>

<debuglevel>lines,vars,source</debuglevel>

</configuration>

</plugin>


<!-- GWT Maven Plugin -->

<plugin>

<groupId>net.ltgt.gwt.maven</groupId>

<artifactId>gwt-maven-plugin</artifactId>

<version>1.1.0</version>

<executions>

<execution>

<goals>

<goal>compile</goal>

</goals>

</execution>

</executions>

<configuration>

<skipModule>true</skipModule>

<moduleName>com.medhok.mm.OEV</moduleName>

<moduleShortName>MedicalMgmt</moduleShortName>

<failOnError>true</failOnError>

<!-- GWT compiler 2.8 and above requires 1.8, hence define sourceLevel here if you use

a different source language for java compilation -->

<sourceLevel>1.8</sourceLevel>

<!-- Compiler configuration -->

<compilerArgs>

<!-- Ask GWT to create the Story of Your Compile (SOYC) (gwt:compile) -->

<arg>-compileReport</arg>

<arg>-XcompilerMetrics</arg>

</compilerArgs>

<jvmArgs>

<jvmArg> -Xmx7G </jvmArg>

<jvmArg> -XX:+UseG1GC </jvmArg>

<jvmArg> -Dgwt.user.agent=${gwt.compile.user.agent} </jvmArg>

</jvmArgs>

<!-- DevMode configuration -->

<warDir>${webappDirectory}</warDir>

<classpathScope>compile+runtime</classpathScope>

<!-- URL(s) that should be opened by DevMode (gwt:devmode). -->

<startupUrls>

<startupUrl>index.html</startupUrl>

</startupUrls>

</configuration>

</plugin>

<!--<plugin>

<groupId>org.codehaus.mojo</groupId>

<artifactId>gwt-maven-plugin</artifactId>

<version>${gwtMavenPluginVersion}</version>

<dependencies>

<dependency>

<groupId>org.gwtproject</groupId>

<artifactId>gwt-user</artifactId>

<version>${gwtVersion}</version>

</dependency>

<dependency>

<groupId>org.gwtproject</groupId>

<artifactId>gwt-dev</artifactId>

<version>${gwtVersion}</version>

</dependency>

</dependencies>

<executions>

<execution>

<goals>

<goal>compile-report</goal>

<goal>compile</goal>

<goal>test</goal>

<goal>i18n</goal>

<goal>generateAsync</goal>

</goals>

</execution>

</executions>

Plugin configuration. There are many available options, see gwt-maven-plugin

documentation at codehaus.org

<configuration>

<modules>

<module>com.medhok.mm.MedicalMgmt</module>

<module>com.medhok.mm.OEV</module>

</modules>


<runTarget>index.html</runTarget>

<hostedWebapp>${webappDirectory}</hostedWebapp>

<gwtSdkFirstInClasspath>true</gwtSdkFirstInClasspath>

<i18nMessagesBundle>com.medhok.mm.client.Messages</i18nMessagesBundle>

<extraJvmArgs>-Xmx1496m -XX:MaxPermSize=256m</extraJvmArgs>

-remoteUI "${gwt_remote_ui_server_port}:${unique_id}" -startupUrl

MedicalMgmt.html -logLevel INFO -port 8888 -war "C:\Users\Pavel Vassiliev\test-workspace\MedicalMgmt\target\medical-mgmt-1.0-SNAPSHOT"

-codeServerPort 9997

extraJvmArgs>-Xmx4G -XX:MaxPermSize=512m -XX:+UseG1GC -Dgwt.compiler.localWorkers=3

-Dgwt.jjs.permutationWorkerFactory=com.google.gwt.dev.ThreadedPermutationWorkerFactory</extraJvmArgs

<extraJvmArgs>-Xmx7G -XX:+UseG1GC -Dgwt.user.agent=${gwt.compile.user.agent}</extraJvmArgs>


</configuration>

</plugin>-->


<!-- Copy static web files before executing gwt:run -->

<plugin>

<groupId>org.apache.maven.plugins</groupId>

<artifactId>maven-war-plugin</artifactId>

<version>3.2.0</version>


<executions>

<execution>

<phase>compile</phase>

<goals>

<goal>exploded</goal>

</goals>

</execution>

</executions>

<!-- -->

<configuration>

<packagingExcludes>images/client/</packagingExcludes>

<webappDirectory>${webappDirectory}</webappDirectory>

<webResources>

<webResource>

<directory>webapp</directory>

</webResource>

</webResources>

<archive>

<manifest>

<addDefaultImplementationEntries>true</addDefaultImplementationEntries>

</manifest>

<manifestEntries>

<Implementation-Build>${buildNumber}</Implementation-Build>

<Implementation-Branch>${scmBranch}</Implementation-Branch>

<SCM-Branch>${scmBranch}</SCM-Branch>

<Jenkins-Build-Number>${BUILD_NUMBER}</Jenkins-Build-Number>

<Jenkins-Build-Url>${BUILD_URL}</Jenkins-Build-Url>

<Jenkins-Git-Commit>${GIT_COMMIT}</Jenkins-Git-Commit>

<Jenkins-Build-Time>${BUILD_TIMESTAMP}</Jenkins-Build-Time>

<Build-Time>${maven.build.timestamp}</Build-Time>

<Build-Host>${agent.name}</Build-Host>

<Build-User>${user.name}</Build-User>

<Build-Maven>Maven ${maven.version}</Build-Maven>

<Build-Java>${java.version}</Build-Java>

<Build-OS>${os.name}</Build-OS>

<Build-Label>${project.artifactId}.${project.version}</Build-Label>

<Build-Path>${basedir}</Build-Path>

<Release-Version>${release.info}</Release-Version>

</manifestEntries>

</archive>

</configuration>

</plugin>

<plugin>

<groupId>com.mycila</groupId>

<artifactId>license-maven-plugin</artifactId>

<version>4.3</version>

<configuration>

<licenseSets>

<licenseSet>

<header>src/main/resources/header.txt</header>

<includes>

<include>src/**/*.java</include>

</includes>

</licenseSet>

</licenseSets>

</configuration>

</plugin>

</plugins>

<pluginManagement>

<plugins>

<plugin>

<groupId>org.apache.maven.plugins</groupId>

<artifactId>maven-compiler-plugin</artifactId>

<version>3.1</version>

<configuration>

<fork>true</fork>

<debug>true</debug>

<debuglevel>lines,vars,source</debuglevel>

</configuration>

</plugin>

</plugins>

</pluginManagement>

</build>


 The error I am receiving is "Unable to find 'com/medhok/mm/OEV.gwt.xml' on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source?"

Appreciate your help on this.

Colin Alworth

unread,
Nov 12, 2024, 3:57:57 PM (6 days ago) Nov 12
to GWT Users
I suspect at least one typo in your last email, but it is hard to be sure, but as written, what you have should not work. The correct module is com.med.mm.OEV, since the packages are com.med.mm, not com.medhok.mm. However, your old gwt-maven-plugin was also using that package, so it doesn't make sense how that used to work either. Can you confirm what the pom (and proj structure) looked like before you started making these changes and the build was passing consistently?

Note that you might have some confusion with locations of resources, since you have src/ as your source directory, but you have src/main/resources (which is inside src/) as your resources. After this issue is resolved, consider changing to the standard maven layout of src/main/java and src/main/resources.

Venkateswara Rao

unread,
Nov 12, 2024, 9:08:12 PM (6 days ago) Nov 12
to GWT Users

Thanks for your response.  With old Mojo's plugin it's working fine with same folder structure.  

The package is com.med.mm it's typo.  Yes as you mentioned src as source directory and resources are under src/main/resources.

So I tried to use same folder structure with new gwt-maven-plugin, that's where I am getting the issue. However I tried to move all packages from src to src/main/java folder still same issue occurred.

Colin Alworth

unread,
Nov 12, 2024, 9:35:42 PM (6 days ago) Nov 12
to GWT Users
If changing the structure breaks it, you are probably not updating all places that depend on that structure. Please share the modified archetype (with none of your sources - only your changes to how the code builds such that the failure happens), or a complete and accurate picture of your project. We can't really help with these vague details.

Frank Hossfeld

unread,
Nov 13, 2024, 2:55:26 AM (6 days ago) Nov 13
to GWT Users
Have you tried moving the *.gwt.xml to src/main and rename it to module.gwt.xml? see: https://tbroyer.github.io/gwt-maven-plugin/usage.html
src/main/java is the wrong location.

Are you using <packaging>gwt-app</packaging> in you POM?


Thomas Broyer

unread,
Nov 13, 2024, 11:27:57 AM (5 days ago) Nov 13
to GWT Users
Best way to troubleshoot: run Maven with debug logs (mvn -X … ; better redirect them to a file as they're very verbose) then look for the lines that start with "Classpath:" and "Arguments:" and examine them closely (please notice that arguments aren't quoted, so if there's an empty-string argument it won't be visible, among other details about quoting). If you notice anything wrong then check your Maven configuration, it's either there or a bug in the plugin. If things look OK then it might be a bug in GWT itself.
In this specific case, it's probably a problem with your project setup, and looking at it from a different point of view (those lower-level logs) might help.

Venkateswara Rao

unread,
Nov 14, 2024, 9:26:04 AM (4 days ago) Nov 14
to GWT Users
Thank you all for your response.  Here are the steps I performed,  Created new GWT project with 2.11.0 and new gwt-maven-plugin and copied all my source files and resources into the new project folder structure.

Now it's able to identify my OEV.gwt.xml file and it's compiling the sources.

However, It's hanged at compile permutations step.

Please let me know the insights of this problem.

Thanks.

Venkateswara Rao

unread,
Nov 14, 2024, 10:34:40 AM (4 days ago) Nov 14
to GWT Users
@Thomas Broyer,

What will be the equivalent argument for the following in the new plugin:
<extraJvmArgs>-Xmx7G -XX:+UseG1GC -Dgwt.user.agent=${gwt.compile.user.agent}</extraJvmArgs>
Thanks.

Thomas Broyer

unread,
Nov 14, 2024, 7:04:07 PM (4 days ago) Nov 14
to GWT Users
On Thursday, November 14, 2024 at 4:34:40 PM UTC+1 venkat...@gmail.com wrote:
@Thomas Broyer,

What will be the equivalent argument for the following in the new plugin:
<extraJvmArgs>-Xmx7G -XX:+UseG1GC -Dgwt.user.agent=${gwt.compile.user.agent}</extraJvmArgs>
Thanks.


<jvmArgs>
  <arg>-Xmx7G</arg>
  <arg>-XX:+UseG1GC</arg>
</jvmArgs>
<systemProperties>
  <gwt.user.agent>${gwt.compile.user.agent}</gwt.user.agent>
</systemProperties>

Venkateswara Rao

unread,
Nov 14, 2024, 9:17:32 PM (4 days ago) Nov 14
to GWT Users

Thomas Broyer,
Thanks for your response.  I have added the jvmArgs and systemProperties to the plugin as mentioned below:

<plugin>

<groupId>net.ltgt.gwt.maven</groupId>

<artifactId>gwt-maven-plugin</artifactId>

<version>1.1.0</version>

<executions>

<execution>

<goals>

<goal>compile</goal>

</goals>

</execution>

</executions>

<configuration>

<moduleName>com.medhok.mm.OEV</moduleName>

<failOnError>true</failOnError>

<!-- GWT compiler 2.8 and above requires 1.8, hence define sourceLevel here if you use

a different source language for java compilation -->

<sourceLevel>1.8</sourceLevel>

<!-- Compiler configuration -->

<compilerArgs>

<!-- Ask GWT to create the Story of Your Compile (SOYC) (gwt:compile) -->

<arg>-compileReport</arg>

<!--<arg>-XcompilerMetrics</arg>-->

</compilerArgs>

<jvmArgs>

<arg>-Xmx7G</arg>

<arg>-XX:+UseG1GC</arg>

</jvmArgs>

<systemProperties>

<gwt.user.agent>${gwt.compile.user.agent}</gwt.user.agent>

</systemProperties>

<!-- DevMode configuration -->

<warDir>${project.build.directory}/${project.build.finalName}</warDir>

<classpathScope>compile+runtime</classpathScope>

<!-- URL(s) that should be opened by DevMode (gwt:devmode). -->

<startupUrls>

<startupUrl>index.html</startupUrl>

</startupUrls>

</configuration>

</plugin>

Now, It's hanged on Compiling Permutations 0..

Please let me know what's the wrong in the configuration.

Venkateswara Rao

unread,
Nov 15, 2024, 4:41:06 PM (3 days ago) Nov 15
to GWT Users
Any update on this issue, I have enabled debug logs and added localworkers 4. Issue still persists..

[INFO]          Done
 
It's says Done in the log.

Thanks.

Venkateswara Rao

unread,
10:42 AM (7 hours ago) 10:42 AM
to GWT Users
Please help me on this issue, It's taking too much time to build GWT application.

Any inputs would help me to proceed further.

Thanks.

Colin Alworth

unread,
10:57 AM (6 hours ago) 10:57 AM
to GWT Users
Is it taking longer than it used to, or hanging and staying stuck? How long did it used to take, how long does it take now (if not actually stuck)?

Have you tried giving it more than 7GB of memory, or using the default GC instead of g1? G1 is the default for Java 17+, and can handle a lot of memory (depending on your project size it may need quite a bit), and is fairly configurable. How much memory did this stage actually use (not just allocated, but used) before you changed the GWT plugin?

Have you attempted any profiling of the process? Is there any chance that your disk is full...?

To confirm, you are _not_ updating GWT, just the plugin first, right?

If you can share the sample project you created, please put it on github or the like and link from this - one of us can try to build it and see what is broken with your project.

If you'd like to share code privately and have a videocall to wrap this up, that is a service that our company offers, you can contact me off-list at co...@vertispan.com.

Thomas Broyer

unread,
11:01 AM (6 hours ago) 11:01 AM
to GWT Users
If it works with the org.codehaus plugin, then running with 'mvn -X' should also output the command line arguments of the forked process so you can compare and tweak.

Venkateswara Rao

unread,
11:11 AM (6 hours ago) 11:11 AM
to GWT Users
Thanks Colin for your response.  To answer your question,

My current project is using Java 8, GWT 2.11.0, smartgwt 12.0P with mojo codehaus plugin 2.10.0, when I build with following arguments:
<extraJvmArgs>-Xmx7G -XX:+UseG1GC -Dgwt.user.agent=${gwt.compile.user.agent}</extraJvmArgs>
It will take approximately 8 mins to finish the build process.

Now we are upgrading to new plugin net.ltgt.gwt.maven and provided with same arguments.  This one is taking too much time more than 4 hours eventhough I added localWorkers 4.

Appreciate your inputs on this.

Thanks.

Colin Alworth

unread,
11:23 AM (6 hours ago) 11:23 AM
to GWT Users
Adding more workers will not necessarily make it faster - if you are near your memory limit, it may be slower because the system could spend more time GCing so that the threads can each get their own work done. Even if you are not near the memory limit, it may make it slower, depending on how fast your CPU/memory is in moving data back and forth. Can you share the full successful build log, both before and after?

There is no system property "gwt.user.agent" in GWT itself (maybe this is specific to smartgwt?). Perhaps you mean to be passing -setProperty user.agent=.. instead as an arg to GWT? That would remove your other permutations.

Thomas's suggestion is to get _all_ of the arguments, not just the ones you're setting by hand. Likewise, try to take the measurements I suggested. Can you also share the full build log - GWT doesn't log the word "Done" at INFO level except when you have detailed SOYC enabled (-XdetailedSoyc), which is documented to consume extra compile time to write so much output. I note that you do have "-compileReport" turned on - are you sure you want that at all?

Venkateswara Rao

unread,
4:02 PM (1 hour ago) 4:02 PM
to GWT Users

Thanks for your response Colin,  gwt.user.agent we defined to pass few. However, let me remove compileReport and run the debug level and share it with you.
Reply all
Reply to author
Forward
0 new messages