From: Mathieu Baudier Date: Tue, 30 May 2023 11:47:58 +0000 (+0200) Subject: Try to start unresolved bundles X-Git-Tag: v2.3.17~3 X-Git-Url: http://git.argeo.org/?a=commitdiff_plain;h=fc69222ba5146e5e3d8a7771a610620929ec8822;p=lgpl%2Fargeo-commons.git Try to start unresolved bundles --- diff --git a/org.argeo.init/src/org/argeo/init/osgi/OsgiBootDiagnostics.java b/org.argeo.init/src/org/argeo/init/osgi/OsgiBootDiagnostics.java index 72d9a3e64..b56b6b070 100644 --- a/org.argeo.init/src/org/argeo/init/osgi/OsgiBootDiagnostics.java +++ b/org.argeo.init/src/org/argeo/init/osgi/OsgiBootDiagnostics.java @@ -21,6 +21,7 @@ class OsgiBootDiagnostics { public OsgiBootDiagnostics(BundleContext bundleContext) { this.bundleContext = bundleContext; } + /* * DIAGNOSTICS */ @@ -42,6 +43,17 @@ class OsgiBootDiagnostics { if (unresolvedBundles.size() != 0) { OsgiBootUtils.warn("Unresolved bundles " + unresolvedBundles); } + + // try to start unresolved bundles in order to trigger diagnostics + // (this should not have side-effects since unresolved bundles won't be able to + // start) + for (Bundle b : unresolvedBundles) { + try { + b.start(); + } catch (Exception e) { + e.printStackTrace(); + } + } } /** List packages exported twice. */