Community
Participate
Working Groups
Build Identifier: 3.5.2, 20100218-1602 Try to run a JUnit Plug-in test from a bundle that has unresolved dependencies (happens quite often by mistake). The error message in this case is "No Classloader found for plug-in ...". I have seen this causing confusion for beginners who might not know what a classloader is. It should be something like "Bundle ... has unresolved dependencies". Exception in thread "WorkbenchTestable" java.lang.IllegalArgumentException: No Classloader found for plug-in org.rcpmail.test at org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunner.getClassLoader(RemotePluginTestRunner.java:77) at org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunner.getTestClassLoader(RemotePluginTestRunner.java:71) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.loadClass(RemoteTestRunner.java:693) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.loadClasses(RemoteTestRunner.java:429) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:452) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) at org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunner.main(RemotePluginTestRunner.java:62) at org.eclipse.pde.internal.junit.runtime.NonUIThreadTestApplication.runTests(NonUIThreadTestApplication.java:23) at org.eclipse.ui.internal.testing.WorkbenchTestable$1.run(WorkbenchTestable.java:71) at java.lang.Thread.run(Thread.java:637) Reproducible: Always
Created attachment 163183 [details] patch to clarify error message
Created attachment 163184 [details] mylyn/context/zip
Comment on attachment 163183 [details] patch to clarify error message Applied. Modified the message slightly.
Fixed.
Verified.
Hmm, imho "bundle not found (not resolved)" is misleading now. When i read "not resolved", I think of the OSGi state "RESOLVED". But it can also happen that the bundle is just not there. That's why I wrote "might be not resolved". I think maybe we should leave that part out altogether and just say: Bundle "bundleId" not found. This is often caused by missing dependencies. Actually, I wanted to ask the PackageAdmin if the bundle is not there or not resolved, but doing this would duplicate almost the complete 'Platform.getBundle' code, so i settled for the 'might be not resolved' message.
Fine. Adjusted message.
*** Bug 286049 has been marked as a duplicate of this bug. ***
In bug 296113 and bug 286049, the problems are due other reasons. How about: Possible causes include missing dependencies, too restrictive version ranges, or a non-matching required execution environment.
I'll let you two agree on a message before I change it again :-) +1 from all those that agree with Markus' message?
+1 :)
Done.