Failed to load Widgetset

Hi,

I have a big problem. I wanted to put my project into a Linux server, where everyone in the network access it.
I made a WAR file, everything okay, no error, no exception. But when I open the linux’s myproject page I get this error on login page:


Failed to load the widgetset: ./VAADIN/widgetsets/com.haulmont.cuba.web.toolkit.ui.WidgetSet/com.haulmont.cuba.web.toolkit.ui.WidgetSet.nocache.js?1492781825695

We have bought the license, I use the Charts and Reports add-ons in my project. I have Windows 10 and 6.4.3 Cuba Studio…
We have an another Cuba project on that Linux Server which works perfectly (that not include any add-ons).
I have no idea what to do. We tried a lots of things to get work. From my project on my local pc really missing the widgetset, only the chart’s widgetset.jar appears, but for me it works perfect on my pc. In another project which works, there is that widgetset stuff.

Any solution for that?

Thank you very much.

Hi,

Are you using nginx proxy or some other web proxy on Linux server?

No we do not use nginx and no web proxy. We use a Tomcat, no other layer and we call direct the webpage on 8088 port.

Could you tell us more about your build script and deployment process?

How have you deployed application to the server? To ROOT or to regular context? Are you using WAR deployment or just copying tomcat to the Linux machine? Any additional details will be useful.

1 Like

First we generate war with gradle, shut down tomcat, copy war under webapps and start tomcat. I do not know what should be helpful to you, please ask more and I try to answer as I can.

Could you share your build.gradle and single-war-web.xml / web.xml of the project? I’ll try to figure out what is wrong with the configuration.

Of course I attach the web.xml and single-war-web.xml which I found here:
myDesktop\MyProject\deploy\tomcat\webapps\myprject\WEB-INF\

and the build.gradle file which is in the project’s root folder and I zipped it becouse I couldn’t attach the original file.

build.rar (1.9K)

single-war-web.xml (2.1K)

web.xml (3.4K)

Hi,

It seems, Studio incorrectly wrote or didn’t update your single-war-web.xml file. There are no com.haulmont.charts and com.haulmont.reports in appComponents section.

It must be:


<context-param>
    <param-name>appComponents</param-name>
    <param-value>com.haulmont.cuba com.haulmont.reports com.haulmont.charts</param-value>
</context-param>

You can either add these definitions manually or regenerate this file using Studio Deployment Settings. Please let me know if this will not fix the problem.

Currently, I cannot reproduce the issue and Studio updates single-war-web.xml correctly.

2 Likes

Thank you so much. That was really missing. I editet the file manually and now it works!
Thank you!
And I tried with Studio to generate and worked too.
So as I imported charts and reports I did it as the documentation said: I just checked the check boxes in Cuba Studio.
Thank you again!

single-war-web.xml was not updated in my case.
was using
CUBA Studio 2019.1 (IntelliJ Edition) Build #CS-191.7479.111, built on July 29, 2019 JRE: 1.8.0_202-release-1483-b53 amd64 JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o Linux 4.9.0-5-amd64