Unresolved requirement: Import-Package

Jamie Sammons, modified 2 Years ago. New Member Posts: 10 Join Date: 2/28/23 Recent Posts

I am migrating from Liferay Liferay Digital Experience Platform 7.1.10 GA1 to Liferay Digital Experience Platform 7.4.13 Update 57 from here and trying to deploy a  fi.soveltia.liferay.gsearch.query. I am generating the .jar with gradle.

I am using this version of java to generate the .jar and it is installed in Liferay:

java version "1.8.0_341"
Java(TM) SE Runtime Environment (build 1.8.0_341-b10)
Java HotSpot(TM) 64-Bit Server VM (build 25.341-b10, mixed mode)
Those that when lifting are throwing the following error:

2023-02-28 19:05:58.447 ERROR [Framework Event Dispatcher: Equinox Container: 7386ac2e-71a9-4efb-9771-e0ac4b5e2761][Framework:56] FrameworkEvent ERROR
com.liferay.portal.kernel.log.LogSanitizerException: org.osgi.framework.BundleException: Could not resolve module: fi.soveltia.liferay.gsearch.query [1823]_  Unresolved requirement: Import-Package: com.liferay.portal.kernel.search; version="[7.6.0,8.0.0)"_ [Sanitized]

thumbnail
Jamie Sammons, modified 2 Years ago. Liferay Legend Posts: 14933 Join Date: 9/2/06 Recent Posts

You must be using a wrong version in your build.gradle which is referring to something not in 7.4U57.

Using the target platform and mega-jar can help avoid problems like this.