Loading...
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.

Product icon
TUTORIAL

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.

Vaadin 8 + compatibility = widgetset implementation missing for v7 componen

Krzysztof Cichomski
5 years ago Jan 24, 2017 10:24am
Alejandro Duarte
5 years ago Jan 24, 2017 2:29pm

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.
Krzysztof Cichomski
5 years ago Jan 24, 2017 3:44pm
Alejandro Duarte
5 years ago Jan 24, 2017 4:13pm

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>

Krzysztof Cichomski
5 years ago Jan 24, 2017 9:55pm

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.

 

Krzysztof Cichomski
5 years ago Jan 24, 2017 10:08pm
Marco Collovati
5 years ago Jan 24, 2017 10:25pm
Krzysztof Cichomski
5 years ago Jan 25, 2017 9:38am
Krzysztof Cichomski
5 years ago Jan 25, 2017 11:21am
eugen hanussek
4 years ago Aug 14, 2017 4:20pm

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.

Taurai Benhura
4 years ago Sep 07, 2017 2:11pm
Kevin Cruijssen
4 years ago Sep 12, 2017 3:35pm
Alejandro Duarte
4 years ago Sep 12, 2017 3:58pm
Taurai Benhura
4 years ago Sep 12, 2017 4:00pm