Migration V7 to V8 with compatability

Hi folks,
I have a rather large Vaadin project migrating an old clipper dbase system. I want to upgrade to Vaadin 8 and went
through the vaadin:migrate, cleaned up and now eclipse/mvn should run the project. I use the
But now I ran into a WidgetSet problem, that I can not compile a WidgetSet. I use spring-boot with vaadin-spring-boot-starter.

So I have one declaration in the UI class @Widgetset(“de.cd.MyAppWidgetset”)
The I have the maven lines, which run for vaadin 7:

com.vaadin
vaadin-maven-plugin
${vaadin.plugin.version}

-Xmx1G -Xss1024k
${basedir}/target/classes/VAADIN/widgetsets
false
false
OBF
true




update-widgetset
compile





Now I get:

— vaadin-maven-plugin:8.0.6:compile (default-cli) @ CDFrontend —
[INFO]
auto discovered modules [de.cd.MyAppWidgetset]

[INFO]
Using com.vaadin:vaadin-client-compiler version 8.0.6
[INFO]

[INFO]
BUILD FAILURE
[INFO]

[INFO]
Total time: 4.571 s
[INFO]
Finished at: 2017-05-29T22:48:16+02:00
[INFO]
Final Memory: 38M/334M
[INFO]

[ERROR]
Failed to execute goal com.vaadin:vaadin-maven-plugin:8.0.6:compile (default-cli) on project CDFrontend: GWT Module com.vaadin.terminal.gwt.DefaultWidgetSet not found in project sources or resources. → [Help 1]

My idea is, that acrually the vaadin-client-compatability-client should run? Is that right?
Any suggestions?

Peter

Hi,
is there any help out there? How can I tackle the problem?

Peter

Hi,
have you added the dependency to vaadin-compatibility-client-compiled?
And, if you have a custom widgetset xml, are you pointing to com.vaadin.v7.Vaadin7WidgetSet instead of com.vaadin.DefaultWidgetSet?

HTH
Marco

Hi, I just tried to exclude all vaadin-client-compiled, but still the vaadin:compile uses the vaadin-client:

INFO] ------------------------------------------------------------------------
[INFO]
Building CDFrontend 0.0.1-SNAPSHOT
[INFO]

[INFO]
Downloading: http://oss.sonatype.org/content/repositories/vaadin-snapshots/de/cd/b2btool/CDB2BTool/0.0.1-SNAPSHOT/maven-metadata.xml
[INFO]
Downloading: http://maven.vaadin.com/vaadin-addons/de/cd/b2btool/CDB2BTool/0.0.1-SNAPSHOT/maven-metadata.xml
[INFO]

[INFO]
— vaadin-maven-plugin:8.0.6:compile (default-cli) @ CDFrontend —
[INFO]
auto discovered modules [de.cd.MyAppWidgetset]

[INFO]
Using com.vaadin:vaadin-client version 8.0.6
[INFO]
Using com.vaadin:vaadin-client-compiler version 8.0.6
[INFO]

[INFO]
BUILD FAILURE
[INFO]

[INFO]
Total time: 8.869 s
[INFO]
Finished at: 2017-06-02T23:05:01+02:00
[INFO]
Final Memory: 38M/388M
[INFO]

[ERROR]
Failed to execute goal com.vaadin:vaadin-maven-plugin:8.0.6:compile (default-cli) on project CDFrontend: GWT Module com.vaadin.terminal.gwt.DefaultWidgetSet not found in project sources or resources. → [Help 1]

[ERROR]

[ERROR]
To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR]
Re-run Maven using the -X switch to enable full debug logging.
[ERROR]

[ERROR]
For more information about the errors and possible solutions, please read the following articles:
[ERROR]
[Help 1]
http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

My MyAppWidgetset looks like this

<?xml version="1.0" encoding="UTF-8"?>

And in the MyUI class I have
@Widgetset(“de.cd.MyAppWidgetset”)

Peter

How can I get rid of the CustomWidgetSet?

It seems there’s nothing special in your widgetset.
Try to remove it and also remove the @Widgetset annotation; the vaadin plugin will automatically create a widgetset for you based on the addon found on classpath.

And you should have vaadin-client-compiled dependecy, don’t exclude it.

HTH
Marco

Edit:
Sorry, I meant vaadin-compatibility-client-compiled not vaadin-client-compiled

Hi,
i found it. It seems to be an old addon, not compatible with V8, which created the error.

Found it here:
https://stackoverflow.com/questions/42965056/build-fails-after-upgrading-from-vaadin-7-8

Peter

Hi, I am getting a bit crazy… Now this error happens:

[size=2]
[INFO]
Scanning for projects…
[INFO]

[INFO]

[INFO]
Building CDFrontend 0.0.1-SNAPSHOT
[INFO]

[INFO]

[INFO]
— vaadin-maven-plugin:8.0.6:update-widgetset (default-cli) @ CDFrontend —
[INFO]
auto discovered modules [de.cd.AppWidgetset]

