com.vaadin.annotations package missing in vaadin-server MANIFEST.MF Export-Package
I have created a new maven project from com.vaadin:vaadin-archetype-liferay-portlet:8.1.0.beta3 and built it without any single change in any file.
Then I deployed the resulting jar to a plain (no change, again, except initial setting-up wizard) Liferay 7.0 GA4 CE server on localhost (Windows 7).
The bundle was not activated after deployment and trying to force activation from Liferay AppManager produces the following error:
org.osgi.framework.BundleException: Could not resolve module: com.jpaex.sample-portlet [504]_ Unresolved requirement: Import-Package: com.vaadin.annotations; version="[8.1.0,9.0.0)"_ [Sanitized]
Possible cause and solution:
In portlet jar's MANIFEST.MF, these are requested imports (created by biz.aQute.bnd:bnd-maven-plugin:3.3.0 plugin):
Import-Package: [...] ,com.vaadin.annotations;version="[8.1,9)",com.vaadin.osgi.resources;version="[8.1,9)",com.vaadin.server;version="[8.1,9)",com.vaadin.shared;version="[8.1,9)",com.vaadin.shared.ui;version="[8.1,9)", [...]
Vaadin-server 8.1.0.beta3 bundle descriptor (https://github.com/vaadin/framework/blob/8.1.0.beta3/server/bnd.bnd) actually has in "Export-Package" section all other packaged listed in jar's MANIFEST.MF above, except "com.vaadin.annotations*".
So, the export of "!com.vaadin.annotations" is probably missing in bundle descriptor*.
Here's a recap of used environment:
- Eclipse Mars.2 Release (4.5.2)
- Liferay 7.0 GA4 CE
- vaadin-archetype-liferay-portlet version 8.1.0.beta3
- Vaadin version: 8.1.0.beta3
- Windows 7 PC
Hello,
Thanks for your testing of our beta-stage features. For running Vaadin8.1-powered portlets under Liferay 7 you need to deploy a certain set of bundles. Please try to use following documentation pages (not published yet):
https://github.com/vaadin/framework/blob/8758a03ba23c495766f1afe6a10751c0e91f7c57/documentation/portal/portal-osgi.asciidoc
https://github.com/vaadin/framework/blob/891f290051d055bc57b3868145c76f09880dcc3c/documentation/advanced/advanced-osgi.asciidoc
Any feedback and suggestions on that documentation (and on any other vaadin feature or text, of course) would be very appreciated.
Thanks, Ilia. I'll check them out.
One suggestion. I was developing a sample (not for production) Vaadin+Spring application (a set of portlets) on Liferay 6.2 and I would like to port it to Liferay 7.0. For this:
- Vaadin-Spring official addon https://vaadin.com/directory/#!addon/vaadin-spring, which has been ported to Vaadin 8, does not allow portlet development.
- There is an unofficial addon to the official addon https://github.com/peholmst/vaadin4spring/tree/v2.0.0.RELEASE/addons/portlet that adds portlet support and works on Liferay 6.2 (no OSGi).
- Vaadin 8.1 is embedding support for Liferay 7.0, but the addons above are not adapted to OSGi.
So, achieving the combination of Vaadin+Spring+Liferay wasn't easy but was feasible in Liferay 6.2, but now it seems very hard on Liferay 7.
My suggestion is to add a small section to Vaadin documentation for this scenario (Vaadin 8, Spring 4.x/5.x, Liferay 7) which I think is not so uncommon. As an alternative, to develop a basic "Hello World" sample portlet to put on Vaadin GitHub.
Thanks, again.
CT
2017-06-30 15:38 GMT+02:00 Ilia Motornyi [email protected]:
Hello,
Thanks for your testing of our beta-stage features. For running Vaadin8.1-powered portlets under Liferay 7 you need to deploy a certain set of bundles. Please try to following documentation pages (not published yet):
https://github.com/vaadin/framework/blob/8758a03ba23c495766f1afe6a10751 c0e91f7c57/documentation/portal/portal-osgi.asciidoc
https://github.com/vaadin/framework/blob/891f290051d055bc57b3868145c76f 09880dcc3c/documentation/advanced/advanced-osgi.asciidoc
Any feedback and suggestions on that documentation (and on any other vaadin feature or text, of course) would be very appreciated.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/vaadin/framework/issues/9618#issuecomment-312269391, or mute the thread https://github.com/notifications/unsubscribe-auth/ABu_SV4u89JG8a2KrLGrFgnMWL8bO7yqks5sJPpWgaJpZM4OKkSW .
Hello, I having exactly the same issue with the Vaadin version 8.1.0.rc1 It seems that there is no possibility to run even the default osgi portlet according to description from https://vaadin.com/docs/-/part/framework/portal/portal-osgi.html
Any feedback or suggestions to workaround this? TL>
@TomiLii , please note my comment above and links above https://github.com/vaadin/framework/issues/9618#issuecomment-312269391
Ok. the key step is to use blade.jar tool during deployment, it may be worth mention about this in documentation https://vaadin.com/docs/-/part/framework/portal/portal-osgi.html
@TomiLii, it is going to be there as soon as the review process for the change is done.