From fc69222ba5146e5e3d8a7771a610620929ec8822 Mon Sep 17 00:00:00 2001 From: Mathieu Baudier Date: Tue, 30 May 2023 13:47:58 +0200 Subject: [PATCH] Try to start unresolved bundles --- .../src/org/argeo/init/osgi/OsgiBootDiagnostics.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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. */ -- 2.30.2