Failed to load the widgetset (after clean installation)

I’m trying to run Vaadin 7 with Jetty. No simple demo is working:( Is new version 7 so buggy?

Create project with:

mvn archetype:generate -DarchetypeGroupId=com.vaadin -DarchetypeArtifactId=vaadin-archetype-application -DarchetypeVersion=7.0.0 -Dpackaging=war

Properties of the project:

Confirm properties configuration:
groupId: com.mypackage.client.ui
artifactId: test
version: 1.0-SNAPSHOT
package: com.mypackage.client.ui

When I run project - D:\workspace\test>mvn jetty:run - and open a browser, this error shows:

In cmd, this is shown:

[INFO]
 Started Jetty Server
II 09, 2013 2:55:36 ODP. com.vaadin.server.DefaultDeploymentConfiguration checkProductionMode
WARNING:
=================================================================
Vaadin is running in DEBUG MODE.
Add productionMode=true to web.xml to disable debug features.
To show debug window, add ?debug to your application URL.
=================================================================
II 09, 2013 2:55:36 ODP. com.vaadin.server.VaadinServlet serveStaticResourcesInVAADIN
INFO: Requested resource [/VAADIN/widgetsets/com.mypackage.client.ui.AppWidgetSe
t/com.mypackage.client.ui.AppWidgetSet.nocache.js] not found from filesystem or
through class loader. Add widgetset and/or theme JAR to your classpath or add fi
les to WebContent/VAADIN folder.

Is it possible to use Vaadin 7 or not yet? Thanks.

It is totally fine to use Vaadin 7 for all kind of projects. I’ve already done two big projects which of one is running in production. Got a head start in it by starting when 7 was in alpha/beta state.

Vaadin uses GWT to compile Java code into javascript. The end result of this compilation is something called a widgetset. What your error message is saying is, that your application should use a custom widgetset found at com.mypackage.client.ui.AppWidgetSet instead of the default one bundled with Vaadin. You want a custom widgetset when you do some custom client side code or download add-ons from the directory, but this is certainly nothing that is required when you start off with a new project.

So, going back to the issue. The Java web projects there is a web.xml file that defines the project structure. In this file, you have for some reason the rules that it should use a custom widgetset. The snippet looks something like this: <init-param> <param-name>widgetset</param-name> <param-value>com.mypackage.client.ui.AppWidgetSet</param-value> </init-param>
But there is no compiled widgetset that matches that name (param-value).

You can do two things.

  1. Delete that snippet of code out of the web.xml. Without it, Vaadin will use the default widgetset which it finds within the jars of Vaadin. This is what you probably want to do if you just want to test out Vaadin.

  2. If you actually have some custom widgets etc., you have to compile the widgetset. This is done in many ways, for example with maven: mvn vaadin:update-widgetset install

I am fairly certain that you want to go with number one here. I don’t know why you would have a widgetset defined at this stage, and that is something that has to be sorted out. Might be a problem with the maven archetype.

I also now noticed that you are using a archetype called vaadin-archetype-application. The wiki article
Using Vaadin with Maven
doesn’t mention this archetype so I’m not really sure what it does. You should maybe try to recreate the project with the standard archetype ‘vaadin-archetype-clean’ and see if that works better.

May I ask where you got the maven instructions from?

Thank you for your help. I will try it.

Application archetype is written in example there: https://vaadin.com/book/vaadin7/-/page/getting-started.maven.html

When I use clean archetype, maven ends with error:

mvn archetype:generate -DarchetypeGroupId=com.vaadin -DarchetypeArtifactId=vaadin-archetype-clean -DarchetypeVersion=7.0.0 -DgroupId=cz.x.y -DartifactId=z-vaadin -Dversion=1.0 -Dpackaging=war

[INFO]
Archetype repository missing. Using the one from [com.vaadin:vaadin-arche
type-clean:1.7.2] found in catalog remote
[ERROR]
Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2
.2:generate (default-cli) on project standalone-pom: The desired archetype does
not exist (com.vaadin:vaadin-archetype-clean:7.0.0) → [Help 1]

This is working fine, BUT it download’s vaadin-6.8.2 and I want to use 7.0 :frowning:

mvn archetype:generate -DarchetypeGroupId=com.vaadin -DarchetypeArtifactId=vaadin-archetype-clean -DarchetypeVersion=LATEST -DgroupId=cz.x.y -DartifactId=z-vaadin -Dversion=1.0 -Dpackaging=war

Working solution is to create project with

mvn archetype:generate -DarchetypeGroupId=com.vaadin -DarchetypeArtifactId=vaadin-archetype-application -DarchetypeVersion=7.0.0 -DgroupId=cz.x.y -DartifactId=z-vaadin -Dversion=1.0 -Dpackaging=war

And comment out custom widgetset, as you pointed out.

Now there is no error and page is showing.

Thanks!

Oh damn, yeah the one archetype that I referred to might be for Vaadin 6. Good thing you got it fixed by removing the widgetset declaration in web.xml however. I’ll try this myself some day here to see what happens and report the bugs I find to the dev team.

I have the same problem using Maven and IntelliJ IDEA. I followed the current instructions for Vaadin Version 7.1.3. At the end: Failed to load the widgetset …

Using vaadin-archetype-clean instead of vaadin-archetype-application solved this problem, but this seems to be not the right way for this version.

You just have to make sure that you
a) have a .gwt.xml file of your widgetset somewhere
b) have your widgetset file mapped correctly in the web.xml or in the @ServletConfiguration annotation
c) that you compiled your widgetset (for example using mvn vaadin:compile) in the right folder src/main/webapp/Vaadin/widgetsets/

