Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Error: MESSAGE Could not create action delegate for id:
Error: MESSAGE Could not create action delegate for id: [message #461945] Thu, 18 January 2007 14:54 Go to next message
Ali Alauoubiy is currently offline Ali AlauoubiyFriend
Messages: 20
Registered: July 2009
Junior Member
Hi Everyone,

I am new to ActionSet, so I added an actionSet using the PDE, and I made use of the example given/generated by the wizard. However I get the follwing error:

!ENTRY org.eclipse.ui 4 4 2007-01-18 14:35:43.019
!MESSAGE Could not create action delegate for id: net.dresdnerkleinwort.hierarchy.client.actions.NewBookReques tAction

!ENTRY org.eclipse.equinox.registry 4 1 2007-01-18 14:35:43.019
!MESSAGE Plug-in "net.dresdnerkleinwort.hierarchy.client" was unable to instantiate class " net.dresdnerkleinwort.hierarchy.client.actions.NewBookReques tAction ".
!STACK 0
java.lang.InstantiationException: net.dresdnerkleinwort.hierarchy.client.actions.NewBookReques tAction
at java.lang.Class.newInstance0(Class.java:335)
at java.lang.Class.newInstance(Class.java:303)
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI .createExecutableExtension(RegistryStrategyOSGI.java:157)
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.createExtension(Work benchPlugin.java:234)
at org.eclipse.ui.internal.PluginAction.createDelegate(PluginAc tion.java:120)
at org.eclipse.ui.internal.PluginAction.selectionChanged(Plugin Action.java:278)
at org.eclipse.ui.internal.WWinPluginAction.refreshSelection(WW inPluginAction.java:275)
at org.eclipse.ui.internal.WWinPluginAction.<init>(WWinPluginAction.java:121)
at org.eclipse.ui.internal.ActionDescriptor.createAction(Action Descriptor.java:259)
at org.eclipse.ui.internal.ActionDescriptor.<init>(ActionDescriptor.java:170)
at org.eclipse.ui.internal.PluginActionSetBuilder.createActionD escriptor(PluginActionSetBuilder.java:132)
at org.eclipse.ui.internal.PluginActionBuilder.readElement(Plug inActionBuilder.java:158)
at org.eclipse.ui.internal.registry.RegistryReader.readElements (RegistryReader.java:138)
at org.eclipse.ui.internal.registry.RegistryReader.readElementC hildren(RegistryReader.java:127)
at org.eclipse.ui.internal.PluginActionBuilder.readElement(Plug inActionBuilder.java:141)
at org.eclipse.ui.internal.registry.RegistryReader.readElements (RegistryReader.java:138)
at org.eclipse.ui.internal.PluginActionSetBuilder.readActionExt ensions(PluginActionSetBuilder.java:259)
at org.eclipse.ui.internal.PluginActionSetBuilder.processAction Sets(PluginActionSetBuilder.java:221)
at org.eclipse.ui.internal.ActionPresentation.setActionSets(Act ionPresentation.java:187)
at org.eclipse.ui.internal.WorkbenchWindow.updateActionSets(Wor kbenchWindow.java:2826)
at org.eclipse.ui.internal.WorkbenchWindow$6.run(WorkbenchWindo w.java:2636)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:67)
at org.eclipse.ui.internal.WorkbenchWindow.setActivePage(Workbe nchWindow.java:2597)
at org.eclipse.ui.internal.WorkbenchWindow.restoreState(Workben chWindow.java:1982)
at org.eclipse.ui.internal.Workbench.doRestoreState(Workbench.j ava:2857)
at org.eclipse.ui.internal.Workbench.restoreState(Workbench.jav a:1665)
at org.eclipse.ui.internal.Workbench.access$12(Workbench.java:1 650)
at org.eclipse.ui.internal.Workbench$17.run(Workbench.java:1529 )
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at org.eclipse.ui.internal.Workbench.restoreState(Workbench.jav a:1473)
at org.eclipse.ui.internal.WorkbenchConfigurer.restoreState(Wor kbenchConfigurer.java:183)
at org.eclipse.ui.application.WorkbenchAdvisor.openWindows(Work benchAdvisor.java:702)
at org.eclipse.ui.internal.Workbench.init(Workbench.java:1085)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1847)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:419)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at net.dresdnerkleinwort.hierarchy.client.Application.run(Appli cation.java:21)
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(NativeMethodAcce ssorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
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)

