Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Vaadin 8 + compatibility = widgetset implementation missing for v7 componen
Hi,
I've been playing with the 8 release and loving the new API, huge KUDOS.
However I cannot seem to get the compatibility components to work.
I've created a simple app using:
mvn archetype:generate \
-DarchetypeGroupId=com.vaadin \
-DarchetypeArtifactId=vaadin-archetype-application \
-DarchetypeRepository=https://maven.vaadin.com/vaadin-prereleases \
-DarchetypeVersion=8.0.0.beta1
It worked fine (obviously). Then i wanted to add a Tree component to the UI, so I changed my pom.xml to include:
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-compatibility-server</artifactId>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-compatibility-client-compiled</artifactId>
</dependency>
And changed the MyUI class by appending a simple Tree to the layout.
I've cleaned and run the project again (Widgetset was recompiled).
But when I launch the app instead of the Tree I get:
Widgetset 'AppWidgetset' does not contain an implementation for com.vaadin.v7.ui.Tree.
The above is for simplicity, I'm using spring-boot, so If there is some more action involved in making it work with boot please include it.
Hi, good to know that you are enjoying the new version :) Check the following:
- You have to replace the vaadin-server dependency with vaadin-compatibility-server.
- If you are using the default widgetset (you are not compiling it by yourself):
- Replace the vaadin-client-compiled dependency with vaadin-compatibility-client-compiled.
- Add @Widgetset("com.vaadin.v7.Vaadin7WidgetSet") to your UI implementations.
- If you are using a custom widgetset:
- Replace the vaadin-client dependency with vaadin-compatibility-client.
- Recompile it.
The key was the @Widgetset annotation, I got the Tree to work... but now it fails on Charts :(
Widgetset 'com.vaadin.v7.Vaadin7WidgetSet' does not contain an implementation for com.vaadin.addon.charts.Chart...
I'm using 4.0.0-beta1 of charts, which work fine without @Widgetset("com.vaadin.v7.Vaadin7WidgetSet").
Log of widgetset compilation looks the same in both cases.
If you are using Vaadin Charts, that means you have a custom widgetset, so you cannot use the "default" Vaadin7Widgetset. I assume you have a module descriptor, say com/example/Widgetset.gwt.xml file. there, you should have at least:
<inherits name="com.vaadin.DefaultWidgetSet" />
<inherits name="com.vaadin.v7.Vaadin7WidgetSet" />
<inherits name="com.vaadin.addon.charts.Widgetset" />
When compiling with Maven this should be done automatically. You should also have the following in you UI implementation:
@Widgetset("com.example.Widgetset")
public class YourUI extends UI { ... }
I tested it, and it works :) For completeness, here's the full dependencies section of the pom.xml file I used:
<dependencies>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.0.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-push</artifactId>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-themes</artifactId>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-compatibility-server</artifactId>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-compatibility-client</artifactId>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-charts</artifactId>
<version>4.0.0-beta1</version>
</dependency>
</dependencies>
I thought the dark days of XYZWidgetset.gwt.xml have ended since vaadin 7.7 - I for sure was glad having the configuration simplified. Too bad I had to reintroduce it again, is this temporary ?
Anyways I managed to have everything up and running according to your instructions.
However... everything is fine when using 8.0.0.beta1, but when I switch to 8.0-SNAPSHOT (which is what I REALLY want), I get an OutOfMemoryError:
[INFO] Compiling module MyAppWidgetset
[ERROR] Exception in thread "main" java.lang.OutOfMemoryError: GC overhead limit exceeded
[ERROR] at org.eclipse.jdt.internal.compiler.util.HashtableOfObject.<init>(HashtableOfObject.java:38)
[ERROR] at org.eclipse.jdt.internal.compiler.codegen.ConstantPool.<init>(ConstantPool.java:309)
[ERROR] at org.eclipse.jdt.internal.compiler.ClassFile.<init>(ClassFile.java:271)
[ERROR] at org.eclipse.jdt.internal.compiler.ClassFilePool.acquire(ClassFilePool.java:45)
[ERROR] at org.eclipse.jdt.internal.compiler.ClassFile.getNewInstance(ClassFile.java:259)
[ERROR] at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.generateCode(TypeDeclaration.java:537)
[ERROR] at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.generateCode(TypeDeclaration.java:636)
[ERROR] at org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.generateCode(CompilationUnitDeclaration.java:371)
[ERROR] at org.eclipse.jdt.internal.compiler.Compiler.process(Compiler.java:872)
I'll try to increase memory available for maven using MAVEN_OPTS and post back, but anyway this not good news.
No luck.
I've set:
MAVEN_OPTS=-Xms512m -Xmx1512m
JAVA_OPTS=-Xms512m -Xmx1512m
But still got the error, above options do not seem to work on the vaadin-maven-plugin - the process crashes at ~680MB used memory.
Is there a memory configuration option for the vaadin-maven-plugin available ?
Hi,
the widgetset compilation runs in a forked process. To set memory allocation params try to use -Dgwt.extraJvmArgs="-Xms512m -Xmx1512m" on command line or extraJvmArgs property in plugin configuration.
HTH
Marco
I've created a pull request containing the above solution here https://github.com/mike-goetz/spring-boot-vaadin/pull/2
I tested the jpacontainer-addressbook-demo with vaadin 8.1.1 and connat make it run.
Thanks to Alejandro's hints I could fix the problems.
Now it's runnung.
Marco Collovati: Hi,
the widgetset compilation runs in a forked process. To set memory allocation params try to use -Dgwt.extraJvmArgs="-Xms512m -Xmx1512m" on command line or extraJvmArgs property in plugin configuration.HTH
M
Where do you find these configuration files? I'm using Eclipse with Ivy
Alejandro Duarte: Hi, good to know that you are enjoying the new version :) Check the following:
- You have to replace the vaadin-server dependency with vaadin-compatibility-server.
- If you are using the default widgetset (you are not compiling it by yourself):
- Replace the vaadin-client-compiled dependency with vaadin-compatibility-client-compiled.
- Add @Widgetset("com.vaadin.v7.Vaadin7WidgetSet") to your UI implementations.
- If you are using a custom widgetset:
- Replace the vaadin-client dependency with vaadin-compatibility-client.
- Recompile it.
Thank you very much, this fixed my problem!
One small question: When we are using a custom Widgetset, do we still need the `vaadin-compatibility-client-compiled`? We currently have both the `client` and `client-compiled` in our pom.xml.
Greetings,
Kevin
You don't need vaadin-compatibility-client-compiled when using a custom widgetset. However you must inherit com.vaadin.v7.Vaadin7WidgetSet in your .gwt.xml module descriptor. See my previous answer for an example.
Kevin Cruijssen:
Alejandro Duarte: Hi, good to know that you are enjoying the new version :) Check the following:
- You have to replace the vaadin-server dependency with vaadin-compatibility-server.
- If you are using the default widgetset (you are not compiling it by yourself):
- Replace the vaadin-client-compiled dependency with vaadin-compatibility-client-compiled.
- Add @Widgetset("com.vaadin.v7.Vaadin7WidgetSet") to your UI implementations.
- If you are using a custom widgetset:
- Replace the vaadin-client dependency with vaadin-compatibility-client.
- Recompile it.
Thank you very much, this fixed my problem!
One small question: When we are using a custom Widgetset, do we still need the `vaadin-compatibility-client-compiled`? We currently have both the `client` and `client-compiled` in our pom.xml.
Greetings,
Kevin
Yes, you need both. Vaadin `client` is needed for widget set compilation. `Client-compiled` is the library that is deployed with the Vaadin WidgetSets.