Error during running JUnit test

12 views
Skip to first unread message

Chris Jeschke

unread,
Nov 20, 2018, 8:45:17 AM11/20/18
to Saros Development
I want to write some test. Before writing my own I started to run tests that already exist. Unfortenly I can't run any test because of a ClassNotFoundException. Running a new Eclipse Instance with Saros works on the same code. Did somebody experienced the same and can give me a hint?

Class not found de.fu_berlin.inf.dpp.session.SarosSessionManagerTest
java.lang.ClassNotFoundException: de.fu_berlin.inf.dpp.session.SarosSessionManagerTest
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:513)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at org.eclipse.osgi.internal.loader.BundleLoader.loadClass(BundleLoader.java:345)
at org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:229)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(AbstractBundle.java:1207)
at org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunner$BundleClassLoader.findClass(RemotePluginTestRunner.java:38)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
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.CoreTestApplication.run(CoreTestApplication.java:23)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.eclipse.equinox.internal.app.EclipseAppContainer.callMethodWithException(EclipseAppContainer.java:587)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:198)
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:344)
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:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
at org.eclipse.equinox.launcher.Main.main(Main.java:1386)

kelvin.glass

unread,
Nov 20, 2018, 10:07:39 AM11/20/18
to Saros Development

Hi,

Do you try to execute the tests in eclipse ? Did you follow the corresponding documentation to set up your development environment [1]?

Are any Errors reported in the eclipse view "Problems"?

BR,
Kelvin

[1] - http://www.saros-project.org/setup-dev-environment

Chris Jeschke

unread,
Nov 20, 2018, 11:07:32 AM11/20/18
to Saros Development
Hey,

Yes, I try to execute the tests in eclipse and I set up everything as it is mentioned in [1]

The view 'Problem' give me 0 Errors and 202 Warnings.

Greetings,
Christian

Chris Jeschke

unread,
Nov 20, 2018, 11:11:28 AM11/20/18
to Saros Development
Hey,

I solved the problem. I had to run a JUnit Test instead of running JUnit-Plug-in Test.

Thanks and never mind,

Stefan Rossbach

unread,
Nov 20, 2018, 1:20:15 PM11/20/18
to Chris Jeschke, Saros Development
You are running the test in an OSGi evironment aka headless Eclipse
instance. We do not use this environment, just the normal JUNIT environment.
Reply all
Reply to author
Forward
0 new messages