Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Problems with product plug-in start level configuration form
Problems with product plug-in start level configuration form [message #59154] Fri, 01 May 2009 00:13 Go to next message
Eric Jain is currently offline Eric JainFriend
Messages: 266
Registered: July 2009
Senior Member
In 3.5M6 there appears to be a form in the product configuration edit page
where one can list plug-ins that need to be auto-started (along with their
start levels). There is an existing bug report (resolved for M7,
apparently) about the launcher ignoring these settings, but I've run into
two other problems:

1. The Start-Level and Auto-Start fields are read only. (Work-around:
Edit source...)

2. If I list even one plug-in, the application fails with this exception:

"java.lang.IllegalStateException: Unable to acquire application service.
Ensure that the org.eclipse.core.runtime bundle is resolved and started
(see config.ini)."

Looking into the config.ini, I see that the following entry has been
replaced with a long list of bundles, none of which has :start!


osgi.bundles=reference\:file\:org.eclipse.equinox.simpleconfigurator.jar@1\:start

Is this behavior expected? If not, might this already be fixed in the
upcoming milestone release, or should I create a bug report?
Re: Problems with product plug-in start level configuration form [message #59180 is a reply to message #59154] Fri, 01 May 2009 12:52 Go to previous messageGo to next message
Chris Aniszczyk is currently offline Chris AniszczykFriend
Messages: 674
Registered: July 2009
Senior Member
Eric Jain wrote:
> In 3.5M6 there appears to be a form in the product configuration edit
> page where one can list plug-ins that need to be auto-started (along
> with their start levels). There is an existing bug report (resolved for
> M7, apparently) about the launcher ignoring these settings, but I've run
> into two other problems:
>
> 1. The Start-Level and Auto-Start fields are read only. (Work-around:
> Edit source...)
>
> 2. If I list even one plug-in, the application fails with this exception:
>
> "java.lang.IllegalStateException: Unable to acquire application
> service. Ensure that the org.eclipse.core.runtime bundle is resolved and
> started (see config.ini)."
>
> Looking into the config.ini, I see that the following entry has been
> replaced with a long list of bundles, none of which has :start!
>
>
> osgi.bundles=reference\:file\:org.eclipse.equinox.simpleconfigurator.jar@1\:start
>
>
> Is this behavior expected? If not, might this already be fixed in the
> upcoming milestone release, or should I create a bug report?

So that behavior is fine, simpleconfigurator is being used since you
included it in your product definition somehow. Under the covers, p2 is
used to managed your bundles and a bundle.info is created that lists all
the bundles along with proper start levels.

One thing you have to becareful about is ensuring your start levels are
properly set for bundles like core.runtime and equinox.common if you're
building an RCP application. The launch configurations in Eclipse
generally set these bundles to their appropriate start levels. One thing
I recommend for people is if they have a launch configuration working
with their product, they can create a new product definition from a
LAUNCH CONFIGURATION and by doing that, it should set the proper start
levels in the definition itself.

Does that help?

Also, I'd wait until M7 as there were a few holes that had to be ironed
out with that functionality which you noticed :)

Cheers,

Chris Aniszczyk | EclipseSource Austin | +1 860 839 2465
http://twitter.com/eclipsesource | http://twitter.com/caniszczyk
Re: Problems with product plug-in start level configuration form [message #59303 is a reply to message #59180] Sat, 02 May 2009 18:00 Go to previous messageGo to next message
Eric Jain is currently offline Eric JainFriend
Messages: 266
Registered: July 2009
Senior Member
Chris Aniszczyk wrote:
> So that behavior is fine, simpleconfigurator is being used since you
> included it in your product definition somehow. Under the covers, p2 is
> used to managed your bundles and a bundle.info is created that lists all
> the bundles along with proper start levels.

Sorry for being unclear: simpleconfigurator is only being used as long as
I *don't* specify any bundles in the configuration page of the product
editor. If I list even one bundle,
osgi.bundles=[...]simpleconfigurator.jar@1:start is replaced with a long
list of all bundles, and none has "start". Looks like a bug to me, but
this may already be fixed in M7?

I've also tried placing a p2.inf file with "instructions.install =
markStarted(started:true);" into the META-INF of a bundle that I'd like to
have started automatically. Even though the file appears to be processed
by the build script (there is an error if I mess up the syntax), this
doesn't mark the bundle as started in the generated bundles.info file...


> One thing you have to becareful about is ensuring your start levels are
> properly set for bundles like core.runtime and equinox.common if you're
> building an RCP application. The launch configurations in Eclipse
> generally set these bundles to their appropriate start levels. One thing
> I recommend for people is if they have a launch configuration working
> with their product, they can create a new product definition from a
> LAUNCH CONFIGURATION and by doing that, it should set the proper start
> levels in the definition itself.

If I launch the product from Eclipse and tell it to generate a config.ini
file, there is the same problem as with the headless build. Again, if I
don't list any bundles and start levels in the product configuration page,
all is fine.

btw are there plans to let a launch configuration use the bundles and
start levels defined in the product file, or will this information still
have to be maintained in duplicate?
Re: Problems with product plug-in start level configuration form [message #59378 is a reply to message #59303] Sat, 02 May 2009 21:00 Go to previous messageGo to next message
Chris Aniszczyk is currently offline Chris AniszczykFriend
Messages: 674
Registered: July 2009
Senior Member
Eric Jain wrote:
> Sorry for being unclear: simpleconfigurator is only being used as long
> as I *don't* specify any bundles in the configuration page of the
> product editor. If I list even one bundle,
> osgi.bundles=[...]simpleconfigurator.jar@1:start is replaced with a long
> list of all bundles, and none has "start". Looks like a bug to me, but
> this may already be fixed in M7?

This is the way the logic works in PDE when self-hosting:

If you have simpleconfigurator in your list of bundles in the
dependencies page via a bundle or feature, we will use p2 and generate a
proper bundles.info file.

If you have update.configurator, we will use that (not recommended)

If you don't list any configurator, we will simply write out all the
bundles and their proper start levels in the osgi.bundles property.
There is no management of bundles via a configurator with this approach.
This isn't generally recommend either unless you have a specific use
case of your app not being updated (or via something that isn't p2 or
Update).

If you include both configurators by accident, PDE will choose
simpleconfigurator (p2).

> I've also tried placing a p2.inf file with "instructions.install =
> markStarted(started:true);" into the META-INF of a bundle that I'd like
> to have started automatically. Even though the file appears to be
> processed by the build script (there is an error if I mess up the
> syntax), this doesn't mark the bundle as started in the generated
> bundles.info file...

PDE doesn't look at p2.inf files when generating launch configurations
or the bundles.info when self-hosting. You're free to open a bug about
this, but it probably won't get addressed in 3.5... you should really be
used the product definition to drive start levels imho


> If I launch the product from Eclipse and tell it to generate a
> config.ini file, there is the same problem as with the headless build.
> Again, if I don't list any bundles and start levels in the product
> configuration page, all is fine.

Can you be more specific what the problem is?

> btw are there plans to let a launch configuration use the bundles and
> start levels defined in the product file, or will this information still
> have to be maintained in duplicate?

When you launch from the product definition, PDE should sync the launch
configuration with the correct start level information.

Please try out your scenarios with Eclipse 3.5 M7 which just came out
today. It would be great if you could report back :)

http://eclipsesource.com/blogs/2009/05/02/eclipse-35m7-is-ou t/

Cheers,

Chris Aniszczyk | EclipseSource Austin | +1 860 839 2465
http://twitter.com/eclipsesource | http://twitter.com/caniszczyk
Re: Problems with product plug-in start level configuration form [message #59500 is a reply to message #59378] Mon, 04 May 2009 17:41 Go to previous messageGo to next message
Eric Jain is currently offline Eric JainFriend
Messages: 266
Registered: July 2009
Senior Member
Chris Aniszczyk wrote:
> Please try out your scenarios with Eclipse 3.5 M7 which just came out
> today. It would be great if you could report back :)

> http://eclipsesource.com/blogs/2009/05/02/eclipse-35m7-is-ou t/

Still waiting for http://www.eclipse.org/downloads/ to be updated for M7...

If I download from
http://download.eclipse.org/eclipse/downloads/drops/S-3.5M7- 200904302300/index.php,
what's the equivalent (or superset) of the "Eclipse for RCP/Plug-in
Developers" package?
Re: Problems with product plug-in start level configuration form [message #59906 is a reply to message #59378] Thu, 07 May 2009 01:01 Go to previous messageGo to next message
Eric Jain is currently offline Eric JainFriend
Messages: 266
Registered: July 2009
Senior Member
Chris Aniszczyk wrote:
> Please try out your scenarios with Eclipse 3.5 M7 which just came out
> today. It would be great if you could report back :)

Using 3.5M7 and generating the product file from the launch configuration,
everything works fine (after editing the product configuration source to
work around the bugs mentioned in msacarny's thread).
Re: Problems with product plug-in start level configuration form [message #59930 is a reply to message #59378] Thu, 07 May 2009 01:08 Go to previous message
Eric Jain is currently offline Eric JainFriend
Messages: 266
Registered: July 2009
Senior Member
Chris Aniszczyk wrote:
> PDE doesn't look at p2.inf files when generating launch configurations
> or the bundles.info when self-hosting. You're free to open a bug about
> this, but it probably won't get addressed in 3.5... you should really be
> used the product definition to drive start levels imho

I'm building some optional bundles that I need to be STARTED e.g. when
they are copied to the "dropins" folder. Right now they just appear as
RESOLVED. I can't reference these bundles from the main configuration as I
don't know which of them will be available. Had hoped a p2.inf with
"instructions.install = markStarted(started:true);" would help, but looks
like it won't. Other ideas?
Re: Problems with product plug-in start level configuration form [message #596647 is a reply to message #59154] Fri, 01 May 2009 12:52 Go to previous message
Chris Aniszczyk is currently offline Chris AniszczykFriend
Messages: 674
Registered: July 2009
Senior Member
Eric Jain wrote:
> In 3.5M6 there appears to be a form in the product configuration edit
> page where one can list plug-ins that need to be auto-started (along
> with their start levels). There is an existing bug report (resolved for
> M7, apparently) about the launcher ignoring these settings, but I've run
> into two other problems:
>
> 1. The Start-Level and Auto-Start fields are read only. (Work-around:
> Edit source...)
>
> 2. If I list even one plug-in, the application fails with this exception:
>
> "java.lang.IllegalStateException: Unable to acquire application
> service. Ensure that the org.eclipse.core.runtime bundle is resolved and
> started (see config.ini)."
>
> Looking into the config.ini, I see that the following entry has been
> replaced with a long list of bundles, none of which has :start!
>
>
> osgi.bundles=reference\:file\:org.eclipse.equinox.simpleconfigurator.jar@1\:start
>
>
> Is this behavior expected? If not, might this already be fixed in the
> upcoming milestone release, or should I create a bug report?

So that behavior is fine, simpleconfigurator is being used since you
included it in your product definition somehow. Under the covers, p2 is
used to managed your bundles and a bundle.info is created that lists all
the bundles along with proper start levels.

One thing you have to becareful about is ensuring your start levels are
properly set for bundles like core.runtime and equinox.common if you're
building an RCP application. The launch configurations in Eclipse
generally set these bundles to their appropriate start levels. One thing
I recommend for people is if they have a launch configuration working
with their product, they can create a new product definition from a
LAUNCH CONFIGURATION and by doing that, it should set the proper start
levels in the definition itself.

Does that help?

Also, I'd wait until M7 as there were a few holes that had to be ironed
out with that functionality which you noticed :)

Cheers,

Chris Aniszczyk | EclipseSource Austin | +1 860 839 2465
http://twitter.com/eclipsesource | http://twitter.com/caniszczyk
Re: Problems with product plug-in start level configuration form [message #596685 is a reply to message #59180] Sat, 02 May 2009 18:00 Go to previous message
Eric Jain is currently offline Eric JainFriend
Messages: 266
Registered: July 2009
Senior Member
Chris Aniszczyk wrote:
> So that behavior is fine, simpleconfigurator is being used since you
> included it in your product definition somehow. Under the covers, p2 is
> used to managed your bundles and a bundle.info is created that lists all
> the bundles along with proper start levels.

Sorry for being unclear: simpleconfigurator is only being used as long as
I *don't* specify any bundles in the configuration page of the product
editor. If I list even one bundle,
osgi.bundles=[...]simpleconfigurator.jar@1:start is replaced with a long
list of all bundles, and none has "start". Looks like a bug to me, but
this may already be fixed in M7?

I've also tried placing a p2.inf file with "instructions.install =
markStarted(started:true);" into the META-INF of a bundle that I'd like to
have started automatically. Even though the file appears to be processed
by the build script (there is an error if I mess up the syntax), this
doesn't mark the bundle as started in the generated bundles.info file...


> One thing you have to becareful about is ensuring your start levels are
> properly set for bundles like core.runtime and equinox.common if you're
> building an RCP application. The launch configurations in Eclipse
> generally set these bundles to their appropriate start levels. One thing
> I recommend for people is if they have a launch configuration working
> with their product, they can create a new product definition from a
> LAUNCH CONFIGURATION and by doing that, it should set the proper start
> levels in the definition itself.

If I launch the product from Eclipse and tell it to generate a config.ini
file, there is the same problem as with the headless build. Again, if I
don't list any bundles and start levels in the product configuration page,
all is fine.

btw are there plans to let a launch configuration use the bundles and
start levels defined in the product file, or will this information still
have to be maintained in duplicate?
Re: Problems with product plug-in start level configuration form [message #596717 is a reply to message #59303] Sat, 02 May 2009 21:00 Go to previous message
Chris Aniszczyk is currently offline Chris AniszczykFriend
Messages: 674
Registered: July 2009
Senior Member
Eric Jain wrote:
> Sorry for being unclear: simpleconfigurator is only being used as long
> as I *don't* specify any bundles in the configuration page of the
> product editor. If I list even one bundle,
> osgi.bundles=[...]simpleconfigurator.jar@1:start is replaced with a long
> list of all bundles, and none has "start". Looks like a bug to me, but
> this may already be fixed in M7?

This is the way the logic works in PDE when self-hosting:

If you have simpleconfigurator in your list of bundles in the
dependencies page via a bundle or feature, we will use p2 and generate a
proper bundles.info file.

If you have update.configurator, we will use that (not recommended)

If you don't list any configurator, we will simply write out all the
bundles and their proper start levels in the osgi.bundles property.
There is no management of bundles via a configurator with this approach.
This isn't generally recommend either unless you have a specific use
case of your app not being updated (or via something that isn't p2 or
Update).

If you include both configurators by accident, PDE will choose
simpleconfigurator (p2).

> I've also tried placing a p2.inf file with "instructions.install =
> markStarted(started:true);" into the META-INF of a bundle that I'd like
> to have started automatically. Even though the file appears to be
> processed by the build script (there is an error if I mess up the
> syntax), this doesn't mark the bundle as started in the generated
> bundles.info file...

PDE doesn't look at p2.inf files when generating launch configurations
or the bundles.info when self-hosting. You're free to open a bug about
this, but it probably won't get addressed in 3.5... you should really be
used the product definition to drive start levels imho


> If I launch the product from Eclipse and tell it to generate a
> config.ini file, there is the same problem as with the headless build.
> Again, if I don't list any bundles and start levels in the product
> configuration page, all is fine.

Can you be more specific what the problem is?

> btw are there plans to let a launch configuration use the bundles and
> start levels defined in the product file, or will this information still
> have to be maintained in duplicate?

When you launch from the product definition, PDE should sync the launch
configuration with the correct start level information.

Please try out your scenarios with Eclipse 3.5 M7 which just came out
today. It would be great if you could report back :)

http://eclipsesource.com/blogs/2009/05/02/eclipse-35m7-is-ou t/

Cheers,

Chris Aniszczyk | EclipseSource Austin | +1 860 839 2465
http://twitter.com/eclipsesource | http://twitter.com/caniszczyk
Re: Problems with product plug-in start level configuration form [message #596750 is a reply to message #59378] Mon, 04 May 2009 17:41 Go to previous message
Eric Jain is currently offline Eric JainFriend
Messages: 266
Registered: July 2009
Senior Member
Chris Aniszczyk wrote:
> Please try out your scenarios with Eclipse 3.5 M7 which just came out
> today. It would be great if you could report back :)

> http://eclipsesource.com/blogs/2009/05/02/eclipse-35m7-is-ou t/

Still waiting for http://www.eclipse.org/downloads/ to be updated for M7...

If I download from
http://download.eclipse.org/eclipse/downloads/drops/S-3.5M7- 200904302300/index.php,
what's the equivalent (or superset) of the "Eclipse for RCP/Plug-in
Developers" package?
Re: Problems with product plug-in start level configuration form [message #596903 is a reply to message #59378] Thu, 07 May 2009 01:01 Go to previous message
Eric Jain is currently offline Eric JainFriend
Messages: 266
Registered: July 2009
Senior Member
Chris Aniszczyk wrote:
> Please try out your scenarios with Eclipse 3.5 M7 which just came out
> today. It would be great if you could report back :)

Using 3.5M7 and generating the product file from the launch configuration,
everything works fine (after editing the product configuration source to
work around the bugs mentioned in msacarny's thread).
Re: Problems with product plug-in start level configuration form [message #596911 is a reply to message #59378] Thu, 07 May 2009 01:08 Go to previous message
Eric Jain is currently offline Eric JainFriend
Messages: 266
Registered: July 2009
Senior Member
Chris Aniszczyk wrote:
> PDE doesn't look at p2.inf files when generating launch configurations
> or the bundles.info when self-hosting. You're free to open a bug about
> this, but it probably won't get addressed in 3.5... you should really be
> used the product definition to drive start levels imho

I'm building some optional bundles that I need to be STARTED e.g. when
they are copied to the "dropins" folder. Right now they just appear as
RESOLVED. I can't reference these bundles from the main configuration as I
don't know which of them will be available. Had hoped a p2.inf with
"instructions.install = markStarted(started:true);" would help, but looks
like it won't. Other ideas?
Previous Topic:Using p2.inf to create a directory
Next Topic:Using target platform definitions (.target) in headless build
Goto Forum:
  


Current Time: Thu Mar 28 20:55:50 GMT 2024

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

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

Back to the top