Details
Description
Bug reproduction uses Apache Ignite karaf feature with JDK 8. In this case org.apache.ignite.ignite-core plays host to fragment org.apache.ignite.ignite-indexing.
1) Expose
com.sun.management, \ sun.misc, \ sun.nio.ch
in system bundle
(for some reason ignite uses Import-Package to wire these so boot delegation is not enough; we need to append packages to system bundle)
2)
karaf@root()> feature:repo-add mvn:org.apache.ignite/ignite-osgi-karaf/2.6.0/xml/features karaf@root()> feature:install ignite-core karaf@root()> feature:install ignite-indexing
Works fine in 4.2.0 but in 4.2.1 this generates exception:
java.lang.ArrayIndexOutOfBoundsException: -1 at java.util.ArrayList.elementData(ArrayList.java:422) at java.util.ArrayList.set(ArrayList.java:450) at org.apache.felix.resolver.util.ShadowList.replace(ShadowList.java:74) at org.apache.felix.resolver.Candidates.prepare(Candidates.java:941) at org.apache.felix.resolver.ResolverImpl.getInitialCandidates(ResolverImpl.java:505) at org.apache.felix.resolver.ResolverImpl.doResolve(ResolverImpl.java:390) at org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:378) at org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:332) at org.apache.karaf.features.internal.region.SubsystemResolver.resolve(SubsystemResolver.java:257) at org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:388) at org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1025) at org.apache.karaf.features.internal.service.FeaturesServiceImpl.lambda$doProvisionInThread$13(FeaturesServiceImpl.java:964) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Error executing command: -1
Now this does not seem to happen with all fragment-host combinations. But the above example is a reliable way to reproduce the faulty behavior in Karaf 4.2.1.
This might be related to changes introduced in KARAF-5706 but as of yet undetermined.
Attachments
Issue Links
- is blocked by
-
KARAF-6046 Upgrade to Felix Utils 1.11.2
- Resolved