Any Idea?
Re: Error: MESSAGE Could not create action delegate for id: [message #461946 is a reply to message #461945] Thu, 18 January 2007 15:12 Go to previous messageGo to next message
Alex Blewitt is currently offline Alex BlewittFriend
Messages: 946
Registered: July 2009
Senior Member
It's quite likely that the NewBookRequestAction has a static field of a class that can't be found on at runtime, for example, you've added a Jar to the .classpath instead of the Manifest.mf's Bundle-ClassPath or Require-Bundle.

Alex.
Re: Error: MESSAGE Could not create action delegate for id: [message #461947 is a reply to message #461946] Thu, 18 January 2007 15:32 Go to previous messageGo to next message
Ali Alauoubiy is currently offline Ali AlauoubiyFriend
Messages: 20
Registered: July 2009
Junior Member
Hi Alex,

Thanks for your reply, I am not too sure about your answer.. However I spotted this problem only occure when my action implements ISelectionListener, and I really want to implement this interface so I can control the enabling and disabling of the action i.e.:

public void selectionChanged(IWorkbenchPart part, ISelection incoming) {
if (incoming instanceof IStructuredSelection) {
selection = (IStructuredSelection) incoming;
setEnabled(selection.size() == 1
&& selection.getFirstElement() instanceof HierarchyNode);
} else {
// Other selections, for example containing text or of other kinds.
setEnabled(false);
}
}

Is there any way to overcome this?
Re: Error: MESSAGE Could not create action delegate for id: [message #461948 is a reply to message #461946] Thu, 18 January 2007 15:39 Go to previous messageGo to next message
Ali Alauoubiy is currently offline Ali AlauoubiyFriend
Messages: 20
Registered: July 2009
Junior Member
Hi Alex,

Thanks for your reply, I am not too sure about your answer.. However I spotted this problem only occure when my action implements ISelectionListener, and I really want to implement this interface so I can control the enabling and disabling of the action i.e.:

public void selectionChanged(IWorkbenchPart part, ISelection incoming) {
if (incoming instanceof IStructuredSelection) {
selection = (IStructuredSelection) incoming;
setEnabled(selection.size() == 1
&& selection.getFirstElement() instanceof HierarchyNode);
} else {
// Other selections, for example containing text or of other kinds.
setEnabled(false);
}
}

Is there any way to overcome this?
Re: Error: MESSAGE Could not create action delegate for id: [message #461951 is a reply to message #461946] Thu, 18 January 2007 15:53 Go to previous messageGo to next message
Ali Alauoubiy is currently offline Ali AlauoubiyFriend
Messages: 20
Registered: July 2009
Junior Member
Hi Alex,

Thanks for your reply, I am not too sure about your answer.. However I spotted this problem only occure when my action implements ISelectionListener, and I really want to implement this interface so I can control the enabling and disabling of the action i.e.:

public void selectionChanged(IWorkbenchPart part, ISelection incoming) {
if (incoming instanceof IStructuredSelection) {
selection = (IStructuredSelection) incoming;
setEnabled(selection.size() == 1
&& selection.getFirstElement() instanceof HierarchyNode);
} else {
// Other selections, for example containing text or of other kinds.
setEnabled(false);
}
}

Is there any way to overcome this?
Re: Error: MESSAGE Could not create action delegate for id: [message #461957 is a reply to message #461945] Thu, 18 January 2007 18:03 Go to previous messageGo to next message
Ilya Shinkarenko is currently offline Ilya ShinkarenkoFriend
Messages: 22
Registered: July 2009
Junior Member
Hi Ali,

I guess your problem is that you have no default constructor (with no
parameters) in your action class.

Ilya Shinkarenko
--
www.rcp-training.com
www.weiglewilczek.com




Ali Alauoubiy wrote:
> Hi Everyone,
>
> I am new to ActionSet, so I added an actionSet using the PDE, and I made use of the example given/generated by the wizard. However I get the follwing error:
>
> !ENTRY org.eclipse.ui 4 4 2007-01-18 14:35:43.019
> !MESSAGE Could not create action delegate for id: net.dresdnerkleinwort.hierarchy.client.actions.NewBookReques tAction
>
> !ENTRY org.eclipse.equinox.registry 4 1 2007-01-18 14:35:43.019
> !MESSAGE Plug-in "net.dresdnerkleinwort.hierarchy.client" was unable to instantiate class " net.dresdnerkleinwort.hierarchy.client.actions.NewBookReques tAction ".
> !STACK 0
> java.lang.InstantiationException: net.dresdnerkleinwort.hierarchy.client.actions.NewBookReques tAction
> at java.lang.Class.newInstance0(Class.java:335)
> at java.lang.Class.newInstance(Class.java:303)
> at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI .createExecutableExtension(RegistryStrategyOSGI.java:157)
> 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.createExtension(Work benchPlugin.java:234)
> at org.eclipse.ui.internal.PluginAction.createDelegate(PluginAc tion.java:120)
> at org.eclipse.ui.internal.PluginAction.selectionChanged(Plugin Action.java:278)
> at org.eclipse.ui.internal.WWinPluginAction.refreshSelection(WW inPluginAction.java:275)
> at org.eclipse.ui.internal.WWinPluginAction.<init>(WWinPluginAction.java:121)
> at org.eclipse.ui.internal.ActionDescriptor.createAction(Action Descriptor.java:259)
> at org.eclipse.ui.internal.ActionDescriptor.<init>(ActionDescriptor.java:170)
> at org.eclipse.ui.internal.PluginActionSetBuilder.createActionD escriptor(PluginActionSetBuilder.java:132)
> at org.eclipse.ui.internal.PluginActionBuilder.readElement(Plug inActionBuilder.java:158)
> at org.eclipse.ui.internal.registry.RegistryReader.readElements (RegistryReader.java:138)
> at org.eclipse.ui.internal.registry.RegistryReader.readElementC hildren(RegistryReader.java:127)
> at org.eclipse.ui.internal.PluginActionBuilder.readElement(Plug inActionBuilder.java:141)
> at org.eclipse.ui.internal.registry.RegistryReader.readElements (RegistryReader.java:138)
> at org.eclipse.ui.internal.PluginActionSetBuilder.readActionExt ensions(PluginActionSetBuilder.java:259)
> at org.eclipse.ui.internal.PluginActionSetBuilder.processAction Sets(PluginActionSetBuilder.java:221)
> at org.eclipse.ui.internal.ActionPresentation.setActionSets(Act ionPresentation.java:187)
> at org.eclipse.ui.internal.WorkbenchWindow.updateActionSets(Wor kbenchWindow.java:2826)
> at org.eclipse.ui.internal.WorkbenchWindow$6.run(WorkbenchWindo w.java:2636)
> at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:67)
> at org.eclipse.ui.internal.WorkbenchWindow.setActivePage(Workbe nchWindow.java:2597)
> at org.eclipse.ui.internal.WorkbenchWindow.restoreState(Workben chWindow.java:1982)
> at org.eclipse.ui.internal.Workbench.doRestoreState(Workbench.j ava:2857)
> at org.eclipse.ui.internal.Workbench.restoreState(Workbench.jav a:1665)
> at org.eclipse.ui.internal.Workbench.access$12(Workbench.java:1 650)
> at org.eclipse.ui.internal.Workbench$17.run(Workbench.java:1529 )
> at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
> at org.eclipse.ui.internal.Workbench.restoreState(Workbench.jav a:1473)
> at org.eclipse.ui.internal.WorkbenchConfigurer.restoreState(Wor kbenchConfigurer.java:183)
> at org.eclipse.ui.application.WorkbenchAdvisor.openWindows(Work benchAdvisor.java:702)
> at org.eclipse.ui.internal.Workbench.init(Workbench.java:1085)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1847)
> at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:419)
> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
> at net.dresdnerkleinwort.hierarchy.client.Application.run(Appli cation.java:21)
> 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(NativeMethodAcce ssorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> 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)
>
> Any Idea?
Re: Error: MESSAGE Could not create action delegate for id: [message #461970 is a reply to message #461957] Fri, 19 January 2007 09:34 Go to previous messageGo to next message
Ali Alauoubiy is currently offline Ali AlauoubiyFriend
Messages: 20
Registered: July 2009
Junior Member
Hi Ilya,

I do have a default constructor in my action class. However I still have this error.

Regards
Ali
Re: Error: MESSAGE Could not create action delegate for id: [message #461971 is a reply to message #461970] Fri, 19 January 2007 11:55 Go to previous messageGo to next message
Daniel Krügler is currently offline Daniel KrüglerFriend
Messages: 853
Registered: July 2009
Senior Member
Ali Alauoubiy wrote:
> Hi Ilya,
>
> I do have a default constructor in my action class. However I still have this error.

... which is *publicly* available? (The implicit package visiblity is a
notorious candidate of such problems)

Greetings from Bremen,

Daniel Krügler
Re: Error: MESSAGE Could not create action delegate for id: [message #461976 is a reply to message #461970] Fri, 19 January 2007 13:40 Go to previous message
Ali Alauoubiy is currently offline Ali AlauoubiyFriend
Messages: 20
Registered: July 2009
Junior Member
Hi Everyone,

I managed to resolve this error, thanks for your help

Ali
Previous Topic:how i change another view?
Next Topic:IPlatformRunnable versus IApplication in 3.3's RCP?
Goto Forum:
  


Current Time: Tue Sep 17 05:02:36 GMT 2024

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

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

Back to the top