[INFO]
Updating widgetset de.cd.AppWidgetset
[INFO]
Adding resource directory to command classpath: C:\Users\klascr\git\CDFrontend\src\main\resources
[INFO]
Using com.vaadin:vaadin-client-compiler version 8.0.6
[INFO]
Widgetsets found from classpath:
[INFO]
org.tepi.filtertable.WidgetSet in jar:file:C:/Users/klascr/.m2/repository/org/tepi/filtertable/filteringtable/1.0.1.v8/filteringtable-1.0.1.v8.jar!/
[INFO]
org.vaadin.jonatan.contexthelp.widgetset.ContexthelpWidgetset in jar:file:C:/Users/klascr/.m2/repository/org/vaadin/jonatan/contexthelp/3.0.0/contexthelp-3.0.0.jar!/
[INFO]
de.cd.AppWidgetset in file:/C:/Users/klascr/git/CDFrontend/src/main/java
[INFO]
org.vaadin.hene.popupbutton.widgetset.PopupbuttonWidgetset in jar:file:C:/Users/klascr/.m2/repository/org/vaadin/addons/popupbutton/3.0.0/popupbutton-3.0.0.jar!/
[INFO]
com.vaadin.v7.Vaadin7WidgetSet in jar:file:C:/Users/klascr/.m2/repository/com/vaadin/vaadin-compatibility-client/8.0.6/vaadin-compatibility-client-8.0.6.jar!/
[INFO]
org.vaadin.ui.NumberFieldWidgetset in jar:file:C:/Users/klascr/.m2/repository/org/vaadin/ui/NumberField/0.2.0/numberfield-0.2.0.jar!/
[INFO]
com.vaadin.DefaultWidgetSet in jar:file:C:/Users/klascr/.m2/repository/com/vaadin/vaadin-client/8.0.6/vaadin-client-8.0.6.jar!/
[INFO]
Addon styles found from classpath:
[INFO]
VAADIN/addons/contexthelp/contexthelp.scss in jar:file:C:/Users/klascr/.m2/repository/org/vaadin/jonatan/contexthelp/3.0.0/contexthelp-3.0.0.jar!/
[INFO]

[INFO]
Search took 18ms
[INFO]

[INFO]
— vaadin-maven-plugin:8.0.6:compile (default-cli) @ CDFrontend —
[INFO]
auto discovered modules [de.cd.AppWidgetset]

[INFO]
Using com.vaadin:vaadin-client-compiler version 8.0.6
[INFO]
Compiling module de.cd.AppWidgetset
[INFO]
[ERROR]
An internal compiler exception occurred
[INFO]
com.google.gwt.dev.jjs.InternalCompilerException: Error constructing Java AST
[INFO]
at com.google.gwt.dev.jjs.impl.GwtAstBuilder.translateException(GwtAstBuilder.java:3980)
[INFO]
at com.google.gwt.dev.jjs.impl.GwtAstBuilder.getInternalCompilerException(GwtAstBuilder.java:4387)
[INFO]
at com.google.gwt.dev.jjs.impl.GwtAstBuilder.createMembers(GwtAstBuilder.java:4079)
[INFO]
at com.google.gwt.dev.jjs.impl.GwtAstBuilder.processImpl(GwtAstBuilder.java:3912)
[INFO]
at com.google.gwt.dev.jjs.impl.GwtAstBuilder.process(GwtAstBuilder.java:3954)
[INFO]
at com.google.gwt.dev.javac.CompilationStateBuilder$CompileMoreLater$UnitProcessorImpl.process(CompilationStateBuilder.java:129)
[INFO]
at com.google.gwt.dev.javac.JdtCompiler$CompilerImpl.process(JdtCompiler.java:384)
[INFO]
at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:470)
[INFO]
at com.google.gwt.dev.javac.JdtCompiler.doCompile(JdtCompiler.java:1092)
[INFO]
at com.google.gwt.dev.javac.CompilationStateBuilder$CompileMoreLater.compile(CompilationStateBuilder.java:325)
[INFO]
at com.google.gwt.dev.javac.CompilationStateBuilder.doBuildFrom(CompilationStateBuilder.java:548)
[INFO]
at com.google.gwt.dev.javac.CompilationStateBuilder.buildFrom(CompilationStateBuilder.java:479)
[INFO]
at com.google.gwt.dev.javac.CompilationStateBuilder.buildFrom(CompilationStateBuilder.java:465)
[INFO]
at com.google.gwt.dev.cfg.ModuleDef.getCompilationState(ModuleDef.java:423)
[INFO]
at com.google.gwt.dev.Precompile.precompile(Precompile.java:222)
[INFO]
at com.google.gwt.dev.Precompile.precompile(Precompile.java:202)
[INFO]
at com.google.gwt.dev.Precompile.precompile(Precompile.java:143)
[INFO]
at com.google.gwt.dev.Compiler.compile(Compiler.java:204)
[INFO]
at com.google.gwt.dev.Compiler.compile(Compiler.java:155)
[INFO]
at com.google.gwt.dev.Compiler.compile(Compiler.java:144)
[INFO]
at com.google.gwt.dev.Compiler$1.run(Compiler.java:118)
[INFO]
at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:55)
[INFO]
at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:50)
[INFO]
at com.google.gwt.dev.Compiler.main(Compiler.java:125)
[INFO]
Caused by: java.lang.NoSuchMethodError: org.eclipse.jdt.internal.compiler.lookup.MethodBinding.isDefaultMethod()Z
[INFO]
at com.google.gwt.dev.jjs.impl.GwtAstBuilder.createMethod(GwtAstBuilder.java:4174)
[INFO]
at com.google.gwt.dev.jjs.impl.GwtAstBuilder.createMembers(GwtAstBuilder.java:4069)
[INFO]
… 21 more
[INFO]
[ERROR]
at ReconnectDialog.java(26): public interface ReconnectDialog
[INFO]
org.eclipse.jdt.internal.compiler.ast.TypeDeclaration
[INFO]

