Home » Eclipse Projects » Eclipse Platform » Extension point problem
Extension point problem [message #332702] |
Wed, 05 November 2008 23:51 ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: eclipse-news.rizzoweb.com
In one of my plugins (call it BasePlugin) I've defined an extension
point, one of whose attributes is the fully qualified name of a class to
be instantiated. BasePlugin has a class that reads the IExtensions and
tries to instantiate those classes via the extension registry and
IConfigurationElement.createExecutableExtension(String).
I have another plugin, ExtensionPlugin, that implements the extension
point and specifies the name of one of its classes.
This is failing. At runtime I get an IllegalAccessException with the
message:
Class org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI can
not access a member of class org.mycompany.extensionPlugin.SomeClass
with modifiers "public"
I'm not really sure why that would be; even more confusing is that we
have successfully followed this pattern with other custom extension
points and multiple plugins. Looking at the extension point definitions
(schemas) and the extensions in ExtensionPlugin there doesn't appear to
be an significant differences.
So what does that message mean? What can I do to try to debug?
Any help is appreciated,
Eric
|
|
| |
Re: Extension point problem [message #332709 is a reply to message #332705] |
Thu, 06 November 2008 14:04 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: eclipse-news.rizzoweb.com
On 11/6/2008 4:24 AM, Dimitrios Kolovos wrote:
> Hi Eric,
>
> Is the package that contains the class you are trying to instantiate
> exported by ExtensionPlugin?
Good catch, it was not. Unfortunately, exporting that package did not
resolve the error.
Any more ideas?
> Eric Rizzo wrote:
>> In one of my plugins (call it BasePlugin) I've defined an extension
>> point, one of whose attributes is the fully qualified name of a class
>> to be instantiated. BasePlugin has a class that reads the IExtensions
>> and tries to instantiate those classes via the extension registry and
>> IConfigurationElement.createExecutableExtension(String).
>> I have another plugin, ExtensionPlugin, that implements the extension
>> point and specifies the name of one of its classes.
>>
>> This is failing. At runtime I get an IllegalAccessException with the
>> message:
>> Class org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI can
>> not access a member of class org.mycompany.extensionPlugin.SomeClass
>> with modifiers "public"
>>
>> I'm not really sure why that would be; even more confusing is that we
>> have successfully followed this pattern with other custom extension
>> points and multiple plugins. Looking at the extension point
>> definitions (schemas) and the extensions in ExtensionPlugin there
>> doesn't appear to be an significant differences.
>>
>> So what does that message mean? What can I do to try to debug?
>>
>> Any help is appreciated,
>> Eric
|
|
|
Re: Extension point problem [message #332710 is a reply to message #332709] |
Thu, 06 November 2008 14:13 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Dimitrios Kolovos![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=dskolovos%40gmail.com) Messages: 1776 Registered: July 2009 |
Senior Member |
|
|
Could it be the case that you have forgotten to add "public" before the
definition of your class? (just in case)
Cheers,
Dimitrios
Eric Rizzo wrote:
> On 11/6/2008 4:24 AM, Dimitrios Kolovos wrote:
>> Hi Eric,
>>
>> Is the package that contains the class you are trying to instantiate
>> exported by ExtensionPlugin?
>
> Good catch, it was not. Unfortunately, exporting that package did not
> resolve the error.
> Any more ideas?
>
>
>
>> Eric Rizzo wrote:
>>> In one of my plugins (call it BasePlugin) I've defined an extension
>>> point, one of whose attributes is the fully qualified name of a class
>>> to be instantiated. BasePlugin has a class that reads the IExtensions
>>> and tries to instantiate those classes via the extension registry and
>>> IConfigurationElement.createExecutableExtension(String).
>>> I have another plugin, ExtensionPlugin, that implements the extension
>>> point and specifies the name of one of its classes.
>>>
>>> This is failing. At runtime I get an IllegalAccessException with the
>>> message:
>>> Class org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI can
>>> not access a member of class org.mycompany.extensionPlugin.SomeClass
>>> with modifiers "public"
>>>
>>> I'm not really sure why that would be; even more confusing is that we
>>> have successfully followed this pattern with other custom extension
>>> points and multiple plugins. Looking at the extension point
>>> definitions (schemas) and the extensions in ExtensionPlugin there
>>> doesn't appear to be an significant differences.
>>>
>>> So what does that message mean? What can I do to try to debug?
>>>
>>> Any help is appreciated,
>>> Eric
>
|
|
|
Re: Extension point problem [message #332712 is a reply to message #332710] |
Thu, 06 November 2008 15:20 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: eclipse-news.rizzoweb.com
On 11/6/2008 9:13 AM, Dimitrios Kolovos wrote:
> Could it be the case that you have forgotten to add "public" before the
> definition of your class? (just in case)
I fell pretty dumb for overlooking it, but that was the problem. I had
copied the class from another plugin where it did not need to be
exposed, but failed to notice that the class I copied from was not public.
Thanks, Dimitrios - I owe you a beverage of your choice should we ever
meet! :-) By the way, your name sounds Greek, is that correct? Are you
from Greece?
Eric
> Eric Rizzo wrote:
>> On 11/6/2008 4:24 AM, Dimitrios Kolovos wrote:
>>> Hi Eric,
>>>
>>> Is the package that contains the class you are trying to instantiate
>>> exported by ExtensionPlugin?
>>
>> Good catch, it was not. Unfortunately, exporting that package did not
>> resolve the error.
>> Any more ideas?
>>
>>
>>
>>> Eric Rizzo wrote:
>>>> In one of my plugins (call it BasePlugin) I've defined an extension
>>>> point, one of whose attributes is the fully qualified name of a class
>>>> to be instantiated. BasePlugin has a class that reads the IExtensions
>>>> and tries to instantiate those classes via the extension registry and
>>>> IConfigurationElement.createExecutableExtension(String).
>>>> I have another plugin, ExtensionPlugin, that implements the extension
>>>> point and specifies the name of one of its classes.
>>>>
>>>> This is failing. At runtime I get an IllegalAccessException with the
>>>> message:
>>>> Class org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI can
>>>> not access a member of class org.mycompany.extensionPlugin.SomeClass
>>>> with modifiers "public"
>>>>
>>>> I'm not really sure why that would be; even more confusing is that we
>>>> have successfully followed this pattern with other custom extension
>>>> points and multiple plugins. Looking at the extension point
>>>> definitions (schemas) and the extensions in ExtensionPlugin there
>>>> doesn't appear to be an significant differences.
>>>>
>>>> So what does that message mean? What can I do to try to debug?
>>>>
>>>> Any help is appreciated,
>>>> Eric
>>
|
|
|
Re: Extension point problem [message #332744 is a reply to message #332712] |
Fri, 07 November 2008 09:23 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) |
Dimitrios Kolovos![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=dskolovos%40gmail.com) Messages: 1776 Registered: July 2009 |
Senior Member |
|
|
Eric Rizzo wrote:
> On 11/6/2008 9:13 AM, Dimitrios Kolovos wrote:
>> Could it be the case that you have forgotten to add "public" before the
>> definition of your class? (just in case)
>
> I fell pretty dumb for overlooking it, but that was the problem. I had
> copied the class from another plugin where it did not need to be
> exposed, but failed to notice that the class I copied from was not public.
Glad it helped. It's happened to me once or twice before.
>
> Thanks, Dimitrios - I owe you a beverage of your choice should we ever
> meet! :-)
I'll remember that ;)
By the way, your name sounds Greek, is that correct? Are you
> from Greece?
>
Good guess :)
> Eric
>
Cheers,
Dimitris
>
>> Eric Rizzo wrote:
>>> On 11/6/2008 4:24 AM, Dimitrios Kolovos wrote:
>>>> Hi Eric,
>>>>
>>>> Is the package that contains the class you are trying to instantiate
>>>> exported by ExtensionPlugin?
>>>
>>> Good catch, it was not. Unfortunately, exporting that package did not
>>> resolve the error.
>>> Any more ideas?
>>>
>>>
>>>
>>>> Eric Rizzo wrote:
>>>>> In one of my plugins (call it BasePlugin) I've defined an extension
>>>>> point, one of whose attributes is the fully qualified name of a class
>>>>> to be instantiated. BasePlugin has a class that reads the IExtensions
>>>>> and tries to instantiate those classes via the extension registry and
>>>>> IConfigurationElement.createExecutableExtension(String).
>>>>> I have another plugin, ExtensionPlugin, that implements the extension
>>>>> point and specifies the name of one of its classes.
>>>>>
>>>>> This is failing. At runtime I get an IllegalAccessException with the
>>>>> message:
>>>>> Class org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI can
>>>>> not access a member of class org.mycompany.extensionPlugin.SomeClass
>>>>> with modifiers "public"
>>>>>
>>>>> I'm not really sure why that would be; even more confusing is that we
>>>>> have successfully followed this pattern with other custom extension
>>>>> points and multiple plugins. Looking at the extension point
>>>>> definitions (schemas) and the extensions in ExtensionPlugin there
>>>>> doesn't appear to be an significant differences.
>>>>>
>>>>> So what does that message mean? What can I do to try to debug?
>>>>>
>>>>> Any help is appreciated,
>>>>> Eric
>>>
>
|
|
|
Goto Forum:
Current Time: Wed Aug 14 21:57:15 GMT 2024
Powered by FUDForum. Page generated in 0.03355 seconds
|