Skip to main content



      Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Unable to create view: Plug-in was unable to load class
Unable to create view: Plug-in was unable to load class [message #23591] Wed, 24 September 2008 11:37 Go to next message
Eclipse UserFriend
Hi all,

When I tried to open view 'MyView', below error about unable to load class
occurs.

"Unable to create view: Plug-in MyPlugin was unable to load class
MyPlugin.views.MyView."

Under bin directory, there is MyPlugin.class

I will be glad if you have any suggestions about this issue.
Thanks


****************************************************
plugin.xml:

<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.2"?>
<plugin>
<extension
point="org.eclipse.ui.views">
<category
name="xxx"
id="xxxCategory">
</category>
<view
name="My View"
icon="icons/cbh.jpg"
category="xxxCategory"
class="MyPlugin.views.MyView"
id="MyPlugin.views.MyView">
</view>
</extension>
</plugin>
*********************************************

Error Details :

Unable to create view: Plug-in MyPlugin was unable to load class
MyPlugin.views.MyView

java.lang.ClassNotFoundException: MyPlugin.views.MyView
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:402)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:347)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:83)
at java.lang.ClassLoader.loadClass(Unknown Source)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.loadCl ass(BundleLoader.java:278)
at
org.eclipse.osgi.framework.internal.core.BundleHost.loadClas s(BundleHost.java:227)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.load Class(AbstractBundle.java:1245)
at
org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI .createExecutableExtension(RegistryStrategyOSGI.java:147)
at
org.eclipse.core.internal.registry.ExtensionRegistry.createE xecutableExtension(ExtensionRegistry.java:759)
at
org.eclipse.core.internal.registry.ConfigurationElement.crea teExecutableExtension(ConfigurationElement.java:243)
at
org.eclipse.core.internal.registry.ConfigurationElementHandl e.createExecutableExtension(ConfigurationElementHandle.java: 51)
at org.eclipse.ui.internal.WorkbenchPlugin$1.run(WorkbenchPlugi n.java:242)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:67)
at
org.eclipse.ui.internal.WorkbenchPlugin.createExtension(Work benchPlugin.java:238)
at
org.eclipse.ui.internal.registry.ViewDescriptor.createView(V iewDescriptor.java:69)
at
org.eclipse.ui.internal.ViewReference.createPartHelper(ViewR eference.java:292)
at
org.eclipse.ui.internal.ViewReference.createPart(ViewReferen ce.java:197)
at
org.eclipse.ui.internal.WorkbenchPartReference.getPart(Workb enchPartReference.java:566)
at org.eclipse.ui.internal.Perspective.showView(Perspective.jav a:1675)
at
org.eclipse.ui.internal.WorkbenchPage.busyShowView(Workbench Page.java:987)
at org.eclipse.ui.internal.WorkbenchPage.access$13(WorkbenchPag e.java:968)
at org.eclipse.ui.internal.WorkbenchPage$13.run(WorkbenchPage.j ava:3514)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:67)
at org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage .java:3511)
at org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage .java:3487)
at
org.eclipse.ui.handlers.ShowViewHandler.openView(ShowViewHan dler.java:148)
at
org.eclipse.ui.handlers.ShowViewHandler.openOther(ShowViewHa ndler.java:104)
at
org.eclipse.ui.handlers.ShowViewHandler.execute(ShowViewHand ler.java:70)
at org.eclipse.ui.internal.ShowViewMenu$3.run(ShowViewMenu.java :114)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:499 )
at
org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:539)
at
org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:488)
at
org.eclipse.jface.action.ActionContributionItem$5.handleEven t(ActionContributionItem.java:400)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1085)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3180)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2856)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1930)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1894)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:422)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplicatio n.java:95)
at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:78)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:92)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:68)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:400)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:177)
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.core.launcher.Main.invokeFramework(Main.java:336 )
at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
at org.eclipse.core.launcher.Main.run(Main.java:977)
at org.eclipse.core.launcher.Main.main(Main.java:952)
Re: Unable to create view: Plug-in was unable to load class [message #23634 is a reply to message #23591] Wed, 24 September 2008 11:54 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: zx.code9.com

Dozla wrote:
> Hi all,
>
> When I tried to open view 'MyView', below error about unable to load
> class occurs.
>
> "Unable to create view: Plug-in MyPlugin was unable to load class
> MyPlugin.views.MyView."

Does MyPlugin have a noargs constructor?

ie.,

public MyPlugin() {
// this is where the extension registry will create me!
}
Re: Unable to create view: Plug-in was unable to load class [message #23719 is a reply to message #23634] Wed, 24 September 2008 12:51 Go to previous messageGo to next message
Eclipse UserFriend
Here is my constructor

public MyView() {

// setup the status images...

goodStatus = LogPlugin.Activator.getDefault().getGreenLight();
badStatus = LogPlugin.Activator.getDefault().getRedLight();

checkPrefs=true;

plugin = Activator.getDefault();

}
Re: Unable to create view: Plug-in was unable to load class [message #23928 is a reply to message #23719] Thu, 25 September 2008 04:07 Go to previous messageGo to next message
Eclipse UserFriend
Hi,
I have another view plugin in which view is created properly. I have
compared their .classpath, build.properties, plugin.xml files, they look
almost similar.
Another thing is, when I put a system.out inside Constructor of
MyView.java, I could not get any response.
In plugin.xml, view id is correct. Also MyView.class exists in my bin
directory. But there is an error about loading class.

Should I change MyView.java , or should I look for another problem in xml
files, properties etc ?

Any ideas about this issue?

Thanks

**********************************************
classpath
----------
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="bin"/>
</classpath>

**********************************************
Re: Unable to create view: Plug-in was unable to load class [message #24192 is a reply to message #23928] Thu, 25 September 2008 11:13 Go to previous message
Eclipse UserFriend
Hi again,
One more thing that I have wanted to add is,I have additionally got this
error message. May be there will be a connection between these two errors.
Thnks.

An error occurred while automatically activating bundle MyPlugin.
org.osgi.framework.BundleException: The activator MyPlugin.Activator for
bundle MyPlugin is invalid
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.load BundleActivator(AbstractBundle.java:141)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tart(BundleContextImpl.java:962)
at
org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(BundleHost.java:317)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.star t(AbstractBundle.java:256)
at
org.eclipse.osgi.framework.util.SecureAction.start(SecureAct ion.java:342)
at
org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter .preFindLocalClass(EclipseLazyStarter.java:88)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClass(ClasspathManager.java:412)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.fin dLocalClass(DefaultClassLoader.java:189)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findLo calClass(BundleLoader.java:334)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:386)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:347)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:83)
at java.lang.ClassLoader.loadClass(Unknown Source)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.loadCl ass(BundleLoader.java:278)
at
org.eclipse.osgi.framework.internal.core.BundleHost.loadClas s(BundleHost.java:227)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.load Class(AbstractBundle.java:1245)
at
org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI .createExecutableExtension(RegistryStrategyOSGI.java:147)
at
org.eclipse.core.internal.registry.ExtensionRegistry.createE xecutableExtension(ExtensionRegistry.java:759)
at
org.eclipse.core.internal.registry.ConfigurationElement.crea teExecutableExtension(ConfigurationElement.java:243)
at
org.eclipse.core.internal.registry.ConfigurationElementHandl e.createExecutableExtension(ConfigurationElementHandle.java: 51)
at org.eclipse.ui.internal.WorkbenchPlugin$1.run(WorkbenchPlugi n.java:242)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:67)
at
org.eclipse.ui.internal.WorkbenchPlugin.createExtension(Work benchPlugin.java:238)
at
org.eclipse.ui.internal.registry.ViewDescriptor.createView(V iewDescriptor.java:69)
at
org.eclipse.ui.internal.ViewReference.createPartHelper(ViewR eference.java:292)
at org.eclipse.ui.internal.ViewReference.createPart(ViewReferen ce.java:197)
at
org.eclipse.ui.internal.WorkbenchPartReference.getPart(Workb enchPartReference.java:566)
at org.eclipse.ui.internal.Perspective.showView(Perspective.jav a:1675)
at
org.eclipse.ui.internal.WorkbenchPage.busyShowView(Workbench Page.java:987)
at org.eclipse.ui.internal.WorkbenchPage.access$13(WorkbenchPag e.java:968)
at org.eclipse.ui.internal.WorkbenchPage$13.run(WorkbenchPage.j ava:3514)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:67)
at org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage .java:3511)
at org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage .java:3487)
at
org.eclipse.ui.handlers.ShowViewHandler.openView(ShowViewHan dler.java:148)
at
org.eclipse.ui.handlers.ShowViewHandler.openOther(ShowViewHa ndler.java:104)
at org.eclipse.ui.handlers.ShowViewHandler.execute(ShowViewHand ler.java:70)
at org.eclipse.ui.internal.ShowViewMenu$3.run(ShowViewMenu.java :114)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:499 )
at
org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:539)
at
org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:488)
at
org.eclipse.jface.action.ActionContributionItem$5.handleEven t(ActionContributionItem.java:400)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1085)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3180)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2856)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1930)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1894)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:422)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplicatio n.java:95)
at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:78)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:92)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:68)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:400)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:177)
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.core.launcher.Main.invokeFramework(Main.java:336 )
at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
at org.eclipse.core.launcher.Main.run(Main.java:977)
at org.eclipse.core.launcher.Main.main(Main.java:952)
Caused by: java.lang.NullPointerException
at
org.eclipse.ui.plugin.AbstractUIPlugin.getPreferenceStore(Ab stractUIPlugin.java:284)
at ClassBrowserPlugin.Activator.loadBookmarks(Activator.java:26 2)
at ClassBrowserPlugin.Activator.<init>(Activator.java:105)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Nativ e Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknow n Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Un known
Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.load BundleActivator(AbstractBundle.java:136)
... 63 more
Root exception:
java.lang.NullPointerException
at
org.eclipse.ui.plugin.AbstractUIPlugin.getPreferenceStore(Ab stractUIPlugin.java:284)
at ClassBrowserPlugin.Activator.loadBookmarks(Activator.java:26 2)
at ClassBrowserPlugin.Activator.<init>(Activator.java:105)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Nativ e Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknow n Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Un known
Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.load BundleActivator(AbstractBundle.java:136)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tart(BundleContextImpl.java:962)
at
org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(BundleHost.java:317)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.star t(AbstractBundle.java:256)
at
org.eclipse.osgi.framework.util.SecureAction.start(SecureAct ion.java:342)
at
org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter .preFindLocalClass(EclipseLazyStarter.java:88)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClass(ClasspathManager.java:412)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.fin dLocalClass(DefaultClassLoader.java:189)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findLo calClass(BundleLoader.java:334)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:386)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:347)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:83)
at java.lang.ClassLoader.loadClass(Unknown Source)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.loadCl ass(BundleLoader.java:278)
at
org.eclipse.osgi.framework.internal.core.BundleHost.loadClas s(BundleHost.java:227)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.load Class(AbstractBundle.java:1245)
at
org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI .createExecutableExtension(RegistryStrategyOSGI.java:147)
at
org.eclipse.core.internal.registry.ExtensionRegistry.createE xecutableExtension(ExtensionRegistry.java:759)
at
org.eclipse.core.internal.registry.ConfigurationElement.crea teExecutableExtension(ConfigurationElement.java:243)
at
org.eclipse.core.internal.registry.ConfigurationElementHandl e.createExecutableExtension(ConfigurationElementHandle.java: 51)
at org.eclipse.ui.internal.WorkbenchPlugin$1.run(WorkbenchPlugi n.java:242)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:67)
at
org.eclipse.ui.internal.WorkbenchPlugin.createExtension(Work benchPlugin.java:238)
at
org.eclipse.ui.internal.registry.ViewDescriptor.createView(V iewDescriptor.java:69)
at
org.eclipse.ui.internal.ViewReference.createPartHelper(ViewR eference.java:292)
at org.eclipse.ui.internal.ViewReference.createPart(ViewReferen ce.java:197)
at
org.eclipse.ui.internal.WorkbenchPartReference.getPart(Workb enchPartReference.java:566)
at org.eclipse.ui.internal.Perspective.showView(Perspective.jav a:1675)
at
org.eclipse.ui.internal.WorkbenchPage.busyShowView(Workbench Page.java:987)
at org.eclipse.ui.internal.WorkbenchPage.access$13(WorkbenchPag e.java:968)
at org.eclipse.ui.internal.WorkbenchPage$13.run(WorkbenchPage.j ava:3514)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:67)
at org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage .java:3511)
at org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage .java:3487)
at
org.eclipse.ui.handlers.ShowViewHandler.openView(ShowViewHan dler.java:148)
at
org.eclipse.ui.handlers.ShowViewHandler.openOther(ShowViewHa ndler.java:104)
at org.eclipse.ui.handlers.ShowViewHandler.execute(ShowViewHand ler.java:70)
at org.eclipse.ui.internal.ShowViewMenu$3.run(ShowViewMenu.java :114)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:499 )
at
org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:539)
at
org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:488)
at
org.eclipse.jface.action.ActionContributionItem$5.handleEven t(ActionContributionItem.java:400)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1085)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3180)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2856)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1930)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1894)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:422)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplicatio n.java:95)
at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:78)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:92)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:68)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:400)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:177)
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.core.launcher.Main.invokeFramework(Main.java:336 )
at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
at org.eclipse.core.launcher.Main.run(Main.java:977)
at org.eclipse.core.launcher.Main.main(Main.java:952)
Re: Unable to create view: Plug-in was unable to load class [message #581208 is a reply to message #23591] Wed, 24 September 2008 11:54 Go to previous message
Eclipse UserFriend
Dozla wrote:
> Hi all,
>
> When I tried to open view 'MyView', below error about unable to load
> class occurs.
>
> "Unable to create view: Plug-in MyPlugin was unable to load class
> MyPlugin.views.MyView."

Does MyPlugin have a noargs constructor?

ie.,

public MyPlugin() {
// this is where the extension registry will create me!
}
Re: Unable to create view: Plug-in was unable to load class [message #581262 is a reply to message #23634] Wed, 24 September 2008 12:51 Go to previous message
Eclipse UserFriend
Here is my constructor

public MyView() {

// setup the status images...

goodStatus = LogPlugin.Activator.getDefault().getGreenLight();
badStatus = LogPlugin.Activator.getDefault().getRedLight();

checkPrefs=true;

plugin = Activator.getDefault();

}
Re: Unable to create view: Plug-in was unable to load class [message #581383 is a reply to message #23719] Thu, 25 September 2008 04:07 Go to previous message
Eclipse UserFriend
Hi,
I have another view plugin in which view is created properly. I have
compared their .classpath, build.properties, plugin.xml files, they look
almost similar.
Another thing is, when I put a system.out inside Constructor of
MyView.java, I could not get any response.
In plugin.xml, view id is correct. Also MyView.class exists in my bin
directory. But there is an error about loading class.

Should I change MyView.java , or should I look for another problem in xml
files, properties etc ?

Any ideas about this issue?

Thanks

**********************************************
classpath
----------
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="bin"/>
</classpath>

**********************************************
Re: Unable to create view: Plug-in was unable to load class [message #581592 is a reply to message #23928] Thu, 25 September 2008 11:13 Go to previous message
Eclipse UserFriend
Hi again,
One more thing that I have wanted to add is,I have additionally got this
error message. May be there will be a connection between these two errors.
Thnks.

An error occurred while automatically activating bundle MyPlugin.
org.osgi.framework.BundleException: The activator MyPlugin.Activator for
bundle MyPlugin is invalid
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.load BundleActivator(AbstractBundle.java:141)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tart(BundleContextImpl.java:962)
at
org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(BundleHost.java:317)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.star t(AbstractBundle.java:256)
at
org.eclipse.osgi.framework.util.SecureAction.start(SecureAct ion.java:342)
at
org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter .preFindLocalClass(EclipseLazyStarter.java:88)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClass(ClasspathManager.java:412)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.fin dLocalClass(DefaultClassLoader.java:189)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findLo calClass(BundleLoader.java:334)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:386)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:347)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:83)
at java.lang.ClassLoader.loadClass(Unknown Source)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.loadCl ass(BundleLoader.java:278)
at
org.eclipse.osgi.framework.internal.core.BundleHost.loadClas s(BundleHost.java:227)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.load Class(AbstractBundle.java:1245)
at
org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI .createExecutableExtension(RegistryStrategyOSGI.java:147)
at
org.eclipse.core.internal.registry.ExtensionRegistry.createE xecutableExtension(ExtensionRegistry.java:759)
at
org.eclipse.core.internal.registry.ConfigurationElement.crea teExecutableExtension(ConfigurationElement.java:243)
at
org.eclipse.core.internal.registry.ConfigurationElementHandl e.createExecutableExtension(ConfigurationElementHandle.java: 51)
at org.eclipse.ui.internal.WorkbenchPlugin$1.run(WorkbenchPlugi n.java:242)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:67)
at
org.eclipse.ui.internal.WorkbenchPlugin.createExtension(Work benchPlugin.java:238)
at
org.eclipse.ui.internal.registry.ViewDescriptor.createView(V iewDescriptor.java:69)
at
org.eclipse.ui.internal.ViewReference.createPartHelper(ViewR eference.java:292)
at org.eclipse.ui.internal.ViewReference.createPart(ViewReferen ce.java:197)
at
org.eclipse.ui.internal.WorkbenchPartReference.getPart(Workb enchPartReference.java:566)
at org.eclipse.ui.internal.Perspective.showView(Perspective.jav a:1675)
at
org.eclipse.ui.internal.WorkbenchPage.busyShowView(Workbench Page.java:987)
at org.eclipse.ui.internal.WorkbenchPage.access$13(WorkbenchPag e.java:968)
at org.eclipse.ui.internal.WorkbenchPage$13.run(WorkbenchPage.j ava:3514)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:67)
at org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage .java:3511)
at org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage .java:3487)
at
org.eclipse.ui.handlers.ShowViewHandler.openView(ShowViewHan dler.java:148)
at
org.eclipse.ui.handlers.ShowViewHandler.openOther(ShowViewHa ndler.java:104)
at org.eclipse.ui.handlers.ShowViewHandler.execute(ShowViewHand ler.java:70)
at org.eclipse.ui.internal.ShowViewMenu$3.run(ShowViewMenu.java :114)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:499 )
at
org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:539)
at
org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:488)
at
org.eclipse.jface.action.ActionContributionItem$5.handleEven t(ActionContributionItem.java:400)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1085)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3180)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2856)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1930)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1894)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:422)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplicatio n.java:95)
at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:78)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:92)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:68)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:400)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:177)
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.core.launcher.Main.invokeFramework(Main.java:336 )
at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
at org.eclipse.core.launcher.Main.run(Main.java:977)
at org.eclipse.core.launcher.Main.main(Main.java:952)
Caused by: java.lang.NullPointerException
at
org.eclipse.ui.plugin.AbstractUIPlugin.getPreferenceStore(Ab stractUIPlugin.java:284)
at ClassBrowserPlugin.Activator.loadBookmarks(Activator.java:26 2)
at ClassBrowserPlugin.Activator.<init>(Activator.java:105)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Nativ e Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknow n Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Un known
Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.load BundleActivator(AbstractBundle.java:136)
... 63 more
Root exception:
java.lang.NullPointerException
at
org.eclipse.ui.plugin.AbstractUIPlugin.getPreferenceStore(Ab stractUIPlugin.java:284)
at ClassBrowserPlugin.Activator.loadBookmarks(Activator.java:26 2)
at ClassBrowserPlugin.Activator.<init>(Activator.java:105)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Nativ e Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknow n Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Un known
Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.load BundleActivator(AbstractBundle.java:136)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tart(BundleContextImpl.java:962)
at
org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(BundleHost.java:317)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.star t(AbstractBundle.java:256)
at
org.eclipse.osgi.framework.util.SecureAction.start(SecureAct ion.java:342)
at
org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter .preFindLocalClass(EclipseLazyStarter.java:88)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClass(ClasspathManager.java:412)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.fin dLocalClass(DefaultClassLoader.java:189)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findLo calClass(BundleLoader.java:334)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:386)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:347)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:83)
at java.lang.ClassLoader.loadClass(Unknown Source)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.loadCl ass(BundleLoader.java:278)
at
org.eclipse.osgi.framework.internal.core.BundleHost.loadClas s(BundleHost.java:227)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.load Class(AbstractBundle.java:1245)
at
org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI .createExecutableExtension(RegistryStrategyOSGI.java:147)
at
org.eclipse.core.internal.registry.ExtensionRegistry.createE xecutableExtension(ExtensionRegistry.java:759)
at
org.eclipse.core.internal.registry.ConfigurationElement.crea teExecutableExtension(ConfigurationElement.java:243)
at
org.eclipse.core.internal.registry.ConfigurationElementHandl e.createExecutableExtension(ConfigurationElementHandle.java: 51)
at org.eclipse.ui.internal.WorkbenchPlugin$1.run(WorkbenchPlugi n.java:242)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:67)
at
org.eclipse.ui.internal.WorkbenchPlugin.createExtension(Work benchPlugin.java:238)
at
org.eclipse.ui.internal.registry.ViewDescriptor.createView(V iewDescriptor.java:69)
at
org.eclipse.ui.internal.ViewReference.createPartHelper(ViewR eference.java:292)
at org.eclipse.ui.internal.ViewReference.createPart(ViewReferen ce.java:197)
at
org.eclipse.ui.internal.WorkbenchPartReference.getPart(Workb enchPartReference.java:566)
at org.eclipse.ui.internal.Perspective.showView(Perspective.jav a:1675)
at
org.eclipse.ui.internal.WorkbenchPage.busyShowView(Workbench Page.java:987)
at org.eclipse.ui.internal.WorkbenchPage.access$13(WorkbenchPag e.java:968)
at org.eclipse.ui.internal.WorkbenchPage$13.run(WorkbenchPage.j ava:3514)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:67)
at org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage .java:3511)
at org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage .java:3487)
at
org.eclipse.ui.handlers.ShowViewHandler.openView(ShowViewHan dler.java:148)
at
org.eclipse.ui.handlers.ShowViewHandler.openOther(ShowViewHa ndler.java:104)
at org.eclipse.ui.handlers.ShowViewHandler.execute(ShowViewHand ler.java:70)
at org.eclipse.ui.internal.ShowViewMenu$3.run(ShowViewMenu.java :114)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:499 )
at
org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:539)
at
org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:488)
at
org.eclipse.jface.action.ActionContributionItem$5.handleEven t(ActionContributionItem.java:400)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1085)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3180)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2856)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1930)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1894)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:422)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplicatio n.java:95)
at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:78)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:92)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:68)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:400)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:177)
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.core.launcher.Main.invokeFramework(Main.java:336 )
at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
at org.eclipse.core.launcher.Main.run(Main.java:977)
at org.eclipse.core.launcher.Main.main(Main.java:952)
Previous Topic:Plugins in "Target Platform"
Next Topic:Make plugins for legacy Java code
Goto Forum:
  


Current Time: Sat Jul 05 00:15:52 EDT 2025

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

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

Back to the top