Vaadin Add-ons?


I am running Vaadin stuff on top of Liferay 5x that runs on top of Sun GlassFish v2 with Sun Java 6 with Solaris. I would like to know how to use Add-ons, because these are not working for me for some reason.

For start, I tried to create a very simple app using
(sound player), trying to follow all the steps as described on “Using Add-ons”. Recompiled, built WAR file, deployed. No problems.

Now, when I am trying to use the application, I am getting an error alert in the browser (see attachment) and the following exception on the server side:

[#|2010-05-12T10:44:48.777+0900|SEVERE|sun-appserver2.1|javax.enterprise.system.container.web|_ThreadID=21;_ThreadName=httpSSLWorkerThread-80-1;_RequestID=d49c0345-6ce7-4e54-855d-b32c246d123c;|StandardWrapperValve[Addonstests Application]
: PWC1406: Servlet.service() for servlet Addonstests Application threw exception
        at com.liferay.portal.servlet.filters.gzip.GZipStream.flush(
        at com.vaadin.terminal.gwt.server.AbstractApplicationServlet.criticalNotification(
        at com.vaadin.terminal.gwt.server.AbstractApplicationServlet.handleServiceException(
        at com.vaadin.terminal.gwt.server.AbstractApplicationServlet.service(
        at javax.servlet.http.HttpServlet.service(

Same thing happens, when I just running the sample application without Liferay, although if I type URL for JavaScript in the browser, then I am getting all the resources. Anyone knows what it might be? Looks like GlassFish can not flush stream, because it is already closed for some reasons, if to believe
this source code
. But why? — I can still get JavaScript through the browser of the same URL…

Since I am kind of new to Vaadin, so I am sorry if this is answered somewhere… :slight_smile:

Thanks in advance.


I’ve tried to rebuild WAR in different IDEs to make sure my WAR is as same as all others that works fine. But no joy. :blink:

Which exact Vaadin version are you using?

Here, some exception has occurred in your server-side code, and trying to display a notification about the problem from the servlet seems to lead to this other problem. For this issue, there are at least two possibilities - a bug in how GZip streams are handled by GlassFish 2 or a bug in Vaadin in that a critical notification could in some situation be written to an already closed stream. However, I have never seen that happen before.

Could you try if GlassFish 3 resolves the situation? Note that GlassFish 3.0 has a classloader bug, as a workaround you need to deploy also gwt-user.jar in your WAR.

(With JSR-286, IIRC, the spec would allow the portlet to do what it wants with the output stream - flush it, close it etc. The portlet container should take care of that it works. That said, this is a treacherous marsh of portlet container implementation differences and bugs - Vaadin does its best to get around most of them.)

Although it is unlikely to resolve the underlying problem here, you could also copy your widgetset and themes to be shared statically by the server instead of by the servlet from the JAR. This is recommended for JSR-168 Vaadin portlets (especially in production environments) and required for JSR-286. See the

Version is 6.2.5
Besides, Liferay is same as at — Liferay Portal Standard Edition 5.2.3 (Augustine / Build 5203 / May 20, 2009).

So I am

Will do it later, because this quince bigger beast needs to be installed first. :grin: But I will definitely report you its probably failing result, because I don’t think it is actually stream thing. GlassFish is kind of unzips entire WAR and puts it as files, then gives you anything you ask (here stream is involved, since this part is not static). So, as I said before: these files
available, if you, let’s say, file. It is there and returned. However, app won’t see it…

Yes, I’ve done this, since my Liferay already works this way. But I am not sure how to tell my application in web.xml to let it look for add-ons at shared /html/VAADIN/foo… instead of look at “locally” installed /MyApplication/VAADIN/foo (must be a very dumb question, but could you please forgive me?).

I’m afraid that I don’t know Liferay well enough to pinpoint the problem, but I’d guess that either the shared widgetset does not contain the addons, or the portlet does not use the shared one. Or both.

We have deployed several Liferay projects on Tomcat, so could you please see if you can get it working without Glassfish?

I opened
a ticket
for a guide about this, but don’t hold your breath; it’s vacation season, and our R&D guys are plenty busy with other stuff, too :slight_smile: