Displaying a Vaadin Portlet in Liferay without Login

I am using Liferay 6.1.1 and Vaadin 6.8.9 to develop portlets. If I place a Vaadin portlet on a public page that does not require login and I go to that page without login, the portlet does not render. When I login and go to the same page, the portlet renders just fine. I am able to bring up the Vaadin debug window without login to liferay, but when press the “AL” button to analyze the view I get a bunch of JavaScript errors…


Communication error: (SyntaxError): Unexpected token )
 stack: SyntaxError: Unexpected token )
    at eX (http://localhost:8080/dws-mycase-portlet/VAADIN/widgetsets/gov.utah.dws.mycase.widgetset.myCaseWidgetset/FCF7B87393606EB2720AAB2CA78AD90C.cache.html:1831:67)
    at Object.rX (http://localhost:8080/dws-mycase-portlet/VAADIN/widgetsets/gov.utah.dws.mycase.widgetset.myCaseWidgetset/FCF7B87393606EB2720AAB2CA78AD90C.cache.html:3288:29147)
    at Xm (http://localhost:8080/dws-mycase-portlet/VAADIN/widgetsets/gov.utah.dws.mycase.widgetset.myCaseWidgetset/FCF7B87393606EB2720AAB2CA78AD90C.cache.html:2502:137)
    at Object.wn (http://localhost:8080/dws-mycase-portlet/VAADIN/widgetsets/gov.utah.dws.mycase.widgetset.myCaseWidgetset/FCF7B87393606EB2720AAB2CA78AD90C.cache.html:3285:27643)
    at XMLHttpRequest. (http://localhost:8080/dws-mycase-portlet/VAADIN/widgetsets/gov.utah.dws.mycase.widgetset.myCaseWidgetset/FCF7B87393606EB2720AAB2CA78AD90C.cache.html:1804:64)
    at Rb (http://localhost:8080/dws-mycase-portlet/VAADIN/widgetsets/gov.utah.dws.mycase.widgetset.myCaseWidgetset/FCF7B87393606EB2720AAB2CA78AD90C.cache.html:1418:29)
    at Ub (http://localhost:8080/dws-mycase-portlet/VAADIN/widgetsets/gov.utah.dws.mycase.widgetset.myCaseWidgetset/FCF7B87393606EB2720AAB2CA78AD90C.cache.html:2743:59)
    at XMLHttpRequest.onreadystatechange (http://localhost:8080/dws-mycase-portlet/VAADIN/widgetsets/gov.utah.dws.mycase.widgetset.myCaseWidgetset/FCF7B87393606EB2720AAB2CA78AD90C.cache.html:1957:45) - Original JSON-text:

Again, everything works great after I login to Liferay. Any ideas?

Here are the errors not obfuscated…


Communication error: (SyntaxError): Unexpected token )
 stack: SyntaxError: Unexpected token )
    at parseJSONResponse (http://localhost:8080/dws-mycase-portlet/VAADIN/widgetsets/gov.utah.dws.mycase.widgetset.myCaseWidgetset/E42E5AB47376E9CA56FF4D367723E79A.cache.html:12329:32)
    at Object.onResponseReceived (http://localhost:8080/dws-mycase-portlet/VAADIN/widgetsets/gov.utah.dws.mycase.widgetset.myCaseWidgetset/E42E5AB47376E9CA56FF4D367723E79A.cache.html:12497:12)
    at $fireOnResponseReceived (http://localhost:8080/dws-mycase-portlet/VAADIN/widgetsets/gov.utah.dws.mycase.widgetset.myCaseWidgetset/E42E5AB47376E9CA56FF4D367723E79A.cache.html:3268:14)
    at Object.onReadyStateChange (http://localhost:8080/dws-mycase-portlet/VAADIN/widgetsets/gov.utah.dws.mycase.widgetset.myCaseWidgetset/E42E5AB47376E9CA56FF4D367723E79A.cache.html:3488:5)
    at XMLHttpRequest. (http://localhost:8080/dws-mycase-portlet/VAADIN/widgetsets/gov.utah.dws.mycase.widgetset.myCaseWidgetset/E42E5AB47376E9CA56FF4D367723E79A.cache.html:11085:13)
    at apply (http://localhost:8080/dws-mycase-portlet/VAADIN/widgetsets/gov.utah.dws.mycase.widgetset.myCaseWidgetset/E42E5AB47376E9CA56FF4D367723E79A.cache.html:376:21)
    at entry0 (http://localhost:8080/dws-mycase-portlet/VAADIN/widgetsets/gov.utah.dws.mycase.widgetset.myCaseWidgetset/E42E5AB47376E9CA56FF4D367723E79A.cache.html:406:16)
    at XMLHttpRequest.onreadystatechange (http://localhost:8080/dws-mycase-portlet/VAADIN/widgetsets/gov.utah.dws.mycase.widgetset.myCaseWidgetset/E42E5AB47376E9CA56FF4D367723E79A.cache.html:391:14) - Original JSON-text:

First the usual culprit: make sure that the widgetset you are actually using matches the Vaadin version used for the portlet. Recompile the widgetset (e.g. with Vaadin Control Panel for Liferay) if necessary.

If that is not the issue, try to check what is inside the portlet div using FireBug or other browser debug tools. Is all of the application there but just with zero size or not? Does the Vaadin debug window show any error messages or other strange output.

You can also approach this from the other side, putting a breakpoint in AbstractApplicationPortlet.handleRequest() to check that the portal at least asks the portlet to render itself, but most likely it does if the debug window is shown with “?debug”.

If there are multiple Vaadin portlets on the page, test without the other ones to see if they cause some conflict.

I may be wrong, but the new forum portlet (Tori) seems to exhibit this same behavior. When I sign-in to www.vaadin.com, the new forum shows up. However, if I go to the new forum as a guest user (not signed-in), I don’t see the new forum. I get a blank.