P1 blocker bug with loading of OSGi Extensions [message #99858] |
Tue, 16 October 2007 13:24 |
Eclipse User |
|
|
|
Originally posted by: Jan-Hendrik.Diederich.bredex.de
Hi,
I think I've found a big bug with the loading of OSGi Extensions. Although
I define "-Dosgi.framework.extensions=myextension" as a JavaVM argument,
or write "osgi.framework.extensions=myextension" directly in the
configuration/config.ini file, my extension isn't in the classpath. At
least not at that time when all "hookconfigurators.properties" files are
loaded.
I think this is a bug. The self-written startup classLoader doesn't get
the right classpaths.
Here is the code from HookRegistry which handles the Hook loading:
private void mergeFileHookConfigurators(ArrayList configuratorList,
ArrayList errors) {
ClassLoader cl = getClass().getClassLoader();
// get all hook configurators files in your classloader delegation
Enumeration hookConfigurators;
try {
hookConfigurators = cl != null
// Here it fails! My extension has this file, but the properties file
doesn't make it in the list:
? cl.getResources(HookRegistry.HOOK_CONFIGURATORS_FILE)
: ClassLoader.
getSystemResources(HookRegistry.HOOK_CONFIGURATORS_FILE);
} catch (IOException e) { ... return; }
If I add it manually, and handle later the actual loading of the file by
myself, everything works fine.
I use mainly eclipse 3.3.0, but tested also 3.3.1 and saw no difference.
I think this needs to be fixed and posted as a "P1, Blocker" - Bug.
Jan Diederich
|
|
|
Re: P1 blocker bug with loading of OSGi Extensions [message #99887 is a reply to message #99858] |
Tue, 16 October 2007 14:29 |
Simon Kaegi Messages: 381 Registered: July 2009 |
Senior Member |
|
|
Could you log a bug and attach any resources to help create a test case.
Thanks.
-Simon
"Jan Diederich" <Jan-Hendrik.Diederich@bredex.de> wrote in message
news:9158a0f52373c513fe4dc84e3ffcf97c$1@www.eclipse.org...
> Hi,
> I think I've found a big bug with the loading of OSGi Extensions. Although
> I define "-Dosgi.framework.extensions=myextension" as a JavaVM argument,
> or write "osgi.framework.extensions=myextension" directly in the
> configuration/config.ini file, my extension isn't in the classpath. At
> least not at that time when all "hookconfigurators.properties" files are
> loaded.
> I think this is a bug. The self-written startup classLoader doesn't get
> the right classpaths.
> Here is the code from HookRegistry which handles the Hook loading:
>
> private void mergeFileHookConfigurators(ArrayList configuratorList,
> ArrayList errors) {
> ClassLoader cl = getClass().getClassLoader();
> // get all hook configurators files in your classloader delegation
> Enumeration hookConfigurators;
> try {
> hookConfigurators = cl != null
> // Here it fails! My extension has this file, but the properties file
> doesn't make it in the list:
> ? cl.getResources(HookRegistry.HOOK_CONFIGURATORS_FILE)
> : ClassLoader.
> getSystemResources(HookRegistry.HOOK_CONFIGURATORS_FILE);
> } catch (IOException e) { ... return; }
>
> If I add it manually, and handle later the actual loading of the file by
> myself, everything works fine.
> I use mainly eclipse 3.3.0, but tested also 3.3.1 and saw no difference.
>
> I think this needs to be fixed and posted as a "P1, Blocker" - Bug.
> Jan Diederich
>
|
|
|
Re: P1 blocker bug with loading of OSGi Extensions [message #99946 is a reply to message #99887] |
Wed, 17 October 2007 09:41 |
Eclipse User |
|
|
|
Originally posted by: Jan-Hendrik.Diederich.bredex.de
Yes, I will create a simple straightforward test. But logging makes no
sense since the problem is that _nothing_ happens!
Simon Kaegi wrote:
> Could you log a bug and attach any resources to help create a test case.
> Thanks.
|
|
|
|
|
|
Re: P1 blocker bug with loading of OSGi Extensions [message #100005 is a reply to message #99992] |
Thu, 18 October 2007 08:00 |
Eclipse User |
|
|
|
Originally posted by: Jan-Hendrik.Diederich.bredex.de
Tom Watson wrote:
> For example, add _1.0.0 to the jar name.
> org.eclipse.equinox.hookBug_1.0.0.jar
Great, that seems to work smoothly.
I edited the wiki entry about Adapter Hooks and mentioned the bug, so that
others will not run into the same problem.
Thanks,
Jan
|
|
|
Re: P1 blocker bug with loading of OSGi Extensions [message #100018 is a reply to message #99858] |
Thu, 18 October 2007 09:31 |
Eclipse User |
|
|
|
Originally posted by: Jan-Hendrik.Diederich.bredex.de
I don't get it: How do you use your extension in a launcher configuration?
I renamed my project already to "myproject_1.0.0.0", but it's ignored. I
think also this isn't necessary. How must the launcher be configured to
launch an Eclipse-RCP-with-OSGi-Extension Product?
Thanks for any answers,
Jan
|
|
|
Powered by
FUDForum. Page generated in 0.03335 seconds