English 中文(简体)
Compiling JS-Test-Driver Plugin and Installing it on Eclipse 3.5.1 Galileo?
原标题:

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:eclipsedropinsjs-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

最佳回答

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.

问题回答

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.




相关问题
In Eclipse, why doesn t "Show In" appear for non-Java files?

If I have a *java file open, I can right click on the source, scroll down to "Show In (Alt-Shift-W)", and select Navigator. If I have an *xml, *jsp, or pretty much anything besides a Java source ...

Eclipse: Hover broken in debug perspective

Since upgrading Eclipse (Galileo build 20090920-1017), hover in debug no longer displays a variable s value. Instead, hover behaves as if I were in normal Java perspective: alt text http://...

Eclipse smart quotes - like in Textmate

Happy Friday — Does anyone know if eclipse has the notion of smart quotes like Textmate. The way it works is to select some words and quote them by simply hitting the " key? I m a newbie here so be ...

Indentation guide for the eclipse editor

Is there a setting or plugin for eclipse that can show indentation guides in the editor? Something like the Codekana plugin for visual studio (not so fancy is also OK). Important that it works with ...

Adding jar from Eclipse plugin runtime tab

I want to add .jar files for plugin from the Runtime tab of manifest file. When I use the Add... button, I can see only sub-directories of the plugin project. So if I want to add same .jar file to ...

How to copy multiple projects into single folder in eclipse

I have two projects, Project1 and Project2. Now i want to copy this projects into eclipse workspace but i want these projects to be in a single folder like below. Eclipse Workspace -> Project -> ...

Java: Finding out what is using all the memory

I have a java application that runs out of memory, but I have no idea which code is allocating the memory. Is there an application with which I can check this? I use Eclipse.

热门标签