Clean doesn’t involve a custom client-side widgetset but uses the DefaultWidgetset. This is enough for project which don’t use Add-Ons which use Client-side code or if you don’t want to make your own custom server-client side component.
the Application archetype should have this declaration already set but even when you decide to use a custom widgetset in a project made with vaadin-clean this is still possible and should be described on several places on the web (for example
here
[might be outdated]
).

I have quite same error but after runnig this command line ;

mvn package jetty:run , I can launch my vaadin project…
13160.png

try mvn jetty:run-war.

I am using vaadin 7 with eclipse.
I faced to same problem, I created and compiled a new widget, I have writen the required servlet configuration tags in web.xml and also used the @VaadinServletConfiguration annotation to introduce my widgetset to the Ui class. But when I use the MyComponenet widgetset I receive the following alert.




Failed to load the widgetset: ./VAADIN/widgetsets/WidgetprojectWidgetset/WidgetprojectWidgetset.nocache.js?1394395212756




The Project name is WidgetProject.
I need it,
Thanks

I am using Vaadin 7.1.11 and touchkit addon 3.0.1
Defined the TouchKitServlet class and UI in the web.xml deployment descriptor folowed by recommended touchkit settings.
But ending up with the following error.

Failed to load the widgetset: ./VAADIN/widgetsets/com.example.myproject.MyprojectWidgetset/com.example.myproject.MyprojectWidgetset.nocache.js

Where could I have gone wrong?

Hi,

first check if your files exist for the web. You could check following URL (depending on your configurations)
http://localhost:8181/VAADIN/widgetsets/com.example.myproject.MyprojectWidgetset/clear.cache.gif
This may fail.
So next check your web servlet configuration (beware of case sensitive).
If all fails create a random resource (best a folder with a resource in it) and open it with on your web server. After this all should be clear

pom.xml



com.vaadin
vaadin-client-compiled
${vaadin.version}

...

Should not be provided. Comment it.

Solved !!!

I solved using
mvn vaadin:update-widgetset install

https://www.cuba-platform.com/discuss/t/failed-to-load-widgetset/1765 that’s helped me

Erald Kuka:
I solved using
mvn vaadin:update-widgetset install

This solve to mee to! thanks!