Failed to load the widgetset error when activating Charts addon

Hi there,

i have a problem that when i start one of my CUBA applications an error occurs in the browser saying: “Failed to load the widgetset: ./VAADIN/widgetsets/com.haulmont.cuba.web.toolkit.ui.WidgetSet/com.haulmont.cuba.web.toolkit.ui.WidgetSet.nocache.js?1496646421128” - and there is no possibility to login. I had similar problems from time to time in different CUBA applications, but i never had a chance to reproduce it, because it was mainly on my dev machine from within studio.

But now, i have an app where i created the war file and when i try to deploy it to a remote tomcat, it will not start because of the exact same error:

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

Earlier i sometimes had similar problems, but those were only temporarly and i mainly solved it with some advice like this: https://www.cuba-platform.com/discuss/t/exception-after-adding-fts#comment-6560

But now, since it is not part of the war file, this error is not of the temporary form.

I have the following setting:

  • CUBA 6.4.4
  • Reports Addon
  • FTS Addon
  • Charts Addon

When i look into the war (frontend) file, it contains only the following directory: “com.haulmont.charts.web.toolkit.ui.ChartsWidgetSet” in VAADIN/widgetsets/

I had the idea that it has something to do with the Charts Addon, so i removed the dependency and did a “./gradlew buildWar” again. This time in the output of the gradle task the following popped up:

:buildWar
Download https://repo.cuba-platform.com/content/groups/work/com/haulmont/cuba/cuba-web-toolkit/6.4.4/cuba-web-toolkit-6.4.4.pom
Download https://repo.cuba-platform.com/content/groups/work/com/haulmont/cuba/cuba-web-toolkit/6.4.4/cuba-web-toolkit-6.4.4-web.zip

BUILD SUCCESSFUL

I looked at the war file again and this time, the “com.haulmont.charts.web.toolkit.ui.ChartsWidgetSet” is gone (which is good) and the “com.haulmont.cuba.web.toolkit.ui.WidgetSet” directory is there (which is very good).

To ensure the behavior i pulled Charts Addon back in. Same wrong behavior. cuba.web.toolkit dir is missing, charts.web.toolkit is back in.

Luckily i don’t really the charts Addon right now, but perhaps you can investigate a little bit on that topic?

That would be great.

Bye
Mario

Hi, Mario.
Charts WidgetSet inherits CUBA WidgetSet. So it is OK that only Charts WidgetSet is deployed or added to WAR.
And AppWidgetSet (which appears if web toolkit module is created) inherits both CUBA- and Charts- WidgetSets.
Do you have web toolkit module in the project? Has it custom application components?
From time to time I also encounter the “Failed to load the widgetset” error. And I always can solve it by cleaning the project (Executing Build->Clean in Studio) and redeploying the application.
Try to Clean the project and deploy it to a brand new Tomcat (or clean up the already existent one).
If the problem persists check the following:
The WidgetSet is defined by the cuba.web.widgetSet property. Application components might override this value. Also look, maybe some config files in Tomcat (in conf) bring the wrong value.