Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
JUnit Core 1.1.2
-
None
Description
When starting Sling with org.apache.sling.junit.core v 1.1.1-SNAPSHOT, standard output shows many exceptions related to an optional import upon startup.
ERROR: Bundle org.apache.sling.junit.core [189] EventDispatcher: Error during dispatch. (java.lang.NoClassDefFoundError: org/junit/platform/engine/TestEngine)
ERROR: Bundle org.apache.sling.junit.core [189] EventDispatcher: Error during dispatch. (java.lang.NoClassDefFoundError: org/junit/platform/engine/TestEngine)java.lang.NoClassDefFoundError: org/junit/platform/engine/TestEngine at org.apache.sling.junit.impl.servlet.junit5.TestEngineTracker$Customizer.getTestEnginesForBundle(TestEngineTracker.java:83) at org.apache.sling.junit.impl.servlet.junit5.TestEngineTracker$Customizer.addingBundle(TestEngineTracker.java:67) at org.apache.sling.junit.impl.servlet.junit5.TestEngineTracker$Customizer.addingBundle(TestEngineTracker.java:63) at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:475) at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:420) at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256) at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229) at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:450) at org.apache.felix.framework.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:915) at org.apache.felix.framework.EventDispatcher.fireEventImmediately(EventDispatcher.java:834) at org.apache.felix.framework.EventDispatcher.fireBundleEvent(EventDispatcher.java:516) at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4817) at org.apache.felix.framework.Felix.startBundle(Felix.java:2336) at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1539) at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308) at java.base/java.lang.Thread.run(Thread.java:834)
ERROR: Bundle org.apache.sling.junit.core [189] EventDispatcher: Error during dispatch. (java.lang.NoClassDefFoundError: org/junit/platform/engine/TestEngine)java.lang.NoClassDefFoundError: org/junit/platform/engine/TestEngine at org.apache.sling.junit.impl.servlet.junit5.TestEngineTracker$Customizer.getTestEnginesForBundle(TestEngineTracker.java:83) at org.apache.sling.junit.impl.servlet.junit5.TestEngineTracker$Customizer.addingBundle(TestEngineTracker.java:67) at org.apache.sling.junit.impl.servlet.junit5.TestEngineTracker$Customizer.addingBundle(TestEngineTracker.java:63) at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:475) at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:420) at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256) at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229) at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:450) at org.apache.felix.framework.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:915) at org.apache.felix.framework.EventDispatcher.fireEventImmediately(EventDispatcher.java:834) at org.apache.felix.framework.EventDispatcher.fireBundleEvent(EventDispatcher.java:516) at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4817) at org.apache.felix.framework.Felix.startBundle(Felix.java:2336) at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1539) at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308) at java.base/java.lang.Thread.run(Thread.java:834)
ERROR: Bundle org.apache.sling.junit.core [189] EventDispatcher: Error during dispatch. (java.lang.NoClassDefFoundError: org/junit/platform/engine/TestEngine)java.lang.NoClassDefFoundError: org/junit/platform/engine/TestEngine at org.apache.sling.junit.impl.servlet.junit5.TestEngineTracker$Customizer.getTestEnginesForBundle(TestEngineTracker.java:83) at org.apache.sling.junit.impl.servlet.junit5.TestEngineTracker$Customizer.addingBundle(TestEngineTracker.java:67) at org.apache.sling.junit.impl.servlet.junit5.TestEngineTracker$Customizer.addingBundle(TestEngineTracker.java:63) at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:475) at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:420) at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256) at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229) at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:450) at org.apache.felix.framework.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:915) at org.apache.felix.framework.EventDispatcher.fireEventImmediately(EventDispatcher.java:834) at org.apache.felix.framework.EventDispatcher.fireBundleEvent(EventDispatcher.java:516) at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4817) at org.apache.felix.framework.Felix.start(Felix.java:1116) at org.apache.sling.feature.launcher.impl.launchers.AbstractRunner$4.call(AbstractRunner.java:232) at org.apache.sling.feature.launcher.impl.launchers.AbstractRunner$4.call(AbstractRunner.java:228) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:834)
[INFO] Framework started
For instances which do not provide the Junit 5 option, would it be possible to avoid printing (repeatedly) this exception to the console?