Vaadin Addon errors when building CUBA app

Hi everyone,

I’m trying to use this Vaadin addon

I’ve built the addon and added it to my MavenLocal repository like this.

mvn install:install-file -Dfile=target/postmessage-1.1.0.jar -DgroupId=com.vaadin.pekka -DartifactId=postmessage -Dversion=1.1.0 -Dpackaging=jar

It uses vaadin-client and vaadin-server and I changed the Vaadin Version to 7.7.13

That all seemed to work fine. I followed the CUBA instructions to add the addon using
<dependency> <groupId>org.vaadin.pekka</groupId> <artifactId>postmessage</artifactId> <version>1.1.0</version> </dependency>

and checked the Maven Local Repository setting.

Building the project caused a bunch of errors.

I changed this in the build.graddle file
compile('org.vaadin.pekka:postmessage:1.1.0') { exclude(group: 'com.vaadin') }

I also tried recompiling the addon changing the Vaadin Version from 7.7.13 to 7.7.13.cuba.6

Both these eliminated a lot of errors but I’m still left with a couple of issues and can’t seem to work out what to do to fix them.

> Compiling module
>  Tracing compile failure path for type 'com.vaadin.pekka.postmessage.client.iframe.PostMessageIFrameConnector'
>  [ERROR] Errors in 'jar:file:/Users/johnmooney/.m2/repository/org/vaadin/pekka/postmessage/1.1.0/postmessage-1.1.0.jar!/com/vaadin/pekka/postmessage/client/iframe/'
>  [ERROR] Line 56: Referencing method 'com.vaadin.client.ApplicationConnection.doSendPendingVariableChanges()': unable to resolve method in class 'com.vaadin.client.ApplicationConnection'
>  Tracing compile failure path for type 'com.vaadin.pekka.postmessage.client.receiver.PostMessageReceiverConnector'
>  [ERROR] Errors in 'jar:file:/Users/johnmooney/.m2/repository/org/vaadin/pekka/postmessage/1.1.0/postmessage-1.1.0.jar!/com/vaadin/pekka/postmessage/client/receiver/'
>  [ERROR] Line 79: Referencing method 'com.vaadin.client.ApplicationConnection.doSendPendingVariableChanges()': unable to resolve method in class 'com.vaadin.client.ApplicationConnection'
>  [ERROR] Aborting compile due to errors in some input files
> :app-web-toolkit:buildWidgetSet FAILED
> FAILURE: Build failed with an exception.
> * What went wrong:
> Execution failed for task ':app-web-toolkit:buildWidgetSet'.
> > Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_151.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1
> * Try:
> Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
> * Get more help at
> 26 actionable tasks: 26 executed
> [20:14:40.730] Task 'assemble' failed
> org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_151.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1

Any help greatly appreciated.


The mentioned addon contains a client side, so this means that you need to inherit its widgetset. In order to do this:

  1. Add web toolkit module to your project
  2. Add the following line to the AppWidgetSet.gwt.xml file right after CUBA WidgetSet:
<inherits name="com.vaadin.pekka.postmessage.PostmessageaddonWidgetset"/>
  1. Try to recompile the project.

I’ve successfully added the PostMessageAddon with 1.0.1 version since there is no need to build it manually.

1 Like

Hi Gleb

I have that line in my file but mine is in red which seems like it can’t find it.

I noticed in the addon code there is reference to doSendPendingVariableChanges() in the GWT code

/*-{ conn.@com.vaadin.client.ApplicationConnection::doSendPendingVariableChanges()(); }-*/;

which I think should be changed to

/*-{ conn.@com.vaadin.client.ApplicationConnection::getServerRpcQueue().flush()(); }-*/;

When I do that the App seems to compile but I’m not sure if the Widgetset is OK.

I’m not sure what your project is like to get it added so easily. I’ve had major troubles.

Here my project. (80.2 KB)