Question

I downloaded the source of the js-test-driver from: http://js-test-driver.googlecode.com/svn/tags/1.2

It compiles just fine, but one of the unit tests fails:

[junit] Tests run: 1, Failures: 1, Errors: 0, Time elapsed: 0.012 sec
[junit] Test com.google.jstestdriver.eclipse.ui.views.FailureOnlyViewerFilterTest FAILED

I am using: - ANT 1.7.1 - javac 1.6.0_12

And I'm trying to install the js-test-driver plugin on Eclipse 3.5.1 Galileo

Despite the failed test I installed the plugin into my C:\eclipse\dropins\js-test-driver directory by copying (exporting from svn) the compiled feature and plugins directories there, to see if it would yield any hints to what the problem is.

When I started eclipse, added the plugin to the panel using Window->Show View->Other... Other->JsTestDriver

The plugin for the panel is added, but it displays the following error instead of the plugin in the panel:

Could not create the view: Plugin com.google.jstestdriver.eclipse.ui was unable to load class com.google.jstestdriver.eclipse.ui.views.JsTestDriverView.

And then bellow that I get the following stack trace after clicking Details:

java.lang.ClassNotFoundException: com.google.jstestdriver.eclipse.ui.views.JsTestDriverView
    at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:494)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:398)
    at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:105)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at org.eclipse.osgi.internal.loader.BundleLoader.loadClass(BundleLoader.java:326)
    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.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:160)
    at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:874)
    at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
    at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:51)
    at org.eclipse.ui.internal.WorkbenchPlugin$1.run(WorkbenchPlugin.java:267)
    at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
    at org.eclipse.ui.internal.WorkbenchPlugin.createExtension(WorkbenchPlugin.java:263)
    at org.eclipse.ui.internal.registry.ViewDescriptor.createView(ViewDescriptor.java:63)
    at org.eclipse.ui.internal.ViewReference.createPartHelper(ViewReference.java:324)
    at org.eclipse.ui.internal.ViewReference.createPart(ViewReference.java:226)
    at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
    at org.eclipse.ui.internal.Perspective.showView(Perspective.java:2229)
    at org.eclipse.ui.internal.WorkbenchPage.busyShowView(WorkbenchPage.java:1067)
    at org.eclipse.ui.internal.WorkbenchPage$20.run(WorkbenchPage.java:3816)
    at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
    at org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage.java:3813)
    at org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage.java:3789)
    at org.eclipse.ui.handlers.ShowViewHandler.openView(ShowViewHandler.java:165)
    at org.eclipse.ui.handlers.ShowViewHandler.openOther(ShowViewHandler.java:109)
    at org.eclipse.ui.handlers.ShowViewHandler.execute(ShowViewHandler.java:77)
    at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:294)
    at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476)
    at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
    at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169)
    at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241)
    at org.eclipse.ui.internal.ShowViewMenu$3.run(ShowViewMenu.java:141)
    at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
    at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
    at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
    at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3880)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3473)
    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 org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
    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(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    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)

Additionally, if I go to the settings in Window->Preferences and try to view the JS Test Driver Preferences, I get the following dialog:

Problem Occurred Unable to create the selected preference page. com.google.jstestdriver.eclipse.ui.WorkbenchPreferencePage

Thank you, Andrew J. Leer

Was it helpful?

Solution

My fix to this problem is based a comment on http://code.google.com/p/js-test-driver/wiki/UsingTheEclipsePlugin:

When installing the Eclipse plugin, if the software list contains an item that says "There are no categorized items", untick the "Group items by category" checkbox below.

This fixed the above errors I was getting after an initial install when I displayed or tried to configure the plugin tab.

OTHER TIPS

This error message says, the class com.google.jstestdriver.eclipse.ui.views.JsTestDriverView has not been found by the classloaders. Possible solutions:

  • Trivial: is there the correctly named class file inside the compiled solution?
  • If there is the correct class file, look the source of that View code, and look, what it's trying to load.
  • Check for dependencies, as in case of unsatisfied dependencies (that are not written down correctly), it is possible that the classloaders doesn't find some classes.
  • Look for activator classes in the project, and check what they are doing. They could also introduce such problems.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top