掲示板

Unresolved requirement: Import-Package, Liferay DXP

6年前 に Durga prasada Rao Kasina によって更新されました。

Unresolved requirement: Import-Package, Liferay DXP

New Member 投稿: 21 参加年月日: 12/07/26 最新の投稿
Hi,

I am trying to use com.liferay.portal.model.Contact in my portlet class but it is throwing below error:
org.osgi.framework.BundleException: Could not resolve module: mylamuserdatamigration [582]_ Unresolved requirement: Import-Package: com.liferay.portal.kernel.exception; version="[7.1.0,8.0.0)"_ [Sanitized]
at org.eclipse.osgi.container.Module.start(Module.java:429)
at org.eclipse.osgi.container.Module.start(Module.java:429)
at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:402)
at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1253)
at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1225)
at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:512)
at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:361)
at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:312)

my build.gradle:
compile group: 'com.liferay.portal', name: 'portal-service', version: '6.2.0-B2'

I am not sure what is the issue here. can anybody help in resolving this issue.
thumbnail
6年前 に Olaf Kock によって更新されました。

RE: Unresolved requirement: Import-Package, Liferay DXP

Liferay Legend 投稿: 6403 参加年月日: 08/09/23 最新の投稿
Durga prasada Rao Kasina:
Hi,

I am trying to use com.liferay.portal.model.Contact in my portlet class but it is throwing below error:
org.osgi.framework.BundleException: Could not resolve module: mylamuserdatamigration [582]_ Unresolved requirement: Import-Package: com.liferay.portal.kernel.exception; version="[7.1.0,8.0.0)"_ [Sanitized]
...

my build.gradle:
compile group: 'com.liferay.portal', name: 'portal-service', version: '6.2.0-B2'
.


I'm not at the computer where I can look up the correct dependencies, but the emphasized portions look suspicious...
6年前 に Durga prasada Rao Kasina によって更新されました。

RE: Unresolved requirement: Import-Package, Liferay DXP

New Member 投稿: 21 参加年月日: 12/07/26 最新の投稿
Correction to my Error message. Getting this error while deploying the code
org.osgi.framework.BundleException: Could not resolve module: mylamuserdatamigration [582]_ Unresolved requirement: Import-Package: com.liferay.portal.model; version="[6.2.0,7.0.0)"_ [Sanitized]
at org.eclipse.osgi.container.Module.start(Module.java:429)
at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:402)
at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1253)
at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1225)
at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:512)
at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:361)

my build.gradle:
compile group: 'com.liferay.portal', name: 'portal-service', version: '6.2.0-B2'
thumbnail
6年前 に Olaf Kock によって更新されました。

RE: Unresolved requirement: Import-Package, Liferay DXP

Liferay Legend 投稿: 6403 参加年月日: 08/09/23 最新の投稿
The third digit in OSGi semantic versioning is, AFAIK, numeric. "0-B2" isn't, and it might be lower than 6.2.0. And you probably don't want a dependency on a beta version from several years ago anyways. Validate if you indeed need to depend on a 6.2 version or if DXP comes with a different version. It won't help if you, at runtime, figure out that the package is 7.1.