1

I have a Vaadin 8.6.1 project that worked with no problems till now, when suddenly it fails compiling: nothing in the code or in the pom is changed.

The command I'm running is clean package -e , but the problem is the same even if I launch jetty:run

This is the error stacktrace

[INFO] Compiling module AppWidgetset
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 02:13 min
[INFO] Finished at: 2018-11-30T12:03:26+01:00
[INFO] Final Memory: 80M/732M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.vaadin:vaadin-maven-plugin:8.6.1:compile (default) on project eglobal: Command [[
[ERROR] C:\Program Files\Java\jdk1.8.0_161\jre\bin\java -Xmx1G -Dgwt.persistentunitcache=false com.google.gwt.dev.Compiler -logLevel INFO -style OBF -war C:\Sviluppo\workspaceIntelliJ\eglobalMaven\target\classes\VAADIN\widgetsets -localWorkers 4 -failOnError -XfragmentCount -1 -sourceLevel auto -gen C:\Sviluppo\workspaceIntelliJ\eglobalMaven\target\.generated AppWidgetset
[ERROR] ]] failed with status 1
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.vaadin:vaadin-maven-plugin:8.6.1:compile (default) on project eglobal: Command [[
C:\Program Files\Java\jdk1.8.0_161\jre\bin\java -Xmx1G -Dgwt.persistentunitcache=false com.google.gwt.dev.Compiler -logLevel INFO -style OBF -war C:\Sviluppo\workspaceIntelliJ\eglobalMaven\target\classes\VAADIN\widgetsets -localWorkers 4 -failOnError -XfragmentCount -1 -sourceLevel auto -gen C:\Sviluppo\workspaceIntelliJ\eglobalMaven\target\.generated AppWidgetset
]] failed with status 1
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
    at org.codehaus.classworlds.Launcher.main(Launcher.java:47)
Caused by: org.apache.maven.plugin.MojoExecutionException: Command [[
C:\Program Files\Java\jdk1.8.0_161\jre\bin\java -Xmx1G -Dgwt.persistentunitcache=false com.google.gwt.dev.Compiler -logLevel INFO -style OBF -war C:\Sviluppo\workspaceIntelliJ\eglobalMaven\target\classes\VAADIN\widgetsets -localWorkers 4 -failOnError -XfragmentCount -1 -sourceLevel auto -gen C:\Sviluppo\workspaceIntelliJ\eglobalMaven\target\.generated AppWidgetset
]] failed with status 1
    at org.codehaus.mojo.gwt.shell.CompileMojo.compile(CompileMojo.java:582)
    at org.codehaus.mojo.gwt.shell.CompileMojo.doExecute(CompileMojo.java:435)
    at org.codehaus.mojo.gwt.shell.AbstractGwtShellMojo.execute(AbstractGwtShellMojo.java:182)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
    ... 21 more
Caused by: org.codehaus.mojo.gwt.shell.JavaCommandException: Command [[
C:\Program Files\Java\jdk1.8.0_161\jre\bin\java -Xmx1G -Dgwt.persistentunitcache=false com.google.gwt.dev.Compiler -logLevel INFO -style OBF -war C:\Sviluppo\workspaceIntelliJ\eglobalMaven\target\classes\VAADIN\widgetsets -localWorkers 4 -failOnError -XfragmentCount -1 -sourceLevel auto -gen C:\Sviluppo\workspaceIntelliJ\eglobalMaven\target\.generated AppWidgetset
]] failed with status 1
    at org.codehaus.mojo.gwt.shell.JavaCommand.execute(JavaCommand.java:330)
    at org.codehaus.mojo.gwt.shell.CompileMojo.compile(CompileMojo.java:578)
    ... 25 more
[ERROR] 
[ERROR] 

But if I try to launch mvn vaadin:update-widgetset , it works with no errors.

These are the relevant parts of my pom:

<properties>
    <vaadin.version>8.6.1</vaadin.version>
    <vaadin.plugin.version>8.6.1</vaadin.plugin.version>
    <jetty.plugin.version>9.4.11.v20180605</jetty.plugin.version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>
</properties>

This is the vaadin plugin

