Vaadin 7 + OSGi + Liferay 6.2 CE GA4

Dear Vaadin + Liferay Experts,

I am experimenting with developing liferay portlets as vaadin based osgi bundles. With Eclipse Luna SR2 I created a plugin project named
com.example.servlet.vaadin.osgi
(see attached file simple_vaadin_osgi_servlet.zip) that is targeted to run with the Equinox OSGi framework.

Using the steps mentioned in
OSGi and Vaadin - Part 1
(
https://vaadin.com/blog/-/blogs/osgi-and-vaadin-part-1
) and
Vaadin & OSGi: managing the classloader
(
https://floriansblog.wordpress.com/2015/04/30/vaadin-osgi-managing-the-classloader/
) I managed to created a working vaadin osgi project. Everything work fine. You may use the included launch configuration (Vaadin OSGi Servlet.launch) to run it in the OSGi environment. The output is visible at
http://localhost:8082/

Next, I wanted to experiment whether I can run such a vaadin application in a non-osgi based environment. To do this I needed a war and so using the Eclipse Libra Tool - WAR Products (
http://download.eclipse.org/libra/releases
), I created a war file from the bundle. I created a warproduct file (vaadinosgi.warproduct) based on the launch configuration (Vaadin OSGi Servlet.launch) and exported all the required and optional bundles/plugins to a war file (com.example.servlet.vaadin.osgi.war). I deployed this to an Apache Tomcat 7 server. If you are using an Eclipse environment to start the Tomcat server, then you need to deploy the war to the <eclipse_workspace>.metadata.plugins\org.eclipse.wst.server.core\tmp0\webapps\ folder. Sometimes a restart maybe required for the deployment of the war file. The war get deployed and the vaadin application is working. The output is visible at
http://localhost:8082/com.example.servlet.vaadin.osgi
. So everything works fine here as well.

As the next step, I wanted to see if I could deploy it to the Liferay portal. I copied the war file to the deploy folder. It gets deployed and I am able to add it as portlet in the portal page. However, I am getting the following error:


Failed to load the bootstrap javascript: ./…/…/…/…/VAADIN/vaadinBootstrap.js

I tried the following steps to rectify the error with no effect

  1. I tried to manually update the vaadin version of liferay as described in
    https://vaadin.com/book/vaadin7/-/page/portal.liferay.html#portal.liferay.remove.
  2. Using the Vaadin Liferay Control Panel tool
    https://vaadin.com/directory#!addon/liferay-control-panel-plugin-for-vaadin.
    The tool/add-on installed properly, but the Vaadin upgrade failed.
  3. Using the Vaadin 7 Control Panel tool from Liferay (
    http://www.liferay.com/web/26526/blog/-/blogs/updating-vaadin-7-shared-environment
    ). The tool upgraded the vaadin version successfully, but I keep receiving the same error

I tried to check whether the war is not deployed correctly. When I accessed http://localhost:8080/com.example.servlet.vaadin.osgi/ on the liferay server, I could see the Vaadin application.

Could someone kindly tell me what I am doing wrong?

Cheers
Arun

See attachement here
20020.zip (17.7 KB)

Honestly it’s amazing that you could load it as a portlet because the attached zip file has none of the standard portlet deployment descriptor (xml) files.