You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by Nhut Thai Le <nt...@castortech.com> on 2018/08/02 16:47:37 UTC

Felix resolver takes forever to resolve dependencies

 Hello,

We are trying to integrate Keycloak admin-client and zk into our web app
running on felix using bndtool.

If we use our web app with Keycloak admin-client alone, it's fine.

If we use our web app with zk alone, it's also fine.

When adding both Keycloak admin-client and zk, we are not able to start the
container from bndrun. Looks like the framework resolver get stuck in
resolving dependencies. Here is the stack of the main thread:
Thread [main] (Suspended)
waiting for: AtomicInteger  (id=29)
Object.wait(long) line: not available [native method]
AtomicInteger(Object).wait() line: 502
ResolverImpl$EnhancedExecutor.await() line: 2523
ResolverImpl.calculatePackageSpaces(ResolveSession, Candidates,
Collection<Resource>) line: 1217
ResolverImpl.checkConsistency(ResolveSession, Candidates,
Map<Resource,ResolutionError>) line: 572
ResolverImpl.findValidCandidates(ResolveSession,
Map<Resource,ResolutionError>) line: 532
ResolverImpl.doResolve(ResolveSession) line: 395
ResolverImpl.resolve(ResolveContext, Executor) line: 377
ResolverImpl.resolve(ResolveContext) line: 331
StatefulResolver.resolve(Set<BundleRevision>, Set<BundleRevision>) line: 478
Felix.resolveBundles(Collection<Bundle>) line: 4108
FrameworkWiringImpl.resolveBundles(Collection<Bundle>) line: 133
PackageAdminImpl.resolveBundles(Bundle[]) line: 267
Launcher.startBundles(List<Bundle>) line: 489
Launcher.activate() line: 423
Launcher.run(String[]) line: 301
Launcher.main(String[]) line: 147

A small note here is that Keycloak admin-client uses resteasy which is not
an osgi bundle so I wrap both admin-client, resteasy and its dependencies
in an osgi bundle and enabling service loader mediator header so that the
service files provided in the resteasy dependencies can be loaded.

For debugging I downloaded the source of org.apache.felix.framework but it
has no resolver/RersolverImpl class

I'm not sure what to do to debug this.