Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
Spring MVC portlet migration issue
Hi everyone, we are migrating application from Liferay 6.2 to 7.1 version. We have a mix of Liferay MVC and Spring MVC portlet and also some java module with common utilities. While migrating spring mvc porlet from 6.2 to 7.1 version as a war file the following dependency related issues are facing. Our sprig mvc portlet have dependency with java module which is deployed as an OSGI bundle. In the portlet build.gradle, when we give module dependency as compileOnly, deploying portlet result in class not found exception since spring context unable to locate the class in the dependent module. when we give module dependency as compile, class not found exception not occurring but class cast exception coming since 2 version of the dependent module are available in the OSGI container, ie one in the portlet WEB-INF/lib folder and other one which is deployed in OSGI as a module. your input is much appreciated.
Hi Deepak,
Please take into account the following links, they can be useful for your goal:
https://dev.liferay.com/en/develop/tutorials/-/knowledge_base/7-1/resolving-a-plugins-dependencies#managing-dependencies-manually
https://dev.liferay.com/en/develop/tutorials/-/knowledge_base/7-1/adding-third-party-libraries-to-a-module
I hope it helps.
Please take into account the following links, they can be useful for your goal:
https://dev.liferay.com/en/develop/tutorials/-/knowledge_base/7-1/resolving-a-plugins-dependencies#managing-dependencies-manually
https://dev.liferay.com/en/develop/tutorials/-/knowledge_base/7-1/adding-third-party-libraries-to-a-module
I hope it helps.
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™