Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » FAQ Examples: Unable to load class org.eclipse.faq.examples.BooksView
FAQ Examples: Unable to load class org.eclipse.faq.examples.BooksView [message #447282] Mon, 13 December 2004 08:15 Go to next message
Eclipse UserFriend
Originally posted by: michael_bishop.rta.nsw.gov.au

Hi,

This is driving me crazy !

- I downloaded the "Official eclipse 3.0 FAQs" samples (
org.eclipse.faq.examples-src.zip ) from the Eclipse FAQ book's web site.

- I imported the above .zip file into my workspace.

- When I run a Run-time Workbench configuration, with the above plug-in
enabled, and try and open the Books view from the main menu, Window > Show
View > Other... and then choosing 'Books' under the 'Bookshelf' folder, I
get an error message dialog with the message:

"Unable to instantiate view: org.eclipse.faq.examples.BooksView"

For some reason the classloader cannot find the class even though the
class files have been compiled to the /bin directory. I am bamboozled by
this.

Can anyone help ?

Following is the exception from the .log file----


!ENTRY org.eclipse.core.runtime 4 1 Dec 13, 2004 19:11:42.990
!MESSAGE Plug-in org.eclipse.faq.examples was unable to load class
org.eclipse.faq.examples.BooksView.
!STACK 0
java.lang.ClassNotFoundException: org.eclipse.faq.examples.BooksView
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:404)
at
org.eclipse.osgi.framework.adaptor.core.AbstractClassLoader. loadClass(AbstractClassLoader.java:93)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.loadCl ass(BundleLoader.java:307)
at
org.eclipse.osgi.framework.internal.core.BundleHost.loadClas s(BundleHost.java:336)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.load Class(AbstractBundle.java:1313)
at
org.eclipse.core.internal.registry.ConfigurationElement.crea teExecutableExtension(ConfigurationElement.java:131)
at
org.eclipse.core.internal.registry.ConfigurationElement.crea teExecutableExtension(ConfigurationElement.java:124)
at
org.eclipse.core.internal.registry.ConfigurationElement.crea teExecutableExtension(ConfigurationElement.java:113)
at org.eclipse.ui.internal.WorkbenchPlugin$1.run(WorkbenchPlugi n.java:196)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:69)
at
org.eclipse.ui.internal.WorkbenchPlugin.createExtension(Work benchPlugin.java:193)
at
org.eclipse.ui.internal.registry.ViewDescriptor.createView(V iewDescriptor.java:76)
at org.eclipse.ui.internal.ViewFactory$1.run(ViewFactory.java:3 01)
at
org.eclipse.core.internal.runtime.InternalPlatform.run(Inter nalPlatform.java:616)
at org.eclipse.core.runtime.Platform.run(Platform.java:747)
at
org.eclipse.ui.internal.ViewFactory.busyRestoreView(ViewFact ory.java:273)
at org.eclipse.ui.internal.ViewFactory$2.run(ViewFactory.java:5 30)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:69)
at org.eclipse.ui.internal.ViewFactory.restoreView(ViewFactory. java:528)
at org.eclipse.ui.internal.Perspective.showView(Perspective.jav a:1593)
at
org.eclipse.ui.internal.WorkbenchPage.busyShowView(Workbench Page.java:773)
at org.eclipse.ui.internal.WorkbenchPage.access$9(WorkbenchPage .java:753)
at org.eclipse.ui.internal.WorkbenchPage$13.run(WorkbenchPage.j ava:3051)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:69)
at org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage .java:3048)
at org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage .java:3028)
at org.eclipse.ui.internal.ShowViewMenu.showOther(ShowViewMenu. java:204)
at org.eclipse.ui.internal.ShowViewMenu$2.run(ShowViewMenu.java :68)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:881 )
at
org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:915)
at
org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:866)
at
org.eclipse.jface.action.ActionContributionItem$7.handleEven t(ActionContributionItem.java:785)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :82)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:2772)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2431)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1377)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1348)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:254)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:141)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplicatio n.java:96)
at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:335)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:273)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:129)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.eclipse.core.launcher.Main.basicRun(Main.java:185)
at org.eclipse.core.launcher.Main.run(Main.java:704)
at org.eclipse.core.launcher.Main.main(Main.java:688)
Re: FAQ Examples: Unable to load class org.eclipse.faq.examples.BooksView [message #447378 is a reply to message #447282] Tue, 14 December 2004 01:26 Go to previous message
Eclipse UserFriend
Originally posted by: michael_bishop.rta.nsw.gov.au

Well, for those that are interested, I eventually found the problem:

The plugin.xml file specifies "org.eclipse.core.runtime.compatablity" as a
required plugin. However, I am using Eclipse Version 3.0.1 and should be
using "org.eclipse.core.runtime_3.0.1".

Solution:

Replace the line in the Plugin.xml

<import plugin="org.eclipse.core.runtime.compatability"/>

with

<import plugin="org.eclipse.core.runtime"/>

Also, change the line visible="false" to visible="true" after the line
label="FAQ Examples" in order to see the Menu item 'FAQ Examples'

cheers

Michael Bishop






Michael Bishop wrote:

> Hi,

> This is driving me crazy !

> - I downloaded the "Official eclipse 3.0 FAQs" samples (
> org.eclipse.faq.examples-src.zip ) from the Eclipse FAQ book's web site.

> - I imported the above .zip file into my workspace.

> - When I run a Run-time Workbench configuration, with the above plug-in
> enabled, and try and open the Books view from the main menu, Window > Show
> View > Other... and then choosing 'Books' under the 'Bookshelf' folder, I
> get an error message dialog with the message:

> "Unable to instantiate view: org.eclipse.faq.examples.BooksView"

> For some reason the classloader cannot find the class even though the
> class files have been compiled to the /bin directory. I am bamboozled by
> this.

> Can anyone help ?

> Following is the exception from the .log file----


> !ENTRY org.eclipse.core.runtime 4 1 Dec 13, 2004 19:11:42.990
> !MESSAGE Plug-in org.eclipse.faq.examples was unable to load class
> org.eclipse.faq.examples.BooksView.
> !STACK 0
> java.lang.ClassNotFoundException: org.eclipse.faq.examples.BooksView
> at
>
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:404)
> at
>
org.eclipse.osgi.framework.adaptor.core.AbstractClassLoader. loadClass(AbstractClassLoader.java:93)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
> at
>
org.eclipse.osgi.framework.internal.core.BundleLoader.loadCl ass(BundleLoader.java:307)
> at
>
org.eclipse.osgi.framework.internal.core.BundleHost.loadClas s(BundleHost.java:336)
> at
>
org.eclipse.osgi.framework.internal.core.AbstractBundle.load Class(AbstractBundle.java:1313)
> at
>
org.eclipse.core.internal.registry.ConfigurationElement.crea teExecutableExtension(ConfigurationElement.java:131)
> at
>
org.eclipse.core.internal.registry.ConfigurationElement.crea teExecutableExtension(ConfigurationElement.java:124)
> at
>
org.eclipse.core.internal.registry.ConfigurationElement.crea teExecutableExtension(ConfigurationElement.java:113)
> at org.eclipse.ui.internal.WorkbenchPlugin$1.run(WorkbenchPlugi n.java:196)
> at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:69)
> at
>
org.eclipse.ui.internal.WorkbenchPlugin.createExtension(Work benchPlugin.java:193)
> at
>
org.eclipse.ui.internal.registry.ViewDescriptor.createView(V iewDescriptor.java:76)
> at org.eclipse.ui.internal.ViewFactory$1.run(ViewFactory.java:3 01)
> at
>
org.eclipse.core.internal.runtime.InternalPlatform.run(Inter nalPlatform.java:616)
> at org.eclipse.core.runtime.Platform.run(Platform.java:747)
> at
> org.eclipse.ui.internal.ViewFactory.busyRestoreView(ViewFact ory.java:273)
> at org.eclipse.ui.internal.ViewFactory$2.run(ViewFactory.java:5 30)
> at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:69)
> at org.eclipse.ui.internal.ViewFactory.restoreView(ViewFactory. java:528)
> at org.eclipse.ui.internal.Perspective.showView(Perspective.jav a:1593)
> at
> org.eclipse.ui.internal.WorkbenchPage.busyShowView(Workbench Page.java:773)
> at org.eclipse.ui.internal.WorkbenchPage.access$9(WorkbenchPage .java:753)
> at org.eclipse.ui.internal.WorkbenchPage$13.run(WorkbenchPage.j ava:3051)
> at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:69)
> at org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage .java:3048)
> at org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage .java:3028)
> at org.eclipse.ui.internal.ShowViewMenu.showOther(ShowViewMenu. java:204)
> at org.eclipse.ui.internal.ShowViewMenu$2.run(ShowViewMenu.java :68)
> at org.eclipse.jface.action.Action.runWithEvent(Action.java:881 )
> at
>
org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:915)
> at
>
org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:866)
> at
>
org.eclipse.jface.action.ActionContributionItem$7.handleEven t(ActionContributionItem.java:785)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :82)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796)
> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:2772)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2431)
> at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1377)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1348)
> at
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:254)
> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:141)
> at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplicatio n.java:96)
> at
>
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:335)
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:273)
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:129)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
> at
>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:324)
> at org.eclipse.core.launcher.Main.basicRun(Main.java:185)
> at org.eclipse.core.launcher.Main.run(Main.java:704)
> at org.eclipse.core.launcher.Main.main(Main.java:688)
Previous Topic:transparent Canvas on top of a Composite
Next Topic:How do I Searc a Table Item and selecting the corresponding Table row in SWT?
Goto Forum:
  


Current Time: Thu Oct 22 16:06:06 GMT 2020

Powered by FUDForum. Page generated in 0.01819 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top