<plugin>
            <groupId>com.vaadin</groupId>

            <artifactId>vaadin-maven-plugin</artifactId>
            <version>${vaadin.plugin.version}</version>
            <executions>
                <execution>
                    <goals>
                        <goal>update-theme</goal>
                        <goal>update-widgetset</goal>
                        <goal>compile</goal>
                        <goal>compile-theme</goal>

                    </goals>
                </execution>
            </executions>
            <configuration>
                <gwtSdkFirstInClasspath>true</gwtSdkFirstInClasspath> 
            </configuration>
        </plugin>

What can I do to fix this problem? I can't find a way to act for solving this . I'm using IntelliJ Idea x64, Java 1.8, Windows 7

Leviand
  • 2,745
  • 4
  • 29
  • 43
  • it looks like the widget compilation fails and the real error is not part of your snippet. If the real error is hidden from you, you might have to look in your target (i am no maven user, but e.g. the gradle plugin generates a log file for the widgetset compilation) – cfrick Nov 30 '18 at 11:31
  • the argument `-e` that I'm using is for showing errors in maven: I've checked the target folder as you suggested, but I can't find any log or txt related to maven compilation :( – Leviand Nov 30 '18 at 11:35
  • have you tried with `-X` for maven? this problem is most likely related to a (transitive) deps change (classic examples are e.g. javax.validation 1.0 vs 1.1) – cfrick Nov 30 '18 at 11:41
  • The GWT compile command that fails is actually visible in the error message above, but not the output of the execution. Maybe you can try to run that on command line separately to see the output? You would be looking for INFO-lines like here: https://stackoverflow.com/questions/24002029/gwt-maven-plugin-compile-fails-with-status-1 – eeq Nov 30 '18 at 12:56
  • @cfrick I've tried with `-X` : it sends a lot of stuff, but nothing at all after the `Compiling module AppWidgetset` message: that part isn't changed at all. I'm rerunning now, let's see if something comes to my eyes – Leviand Nov 30 '18 at 13:13
  • @eeq I've tried running that command alone, but it gives me an error: `Error: Could not find or load main class com.google.gwt.dev.Compiler` – Leviand Nov 30 '18 at 13:20
  • @cfrick I've sent the output of the compilation to a txt file: there are no errors inside of it except for the ones I've posted – Leviand Nov 30 '18 at 13:32
  • @Leviand missing GWT compiler would indeed cause something like this. Tested with my IntelliJ and I do get a really long list of GWT compilation details starting with `[INFO] auto discovered modules [AppWidgetset] [INFO] Using com.vaadin:vaadin-client version 8.6.1 [INFO] Using com.vaadin:vaadin-client-compiler version 8.6.1 [INFO] Compiling module AppWidgetset [INFO] Computing all possible rebind results for 'com.vaadin.client.metadata.ConnectorBundleLoader' ...`. If you don't get these, it is likely that your compilation does not event start. – eeq Dec 01 '18 at 06:57
  • Could you provide the output of -X ? if its really really long maybe put that on a third-party-page (e.g. for sharing pastes) and in case we find the culprit we could still add the relevant parts here. – cfrick Dec 01 '18 at 11:30
  • 1
    I find this odd "C:\Program Files\Java\jdk1.8.0_161\jre\bin\java", shouldn't it be "C:\Program Files\Java\jdk1.8.0_161\bin\java", is your JAVA_HOME pointing to JRE subfolder for some odd reason? – Tatu Lund Dec 01 '18 at 13:09
  • @TatuLund , as said in the question, I've changed nothing in my project or in my code: everything was working fine till then, I don't think java home should be the problem: btw, my JAVA_HOME points to `C:\Program Files\Java\jdk1.8.0_161` – Leviand Dec 03 '18 at 08:11
  • Ok guys, I've found the source of the problem: THE PROXY. I don't know WHY, but I've detached my laptop from company network and I've run that connected to my phone in hotspot, and the compilation went fine... who is this connected to widgetset compilation?!?! Doesn't make any sense to me ... – Leviand Dec 03 '18 at 09:10

1 Answers1

2

After various tries, I've found that the problem was our company proxy.

After disconnecting my laptop from company network, and connecting it outside of it, directly on internet, I could compile without problems.

I've talked to Vaadin support, who guessed that the licence was trying to contact Vaadin server for verify it was valid, but ended with this error, which didn't refer to this failed connection.

In fact, after the successful compilation, I was able to compile again, even behind proxy.

Leviand
  • 2,745
  • 4
  • 29
  • 43