0
votes

I have a problem during an portlet deployment. How to resolve?

Liferay (last version). Eclipse + liferay plugin

2019-07-26 19:51:54.531 ERROR [fileinstall-D:/STUDIO JAVA/liferay-dxp-7.2.10-ga1/osgi/modules][LogService:93] Error while starting bundle: file:/D:/STUDIO%20JAVA/liferay-dxp-7.2.10-ga1/osgi/modules/com.prova.jar org.osgi.framework.BundleException: Could not resolve module: com.prova [2197]_ Unresolved requirement: Require-Capability: osgi.ee; filter:="(osgi.ee=UNKNOWN)"_ [Sanitized] at org.eclipse.osgi.container.Module.start(Module.java:444) at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:428) at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1264) at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1237) at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:520) at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:365) at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:316)

1
How do you build your com.prova.jar? Somehow you'll get a bad manifest.mf in there.Olaf Kock
bnd.bnd > Gradle action > BuildCristian Vallecchia
Do you have the recommended JDK 8 or 11? Does the Build work on commandline execution?Andre Albert
Jdk 11, nope, onli gradle actionCristian Vallecchia

1 Answers

2
votes

It seems you hit https://issues.liferay.com/browse/LPS-93643

Long story short, the tooling is using old version of Bnd that does not know how to handle Java 11 runtime.

What you can do as workaround is disable the generation of the osgi.ee requirement. To do so you need to place this instruction in your bnd.bnd file:

-noee: true

As a result, OSGi runtime will not check if the Java version your module expects is compatible with the one of the runtime. It should not cause any issues for as long as you make sure you both build and run with the same Java version.