I am migrating the maps I have made with the “Charts” addon to the commercial version of the “Maps” addon, but when I run the application I run into the following error:
Task :app-web-toolkit:buildWidgetSet
Compiling module com.myproject.web.toolkit.ui.AppWidgetSet
[ERROR] Hint: Check that your module inherits ‘com.google.gwt.core.Core’ either directly or indirectly (most often by inheriting module ‘com.google.gwt.user.User’)
Task :app-web-toolkit:buildWidgetSet FAILED
Execution failed for task ‘:app-web-toolkit:buildWidgetSet’.
Process ‘command ‘C:\Program Files\Java\jdk1.8.0_231\bin\java.exe’’ finished with non-zero exit value 1
I have been seeing forums for a week that may have changes depending on the version, so I am currently using the Java 8 version.
Unfortunately, we can not reproduce the issue. Could you please provide a demo project in which the error is reproduced?
Also, this information can be helpful:
Your JDK version. I have noticed from your first message that you use Java 8, but maybe you changed the version recently?
Gradle JVM version. In the Intellij IDEA can be found in: Preferences | Build, Execution, Deployment | Build Tools | Gradle.
1.- I am sorry but I cannot share the project because it is a corporate application. What I can do is try to replicate the error in a separate project. I will do that and I let you know ASAP the result.
2.- We are using the JDK 8
What we do is the following:
A) 2 upgrades
a. The first one from version 7.0.11 to 7.1
b. The second one from version 7.1 to 7.1.5
B) In order to be able to execute the maps addon we commented in our gradle script the following line (mavenCentral())
If we don’t delete this line the compiling fails. There is a problem with the Maps addon and MavenCentral.
3.- We are using the 6.0.1 gradle version. We installed manually this version because the version installed inside of IntelliJ IDEA fails with our code.
Finally, can we use the Charts addon and Maps addon at the same time?
I think there is a problem between these two.
We still could not reproduce the error. I’d hazard a guess that maybe it’s something wrong with your build.gradle file. I would advise you to create a new CUBA project via CUBA Studio with Maps add-on and Charts&Maps add-on and compare its build.gradle file with yours in order to find some differences. Make sure to add the web-toolkit module, as it is needed to integrate widgetsets from both add-ons as described in the doc.
In order to solve this problem, i recommend placing mavenCentral repository after the CUBA premium repository in the build.gradle file.
Yes, you can work with both of these add-ons in the same project for sure. The only condition is that the project should have the web-toolkit module.
Every CUBA version is associated with the specific Gradle version. For 7.2 release it is Gradle 5.6.4. So we cannot guarantee correct build in case of using Gradle 6.
Anyway, i tried to reproduce the error using the steps you provided but it didn’t work for me. Could you please provide a demo project where you can reproduce the error? It would help us to investigate this issue.
I understand that, are there any plans to upgrade to gradle 6.X for 7.3 release?
Here you can find few assemble debug logs:
I just verified it on linux building with gradle 6.0.1 and 6.2.2 with no issue.
On Windows it is working until your command is shorter than command length limit (32768 chars).
When your command is longer, gradle tries to shorten the path and fails executing shortened command.
This scenario should not happen on linux nor mac (maybe it could if you would set ARG_MAX to eg. 32k)
Windows 10, gradle 6.5.1, buildWidgetSet --debug debug_log.txt (1.8 MB) What you are looking for is on lines [8016 - 8032]
Updated steps for replication (or try with project attached to linked post):
We have tried to compile the project with the gradle version 5.6.2 and the result has been the following error:
Task :app-global:compileJava FAILED
Execution failed for task ‘:app-global:compileJava’.
A problem occurred starting process ‘command ‘C:\Program Files\Java\jdk1.8.0_231\bin\java.exe’’
We have installed the project in an Ubuntu operating system with the gradle version 5.6.4 and when trying to access the application it shows the following error:
Unfortunately, this error message is not very informative. The reason of it could be anything. Could you please add a little bit more information to it (for example, include the exception stacktrace)?
Please, try to perform CUBA -> Build tasks -> Clean, CUBA -> Build tasks -> Undeploy and then run the application server again.