Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » createExecutableExtension returns null
createExecutableExtension returns null [message #330515] Wed, 30 July 2008 20:25 Go to next message
Eclipse UserFriend
Hi!

I have an extension point that has a configuration element where each
plug-in must extend an abstract class. This abstract class is already a
management mbean used for JMX and already implements some behaviour to be
used in the JMX console.

So each extension contribution extending this class is of course also a
JMX bean.

Now when iterating over all contributing extensions and calling
createExecutableExtension on the appropriate configuration element, the
method returns null. If have set a breakpoint in the constructor of the
contributing extension point and its activator and the concrete
implementing class get called. So there are no class loader issues. But
somehow this method always returns null. No exceptions, no logs (as far as
I know)!

Where can I hook into to detect the problem?!? Is it because my abstract
class extends from a StandardEmitterBean?!?

I have nothing found in the JavaDoc when this method returns null.
Normally on errors it throws exceptions!


Thank you for any answers,
Matthias
Re: createExecutableExtension returns null [message #330516 is a reply to message #330515] Wed, 30 July 2008 20:43 Go to previous messageGo to next message
Eclipse UserFriend
Matthias,

Does it implement IExecutableExtension? I'd set a breakpoint in the
constructor and look up the whole call stack to see how the returned
value is processed... Some return steps to interesting (non-class
loader) code and then stepping from there should reveal what's going
on. You looked in the Error Log view or the <workspace>/.metadata/.log?


Matthias wrote:
> Hi!
>
> I have an extension point that has a configuration element where each
> plug-in must extend an abstract class. This abstract class is already
> a management mbean used for JMX and already implements some behaviour
> to be used in the JMX console.
> So each extension contribution extending this class is of course also
> a JMX bean.
>
> Now when iterating over all contributing extensions and calling
> createExecutableExtension on the appropriate configuration element,
> the method returns null. If have set a breakpoint in the constructor
> of the contributing extension point and its activator and the concrete
> implementing class get called. So there are no class loader issues.
> But somehow this method always returns null. No exceptions, no logs
> (as far as I know)!
>
> Where can I hook into to detect the problem?!? Is it because my
> abstract class extends from a StandardEmitterBean?!?
>
> I have nothing found in the JavaDoc when this method returns null.
> Normally on errors it throws exceptions!
>
>
> Thank you for any answers,
> Matthias
>
Re: createExecutableExtension returns null [message #330522 is a reply to message #330515] Thu, 31 July 2008 04:58 Go to previous message
Eclipse UserFriend
A common mistake in this scenario is to have constructors with
arguments. Since the object is instantiated via reflection, you would
need a no-arg default constructor. Is that the mistake?


Eitehr case, I would also suggest Ed's way of stepping thru the code to
find out the issue.

- Prakash

www.eclipse-tips.com



Matthias wrote:
> Hi!
>
> I have an extension point that has a configuration element where each
> plug-in must extend an abstract class. This abstract class is already a
> management mbean used for JMX and already implements some behaviour to
> be used in the JMX console.
> So each extension contribution extending this class is of course also a
> JMX bean.
>
> Now when iterating over all contributing extensions and calling
> createExecutableExtension on the appropriate configuration element, the
> method returns null. If have set a breakpoint in the constructor of the
> contributing extension point and its activator and the concrete
> implementing class get called. So there are no class loader issues. But
> somehow this method always returns null. No exceptions, no logs (as far
> as I know)!
>
> Where can I hook into to detect the problem?!? Is it because my abstract
> class extends from a StandardEmitterBean?!?
>
> I have nothing found in the JavaDoc when this method returns null.
> Normally on errors it throws exceptions!
>
>
> Thank you for any answers,
> Matthias
>
Previous Topic:Progress bar in wizard
Next Topic:Extension point validation
Goto Forum:
  


Current Time: Sat Feb 15 11:29:42 GMT 2025

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

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

Back to the top