We are working on deploying our app developed as an Eclipse PDE app with Oxygen (SCR 1.3 and Felix 2.0.10) in Karaf and finding that it runs newer versions. So we have started to move our target platform to current versions based on Eclipse 2019.3 with SCR 1.4 and Felix 2.1.14.
We are running into an issue with our embedded Infinispan cache. First, we get an error reported by the launch configuration that we are missing a bundle for Blueprint proxy which has started to show up in the new version of Eclipse (regardless of target but has shown no side effect with older target). This is reported as missing a capability for ProxyManager. Adding Blueprint proxy resolves that error but causes a flood of weaving issues reported.Finally we added -Dorg.apache.aries.proxy.weaving.disabled=com.castortech.* to skip all of our own code, which eliminates almost all errors, with a few remaining in terms of Infinispan After many various attempts, have seen a number of issues, so not sure where to start: 1- Noticed error "java.lang.ClassCircularityError: org/apache/aries/proxy/impl/common/OSGiFriendlyClassWriter" 2- Got Resolver issue Now in the new target, Infinispan won't start and is complaining with: RESOLVER: Finding capabilities for requirement osgi.wiring.package; filter:="(osgi.wiring.package=*)"; resolution:="dynamic"; cardinality:="multiple" of resource osgi.identity; osgi.identity="org.infinispan.core"; type="osgi.bundle"; version:Version="9.4.1.Final" RESOLVER: Capabilities being returned to the resolver null wires! org.apache.felix.resolver.reason.ReasonException: Unable to resolve osgi.identity; osgi.identity="org.infinispan.core"; type="osgi.bundle"; version:Version="9.4.1.Final": missing requirement osgi.wiring.package; filter:="(osgi.wiring.package=*)"; resolution:="dynamic"; cardinality:="multiple" at org.apache.felix.resolver.Candidates$MissingRequirementError.toException(Candidates.java:1340) at org.apache.felix.resolver.ResolverImpl.resolveDynamic(ResolverImpl.java:675) at org.eclipse.osgi.container.ModuleResolver$ResolveProcess.resolveDynamic(ModuleResolver.java:1402) at org.eclipse.osgi.container.ModuleResolver$ResolveProcess.resolve(ModuleResolver.java:971) at org.eclipse.osgi.container.ModuleResolver.resolveDynamicDelta(ModuleResolver.java:175) at org.eclipse.osgi.container.ModuleContainer.resolveDynamic(ModuleContainer.java:610) at org.eclipse.osgi.internal.loader.BundleLoader.findDynamicSource(BundleLoader.java:1176) at org.eclipse.osgi.internal.loader.BundleLoader.findResources(BundleLoader.java:747) at org.eclipse.osgi.internal.loader.ModuleClassLoader.getResources(ModuleClassLoader.java:237) at org.infinispan.commons.util.Features.<init>(Features.java:28) at org.infinispan.configuration.global.GlobalConfigurationBuilder.validate(GlobalConfigurationBuilder.java:198) at org.infinispan.configuration.global.GlobalConfigurationBuilder.build(GlobalConfigurationBuilder.java:233) at org.infinispan.manager.DefaultCacheManager.<init>(DefaultCacheManager.java:237) at org.infinispan.manager.DefaultCacheManager.<init>(DefaultCacheManager.java:157) at com.castortech.util.cache.CacheService.activate(CacheService.java:50) and finally at the end: RESOLVER: Resolution report org.infinispan.core [426] Unresolved requirement: Import-Package: *; resolution:="dynamic"; cardinality:="multiple" Next I updated my aries and spifly to see if the circularity error was related, but nothing changed. Then I saw https://www-01.ibm.com/support/docview.wss?uid=swg1PM70234 and made some changes to get the cache started from within my bundle activator. Now I am getting this: Caused by: java.lang.NullPointerException at org.osgi.util.tracker.ServiceTracker.<init>(ServiceTracker.java:187) at org.infinispan.commons.util.ServiceFinder.addOsgiServices(ServiceFinder.java:80) at org.infinispan.commons.util.ServiceFinder.load(ServiceFinder.java:51) at org.infinispan.util.ModuleProperties.resolveModuleLifecycles(ModuleProperties.java:38) which is a call to: private static <T> void addOsgiServices(Class<T> contract, Map<String, T> services) { if (!Util.isOSGiContext()) { return; } 79- final BundleContext bundleContext = FrameworkUtil.getBundle(ServiceFinder.class).getBundleContext(); 80- final ServiceTracker<T, T> serviceTracker = new ServiceTracker<T, T>(bundleContext, contract.getName(), null); since the bundleContext is alwasy null. I even tried changing the start level of the infinispan common bundle that is the one returned by getBundle for ServiceFinder, to no avail. Has anyone seen this issue or something similar that could guide us towards a solution. Thanks Alain
_______________________________________________ OSGi Developer Mail List osgi-dev@mail.osgi.org https://mail.osgi.org/mailman/listinfo/osgi-dev