-
Notifications
You must be signed in to change notification settings - Fork 728
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VaadinPortlet NoClassDefFoundError with Liferay #12575
Comments
This is follow-up to #12569 |
Vaadin 8.19-SNAPSHOT as bnd.bnd to vaadin-portlet and it should be used as OSGi module now. At PortletUIServiceTrackerCustomizer.java:114 there is "new OsgiVaadinPortlet()". Something goes wrong with OSGi, as based on the stacktrace Osgi class loader fails to find VaadinPortlet.
So to me the problem looks like that vaadin-portlet is not activated yet. Did you start it with blade before vaadin-liferay-integration? |
We found a typo in bnd.bnd, which may explain the problem. We will release 8.19.1 soon, which hopefully has correctly formed bnd.bnd. |
Thanks for the info, Tatu. I just re-tested my test Liferay portlet in 7.4.3.22 / 8.17.0 and the portlet appeared fine. I then moved to 7.4.3.22 / 8.19-SNAPSHOT and got the VaadinPortlet class not found error. The test portlets are exactly the same except for Vaadin version and dependency addition for vaadin-portlet in pom.xml. I will test more with 8.19.1 (or 8.19-SNAPSHOT) when available. |
I made some tests in my Liferay+Vaadin test bench and I think I got latest Liferay version (7.4.3.60) to work with latest Vaadin 8 version (8.19.0) by customizing vaadin-portlet and vaadin-liferay-integration. I downloaded the sources for the two above libraries and made the following modifications: vaadin-portlet
vaadin-liferay-integration
|
Thanks for your effort and good input. This finding is aligned with our own analysis. |
I'm making these modifications to Vaadin 8; I'll give you an extra update once a new 8.20 snapshot is available so that you can verify that the modifications work for you as well. Since these changes necessitate code changes for users, the next Vaadin version released will be 8.20.0. |
Hi, @mikke-alekstra I've been unable to reach you through Expert Chat; could you try the latest 8.20-SNAPSHOT to check if deployment works? |
Hi, @thevaadinman. You can reach me now in Expert Chat. Vaadin-portlet does not start probably because there is a typo in the manifest. |
@mikke-alekstra.. yes, of course a typo managed to sneak its way into the commit. :) |
@thevaadinman no luck. The problem might relate to vaadin-portlet.jar that contains com.vaadin.server stuff. When I tested this I had only com.vaadin.portlet classes in vaadin-portlet.jar. All com.vaadin.server classes were taken from vaadin-server.jar.
|
Then there's something still going wrong with the packaging, as the actual |
Ok, I've tweaked the build and manifest a bit and confirmed that |
It went further but when deploying my Vaadin widgetset library I got the error Noticed that my library tries to access com.vaadin.osgi.resources classes from vaadin-portlet because vaadin-portlet exports that package (there are no such classes in vaadin-portlet). This probably is an unnecessary export. Could you try to remove com.vaadin.osgi.resources from vaadin-portlet export packages? Here is a part from current vaadin-portlet manifest:
|
I suspect you're correct, it appears to be an accidental holdover. |
New snapshot has been released. |
It is getting closer. When I deploy a portlet I get I think you should add (at least) com.vaadin.util to vaadin-portlet's Import Packages. Probably also com.vaadin.ui, com.vaadin.shared.util (not sure but there is an import from there in vaadin-portlet source code). |
@mikke-alekstra, I tweaked the imports to include com.vaadin.util, com.vaadin.ui and com.vaadin.shared. New build is live, give it a try. |
It went further again. Unfortunately We probably need these four more imports as there packages are imported in vaadin-portlet's java code: |
@mikke-alekstra, imports added, new snapshot build is live. |
@thevaadinman, thank you! After some initial tests I am successfully running a few weeks old Liferay 7.4.3.60-ga60 release with current Vaadin 8.20-SNAPSHOT. Liferay started well, there are no Vaadin errors in startup and after a few random tests portlets function well, producing no errors. |
@mikke-alekstra thank you for your patience and assistance in getting this tweaked! I've understood that a gift is about to be sent your way. :) |
You are welcome and thanks! I will keep this snapshot running in our lab switch over to 8.20.0 as soon as it is released. |
8.20.0 release is in progress; closing ticket. |
Quick tested with official 8.20.0. Still looking good. |
Liferay 7.4.3.22
Vaadin 8.19-SNAPSHOT
vaadin-compatibility-client-compiled-8.19-20230105.135656-11.jar
vaadin-compatibility-server-8.19-20230105.135536-12.jar
vaadin-compatibility-shared-8.19-20230105.135446-12.jar
vaadin-compatibility-themes-8.19-20230105.135708-11.jar
vaadin-liferay-integration-8.19-20230105.135714-11.jar
vaadin-osgi-integration-8.19-20230105.135718-11.jar
vaadin-portlet-8.19-20230105.135304-12.jar
vaadin-server-8.19-20230105.135253-12.jar
vaadin-shared-8.19-20230105.135044-12.jar
vaadin-themes-8.19-20230105.135438-12.jar
After deploying a portlet I get an error
java.lang.NoClassDefFoundError: com/vaadin/server/VaadinPortlet
Please find attached the stack trace
stack_trace.txt
Bundle information for vaadin-portlet
For reference I copied bundle information for vaadin-liferay-integration, too
The text was updated successfully, but these errors were encountered: