Closed paulrutter closed 1 month ago
Maybe this instruction could help, i will try: https://bnd.bndtools.org/instructions/jpms-multi-release.html
Probably related to this commit https://github.com/eclipse-ee4j/jersey/pull/5648/files#diff-c5f428df9f7559f2cbd2b51eb8af37214c2ac0dab80414c95d16a7d59b909413
There seems to be support for this, so probably not a jersey issue. See https://github.com/bndtools/bnd/issues/2227
I will close it for now and try to fix it with bnd instructions in the maven bundle plugin first.
You are right, Multi-Release: true
is missing in the MANIFEST.MF.
Right, as in, it's an issue in the maven-bundle-plugin? Or right, it's an issue in Jersey (as well)?
Because using bndlib 7.0.0 seems to work, as it supports MR jars.
It may be an issue in Jersey for certain environments depending on the Multi-Release
field. Your environment may be one of them.
Ok, when upgrading bndlib to 7.0.0 i didn’t notice any build errors anymore though, so not sure what the issue would be then. I will try 3.1.7 in our application and let you know if it works properly or not.
We're running java 21, with Apache Felix as osgi container and Jetty 12 EE 10 btw.
@jansupol I ran the feature build containing 3.1.7 this morning and although compiling and building went fine, the application doesn't start properly due to an OSGi bundle not being able to start.
org.osgi.framework.BundleException: Unable to resolve com.abc.services.openapi [53](R 53.0): missing requirement [com.abc.services.openapi [53](R 53.0)] osgi.extender; (&(osgi.extender=osgi.cdi)(version>=1.0.0)(!(version>=2.0.0))) Unresolved requirements: [[com.abc.services.openapi [53](R 53.0)] osgi.extender; (&(osgi.extender=osgi.cdi)(version>=1.0.0)(!(version>=2.0.0)))]
I would have expected the OSGi bundle containing Jersey would fail (that one just starts properly). Is this in line with the problems you would expect?
No, this looks like some other issue, osgi.cdi
module of a wrong version or missing.
Ok, i will investigate it further and let you know.
Sorry for the confusion @jansupol, that OSGi error is indeed unrelated. After fixing that one, the application just starts properly with Jersey 3.1.7.
When trying to bundle Jersey 3.1.7 as compile dependency in an OSGi bundle via the maven-bundle-plugin (5.1.9, latest), the following error occurs. This didn’t happen with 3.1.6.
Maven version 3.9.x Command:
mvn clean install
Java version 21.1 (corretto)Did anything change in this regard or would this be an issue in the maven bundle plugin from Apache Felix?
Thanks!