You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the META-INF/MANIFEST.MF of bcpkix-jdk18on (v 1.77) the Import-Package field contains packages of bcprov-jdk18on but with required version 1.72. Therefore it cannot be started as bundle in OSGi with the (related) bcprov-jdk18on-1.77 library due to "Unresolved requirement" which is exporting these packages in the 1.77 version:
FrameworkEvent ERROR (OSGi) org.osgi.framework.BundleException: Could not resolve module: bcpkix [17] Unresolved requirement: Import-Package: org.bouncycastle.asn1.bsi; version="1.72.0" at org.eclipse.osgi.container.Module.start(Module.java:444) at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1634) at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1614) at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1585) at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1528) at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1) at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
Extract of bcpkix-jdk18on-1.77/META-INF/MANIFEST.MF: Import-Package: org.bouncycastle.asn1;version="1.72",org.bouncycastle. asn1.bc;version="1.72",org.bouncycastle.asn1.bsi;version="1.72",org.b ouncycastle.asn1.cmp;version="1.72",org.bouncycastle.asn1.cms;version ="1.72",org.bouncycastle.asn1.cms.ecc;version="1.72",org.bouncycastle
Extract of bcprov-jdk18on-1.77/META-INF/MANIFEST.MF: Export-Package: org.bouncycastle;version="1.77",org.bouncycastle.asn1; version="1.77";uses:="org.bouncycastle.util",org.bouncycastle.asn1.an ssi;version="1.77";uses:="org.bouncycastle.asn1,org.bouncycastle.asn1 .x9",org.bouncycastle.asn1.bc;version="1.77";uses:="org.bouncycastle.
Please align the export and import versions of these librarys.
Or maybe think of removing the Import-Package version qualifier in future, knowing that may cause some runtime issues having multiple versions in OSGi environment (which is not suggested anyway...)
Thanks :)
The text was updated successfully, but these errors were encountered:
So the OSGI imports in 177 are a bit of a mess, we weren't able to get multi-release working properly either. I think that's now fixed though, would you try what's in https://www.bouncycastle.org/betas ? Would appreciate some feedback from someone using OSGI "for real".
Thank you for your fast fix. I took a look into the JARs MANIFESTs which now are looking good regarding the Import Versions!
Sadly the new MANIFEST now also contains imports of JVM java.* packages like java.io which is only allowed within the latest OSGi Specification 7. This needs an up-to-date OSGi framework running, which we are not using at the moment in our legacy system. I currently try to bring our framwork up to date and keep you informed when I tested successfully. This may take a while.
In the META-INF/MANIFEST.MF of bcpkix-jdk18on (v 1.77) the Import-Package field contains packages of bcprov-jdk18on but with required version 1.72. Therefore it cannot be started as bundle in OSGi with the (related) bcprov-jdk18on-1.77 library due to "Unresolved requirement" which is exporting these packages in the 1.77 version:
FrameworkEvent ERROR (OSGi) org.osgi.framework.BundleException: Could not resolve module: bcpkix [17] Unresolved requirement: Import-Package: org.bouncycastle.asn1.bsi; version="1.72.0" at org.eclipse.osgi.container.Module.start(Module.java:444) at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1634) at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1614) at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1585) at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1528) at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1) at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
Extract of bcpkix-jdk18on-1.77/META-INF/MANIFEST.MF:
Import-Package: org.bouncycastle.asn1;version="1.72",org.bouncycastle. asn1.bc;version="1.72",org.bouncycastle.asn1.bsi;version="1.72",org.b ouncycastle.asn1.cmp;version="1.72",org.bouncycastle.asn1.cms;version ="1.72",org.bouncycastle.asn1.cms.ecc;version="1.72",org.bouncycastle
Extract of bcprov-jdk18on-1.77/META-INF/MANIFEST.MF:
Export-Package: org.bouncycastle;version="1.77",org.bouncycastle.asn1; version="1.77";uses:="org.bouncycastle.util",org.bouncycastle.asn1.an ssi;version="1.77";uses:="org.bouncycastle.asn1,org.bouncycastle.asn1 .x9",org.bouncycastle.asn1.bc;version="1.77";uses:="org.bouncycastle.
Please align the export and import versions of these librarys.
Or maybe think of removing the Import-Package version qualifier in future, knowing that may cause some runtime issues having multiple versions in OSGi environment (which is not suggested anyway...)
Thanks :)
The text was updated successfully, but these errors were encountered: