Hi,
I’m using Eclipse Juno with the Vaadin IDE pluggin, liferay-portal-6.1.2-ce-ga3.
I’m trying to display a vaadin Calendar in a Liferay portlet.
Creating a Liferay-Vaadin project with a simple “Hello Vaadin user!”, everything is working fine.
After that, I’ve added the “vaadin-calendar-2.0.0.jar” in my WEB-INF/lib folder and the following source code :
Calendar calend = new Calendar("toto");
GregorianCalendar start = new GregorianCalendar();
GregorianCalendar end = new GregorianCalendar();
end.add(java.util.Calendar.HOUR, 1);
calend.addEvent(new BasicEvent("Calendar study",
"Learning how to use Vaadin Calendar",
start.getTime(), end.getTime()));
No error is detected in Eclipse, but when I redeploy it and run it, i get this :
I’ve seen in the forum that to resolve it, I had to add the vaadin-server-7.1.5.jar in my WEB-inf/lib folder.
No problem, I do it, but this is when the bad stuff starts :
Eclipse tells me that the “window.addComponent” method is not existing anymore.
Console shows me :
javax.portlet.PortletException: java.lang.NoClassDefFoundError: com/vaadin/shared/Connector
javax.portlet.PortletException: java.lang.NoClassDefFoundError: com/vaadin/shared/Connector
at com.vaadin.terminal.gwt.server.AbstractApplicationPortlet.handleServiceException(AbstractApplicationPortlet.java:1386)
at com.vaadin.terminal.gwt.server.AbstractApplicationPortlet.handleRequest(AbstractApplicationPortlet.java:491)
at com.vaadin.terminal.gwt.server.AbstractApplicationPortlet.doDispatch(AbstractApplicationPortlet.java:735)
I’m using Vaadin 7 (I have copied all jar files except vaadin-client and vaadin-client-compiler to WEB-INF/lib from the all-in-one archive file)
I only have ant build files and classpath, no dependency management system.
And your vaadin jars all have the same version because it kinda sounds to me like you’re trying to use a 7.1.5 shared jar with lower versioned other jars?
The vaadin-server.jar without a version looks a bit weird to me. You might want to remove that.
The Calendar addon might still work but since Vaadin 7.1 the Calendar is already in vanilla Vaadin so there is no need to use an addon for that you can use it right from the vaadin jars.
It was the 7.1.5 version but I removed the version, now I’ve removed it entirely to let only the vaadin-server-7.1.5.jar.
I also have removed the addon jars.
I have re-done my imports but I still have :
java.lang.Error: Unresolved compilation problem:
The method addComponent(Label) is undefined for the type Window
This is part of what I don’t understand :
When I do create a new Liferay project, I can choose a “Vaadin portlet framework”, but this one is created without widgetset folder…
Is this a Liferay plugin problem?
On Liferay, there is normally one shared widgetset for the portal, which includes all the widgets used by the various portlets.
The easiest way to compile the widgetset on a portal is to use Vaadin Control Panel for Liferay. The control panel for Vaadin 6 can be found
in the Directory and the one for Vaadin 7 is
available in GitHub with a final binary release coming soon.
Do you know the shared widgetset default path? I just can’t find it, and when I use the “Compile widgetset” button in my vaadin control panel portlet, a red “!” is just shown.
I have followed Liferay precos : https://www.liferay.com/fr/community/wiki/-/wiki/Main/Developing+Vaadin+Applications+as+Liferay+Portlets
putting in my “portal-ext.properties” the propertie :
vaadin.widgetset=com.vaadin.portal.gwt.PortalDefaultWidgetSet
but it seems it’s not found.