Application Server not running after implementing the "Maps" addon

Hi there,

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.

Any idea how to fix it?

4 Likes

Hi, @dmateube

Could you please provide us with this information:

  1. Your CUBA Platform and CUBA Studio versions. This can be easily copied in CUBA -> Welcome -> Product Versions.
  2. Maps addon version.
  3. Your AppWidgetSet.gwt.xml file located in the web-toolkit module.

Regards,
Gleb

Hi,

CUBA Platform version (7.1.5)
image

CUBA Studio version (12.3-191)
image

Maps addon version(1.1.0)
image

AppWidgetSet.gwt.xml file:
AppWidgetSet.gwt.xml (277 Bytes)

Thank you very much.

2 Likes

Hi, @dmateube

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:

  1. Your JDK version. I have noticed from your first message that you use Java 8, but maybe you changed the version recently?
  2. Gradle JVM version. In the Intellij IDEA can be found in: Preferences | Build, Execution, Deployment | Build Tools | Gradle.

Regards,
Gleb

Hi and thank you for the tracking of the issue.

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
image
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())
image
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.
image

Finally, can we use the Charts addon and Maps addon at the same time?
I think there is a problem between these two.

Hi, @dmateube

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.

Regards,
Gleb

Hi @shalyganov,
To reproduce the issue just upgrade to gradle 6.0.1
gradlew wrapper --gradle-version 6.0.1

  1. create new project
  2. add web-toolkit module
  3. upgrade gradle to 6.0.1
  4. assemble

Hi, @expresado

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.

Regards,
Gleb

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):

  1. create new project
  2. add web-toolkit module
  3. add email templates addon
  4. add maps addon
  5. upgrade gradle to 6.0.1
  6. assemble (or just buildWidgetSet)
1 Like

Hi, @shalyganov

Sorry for the late answer.

We didn’t know that each gradle was linked to the cuba platform version.

As @expresado says, our error appears in lines [8016 - 8032] of the debug_log file,
specifically in the line 8030.

We are going to try the next tests:

  1. We are using version 7.1.5 of cuba so we will look for the corresponding version of gradle and we will do the test.

  2. Currently the whole team is using windows operating system, so we will install the project in a Linux operating system and we will do the test.

I hope we get the solution with these tests, if it works we will update the post, if not, I will add the results.

Thanks for the feedback, we will keep trying to fix the problem.

Hi,
The result of the two tests has been this:

  1. 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’’

  2. 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:

    MicrosoftTeams-image

@expresado, thank you so much for your explanation and the logs you have provided. We will take this into consideration when dealing with Gradle 6.X.

Each feature release of the platform comes with the updated dependencies, including Gradle.

Hi, @dmateube

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.

Regards,
Gleb