createExecutableExtension returns null [message #330515] |
Wed, 30 July 2008 16:25  |
Eclipse User |
|
|
|
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 00:58  |
Eclipse User |
|
|
|
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
>
|
|
|
Powered by
FUDForum. Page generated in 0.07925 seconds