[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.pde] JUnit Plug-in Test cannot load Testclass from Fragment

Hello Everyone

I was watching this nice webinar again
https://admin.adobe.acrobat.com/_a300965365/p52777002/
and I am trying to test my view now.

First I would like to explain my project setup.
I have several plug-in projects (one for the model, dataaccess, presenter, and
view) and for each of those I created a fragment-plug-in for the tests. The model.
The presenter and model projects are just plain JUnit tests, but the view and
the dataaccess are running as pde tests (the dataaccess because I am using
eclipselink which is loading the model and needs some bundles to do that).

The weird thing is, that the dataaccess tests are running just fine, but when I
try the view tests I am always getting a ClassNotFoundException for each
Testclass I created. I first set up the run configuration such that it will run
all testclasses it recognises in the project. After that failed, I tried to just
run a particular testclass but I am getting the same error. I double checked the
fragment if it is referencing the right host-plugin and I also tried a
headless-application, a particular product, and the default.

I have no more ideas what can be wrong here :-(

Can somebody think of something? By the way, when I run my product everything is
fine, so the host-plug-in should be setup correct.

regards
-- Marc


P.S. I am not a friend of posting long StackTraces, but maybe it gives some idea

Class not found rcp.mvp.view.CustomerExplorerViewTests
java.lang.ClassNotFoundException: rcp.mvp.view.CustomerExplorerViewTests
	at
org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:489)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:405)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:393)
	at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:105)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
	at org.eclipse.osgi.internal.loader.BundleLoader.loadClass(BundleLoader.java:321)
	at
org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:231)
	at
org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(AbstractBundle.java:1193)
	at
org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunner$BundleClassLoader.findClass(RemotePluginTestRunner.java:38)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
	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.UITestApplication$1.run(UITestApplication.java:114)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3468)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3115)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221)
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at rcp.mvp.view.Application.start(Application.java:20)
	at
org.eclipse.pde.internal.junit.runtime.UITestApplication.start(UITestApplication.java:46)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
	at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1287)
Class not found rcp.mvp.view.CustomerViewTests
java.lang.ClassNotFoundException: rcp.mvp.view.CustomerViewTests
	at
org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:489)
	at org.eclipse.osgi.internal.loa .... same error for the this test