[INFO]
BUILD FAILURE
[INFO]

[INFO]
Total time: 12.915 s
[INFO]
Finished at: 2017-06-03T09:25:30+02:00
[INFO]
Final Memory: 38M/576M
[INFO]

[ERROR]
Failed to execute goal com.vaadin:vaadin-maven-plugin:8.0.6:compile (default-cli) on project CDFrontend: Command [[
[ERROR]
C:\Program Files\Java\jdk1.8.0_101\jre\bin\java -Xmx1024M -Xss1024k -Dgwt.persistentunitcache=false com.google.gwt.dev.Compiler -logLevel INFO -style OBF -war C:\Users\klascr\git\CDFrontend\target\classes\VAADIN\widgetsets -localWorkers 4 -failOnError -XfragmentCount -1 -sourceLevel auto -gen C:\Users\klascr\git\CDFrontend\target.generated de.cd.AppWidgetset
[ERROR]
]] failed with status 1
[ERROR]
→ [Help 1]

[ERROR]

[ERROR]
To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR]
Re-run Maven using the -X switch to enable full debug logging.
[ERROR]

[ERROR]
For more information about the errors and possible solutions, please read the following articles:
[ERROR]
[Help 1]
http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

The created file is this: AppWIdgetSet.gwt.xml

<?xml version="1.0" encoding="UTF-8"?>
<inherits name="com.vaadin.v7.Vaadin7WidgetSet" />



<inherits name="org.tepi.filtertable.WidgetSet" />

<inherits name="org.vaadin.jonatan.contexthelp.widgetset.ContexthelpWidgetset" />

<inherits name="org.vaadin.hene.popupbutton.widgetset.PopupbuttonWidgetset" />

<inherits name="org.vaadin.ui.NumberFieldWidgetset" />

<inherits name="com.vaadin.DefaultWidgetSet" />
[/size]

The plugin is configured like this:

com.vaadin
vaadin-maven-plugin
${vaadin.plugin.version}

-Xmx2048m -Xss2048m
${basedir}/target/classes/VAADIN/widgetsets
false
false
OBF
true




update-theme
update-widgetset
compile
compile-theme




Peter

Hi Vaadin,
still got this gwt error when compiling the widgetset:
Compiling module de.cd.AppWidgetset
[INFO]
[ERROR]
An internal compiler exception occurred
[INFO]
com.google.gwt.dev.jjs.InternalCompilerException: Error constructing Java AST
[INFO]
at com.google.gwt.dev.jjs.impl.GwtAstBuilder.translateException(GwtAstBuilder.java:3980)

I tried

  • rasing the memory,
  • remove my own @Widgetset(“de.cd.AppWidgetset”) with @Widgetset(“com.vaadin.v7.Vaadin7WidgetSet”)
  • I also tried to get rid of any add-on, but that did not help either.

Any help? I am so close to switch to V8 compatability… now this anying bug is happening.

Peter

Hi Peter,

maybe you have a transitive dependency to eclipse jdt compiler. Try to run a mvn dependecny:tree to check this.

HTH
Marco

Hello Marco,
yes, maybe. I will check. In the meantime I found out, that I have a mvn dependency, causing the trouble.
Taking it out, will allow me to compile the widgetset, but not the project, so I saved the widgetset and copied it…
I have a running protototype.

And there I have it, it seems: net.sf.jasperreports has a org.eclipse.jdt.core.compiler:ecj:jar:4.3.1:compile
dependency.

I will check further. Thx for the hint.
Peter

Hi Marco,
thx again…
I added to my jasperreport the newest eclipse compiler and now the WidgetSet builds!

    <dependency>
        <groupId>net.sf.jasperreports</groupId>
        <artifactId>jasperreports</artifactId>
        <version>6.4.0</version>
    </dependency>
    <!-- https://mvnrepository.com/artifact/org.eclipse.jdt.core.compiler/ecj -->
        <dependency>
            <groupId>org.eclipse.jdt.core.compiler</groupId>
            <artifactId>ecj</artifactId>
            <version>4.6.1</version>
        </dependency>

Wonderfull, I have a running V8 compatability service up and running!

Vaadin team did a great job, although I now have a hell of a lot to change to become V8.

Peter