[equinox-dev] Caused by: org.osgi.framework.BundleException: State change in progress for bundle...by thread OSGi Console
Hi, Why do I face the following exception: [EMAIL PROTECTED] /cygdrive/c/projs/osgi/spring-osgi-install $ java -jar c:/apps/eclipse/plugins/org.eclipse.osgi_3.4.0.v20080205.jar -console osgi ss Framework is launched. id State Bundle 0 ACTIVE org.eclipse.osgi_3.4.0.v20080205 osgi install file:c:/projs/osgi/spring-osgi-install/target/spring-osgi-install-1.0.jar Bundle id is 1 osgi start 1 2008-04-03 22:26:06 pl.jaceklaskowski.osgi.AktywatorPakunku start Charakterystyka zainstalowanego pakunku: Identyfikator: 2 Identyfikator położenia: file:c:/projs/osgi/spring-osgi-activationpolicy/target/spring-osgi-activationpolicy-1.0.jar Nazwa symboliczna: pl.jaceklaskowski.osgi.spring-osgi-activationpolicy Startuj¦Ö pakunek pl.jaceklaskowski.osgi.spring-osgi-activationpolicy 2008-04-03 22:26:07 pl.jaceklaskowski.osgi.AktywatorPakunku start Charakterystyka zainstalowanego pakunku: Identyfikator: 2 Identyfikator położenia: file:c:/projs/osgi/spring-osgi-activationpolicy/target/spring-osgi-activationpolicy-1.0.jar Nazwa symboliczna: pl.jaceklaskowski.osgi.spring-osgi-activationpolicy Startuję pakunek pl.jaceklaskowski.osgi.spring-osgi-activationpolicy org.osgi.framework.BundleException: Exception in pl.jaceklaskowski.osgi.AktywatorPakunku.start() of bundle pl.jaceklaskowski.osgi.spring-osgi-install. at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:1018) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:974) at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:346) at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:265) at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:257) at org.eclipse.osgi.framework.internal.core.FrameworkCommandProvider._start(FrameworkCommandProvider.java:257) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.eclipse.osgi.framework.internal.core.FrameworkCommandInterpreter.execute(FrameworkCommandInterpreter.java:150) at org.eclipse.osgi.framework.internal.core.FrameworkConsole.docommand(FrameworkConsole.java:298) at org.eclipse.osgi.framework.internal.core.FrameworkConsole.console(FrameworkConsole.java:283) at org.eclipse.osgi.framework.internal.core.FrameworkConsole.run(FrameworkConsole.java:219) at java.lang.Thread.run(Thread.java:595) Caused by: org.osgi.framework.BundleException: Exception in pl.jaceklaskowski.osgi.AktywatorPakunku.start() of bundle pl.jaceklaskowski.osgi.spring-osgi-activationpolicy. at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:1018) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:974) at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:346) at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:265) at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:257) at pl.jaceklaskowski.osgi.AktywatorPakunku.start(AktywatorPakunku.java:26) at org.eclipse.osgi.framework.internal.core.BundleContextImpl$2.run(BundleContextImpl.java:999) at java.security.AccessController.doPrivileged(Native Method) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:993) ... 14 more Caused by: org.osgi.framework.BundleException: State change in progress for bundle file:c:/projs/osgi/spring-osgi-activationpolicy/target/spring-osgi-activationpolicy-1.0.jar by thread OSGi Console. at org.eclipse.osgi.framework.internal.core.AbstractBundle.beginStateChange(AbstractBundle.java:1143) at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:263) at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:257) at pl.jaceklaskowski.osgi.AktywatorPakunku.start(AktywatorPakunku.java:26) at org.eclipse.osgi.framework.internal.core.BundleContextImpl$2.run(BundleContextImpl.java:999) at java.security.AccessController.doPrivileged(Native Method) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:993) ... 22 more Caused
RE: [equinox-dev] [prov] p2 filtering
Ciao Susan :) Thanks a lot for your answers. We certainly want to use that query context, this can aid us in these two aspects: - entitlement - UI selection / custom selection Is this code going to be released to HEAD any time soon? I was about to start work on our custom query provider basically implementing the same concept, looks like you guys are doing this for us now :) Regarding the ProvisionPlan, this sounds like we need to make sure its sanity at various stages in the UI progress or will end up with an uninstallable set of IUs once the user presses finish, but this can be managed . So thanks a lot again, I appreciate the quick responses!! :) Ciao, hh -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Susan Franklin McCourt Sent: 03 April 2008 18:13 To: Equinox development mailing list Cc: equinox-dev@eclipse.org; [EMAIL PROTECTED] Subject: Re: [equinox-dev] [prov] p2 filtering Hi, Helmut. I'll take a stab at these, although I don't know about #3. 1) First ask the user what hosts/archs etc. he wants to install and then use that information in both the UI and the installation itself. Is this possible at all? The specific notion of considering the profile values for filtering is discussed in https://bugs.eclipse.org/bugs/show_bug.cgi?id=225365. Also, I'm working now on bug #216028, which provides alternate presentations of the available IU list (flat/by site/by category). To achieve this, I needed additional context, also. What I've done (not released yet) is add the notion of a QueryContext that can be set on any QueriedElement. The QueryContext can be used to determine what the exact query type should be, and in addition, the IQueryProvider can access it while building the query. For example, both the category and flat view are query type of AVAILABLE_IUS, but now the query provider and look into the query context and see if there is more info regarding grouping or filtering. Clients can install the context they want on the model elements. So..conceivably, if we don't yet implement profile-based filtering, this is something you could add by installing a query context into the elements. 2) Can a profile have multiple values for the same property? Like osgi.os=linuxwin32? I don't think so, someone please correct me if I'm wrong about this. 2.1) Profiels.getParent(): I've seen the concept of child/parent profiles, this might help answer question #2, This is really a placeholder concept based on experience with products in the provisioning space. Right now, p2 doesn't use it as a base level, but when the requirements were being discussed, this was an important concept in some installations. 4) I managed to get a lot of IStatus.ERROR in my ProvisionPlan, is checking the plan for errors the right way to look at the sanity of the set of IUs I want to install? Yes, an ERROR status on the plan means that the plan will not work. an OK means it will. With other status severities in between (INFO, WARNING), it's possible to pass the plan to the engine and something will happen (depending on the code/nature of the status.) Right now in the SDK UI, we do not let the user try a plan if it is not OK. In the Admin UI, we have a preference that allows users to try non-OK plans anyway. This would be up to your UI. susan Inactive hide details for Haigermoser, Helmut [EMAIL PROTECTED]Haigermoser, Helmut [EMAIL PROTECTED] Haigermoser, Helmut [EMAIL PROTECTED] Sent by: [EMAIL PROTECTED] 04/03/2008 12:57 AM Please respond to Equinox development mailing list To: equinox-dev@eclipse.org cc: Subject: [equinox-dev] [prov] p2 filtering Ciao Guys :) It surely is a busy time for you guys, let me thank you for putting some effort into answering my questions regardless of the huge efforts you are putting into M6/M7 right now! :) When looking at the platform's metadata repositories filtering is quite heavily used to flag IUs as being for a specific host/arch/ws (osgi-wise) which is why I thought this concept might be the right choice in our filtering as well. However, some things are yet unclear to me, our strategy of using filters might need to change depending on the answers you are able to give here. Let's start with the one-liner, plz correct me if I'm wrong: Filters are conditions for installing an IU, conditions that need to be fulfilled by the Profile. Right? One example: If the IU has a filter of osgi.os=win32 the IProfile needs the property osgi.os set to win32 (and only to that) in order for the Framework (Slicer.isApplicable()) to allow an installation. Assuming my statement to be (more or less ;)) true I have some questions along the way: 1.) UI : When presenting IUs to the user a query provider is consulted, but there is no IProfile context to filter the UI (thinking about the AVAILABLE_IU type).
Re: [equinox-dev] Caused by: org.osgi.framework.BundleException: State change in progress for bundle...by thread OSGi Console
Hi Jacek, I think this is some threading issue. First of all remember that in the start/stop methods of BundleActivator you shouldn't spawn a long running task (just use a new Thread to do this). In the javadoc to org.osgi.framework.BundleActivator#start() method is written: Called when this bundle is started so the Framework can perform the bundle-specific activities necessary to start this bundle. This method can be used to register services or to allocate any resources that this bundle needs. This method must complete and return to its caller in a timely manner. Otherwise you can block the OSGi console thread. I suspect that installing and resolving the Spring bundle may consume some amount of time and it should be in the start method. Moreover nesting a start of another bundle in your bundle is not the best idea. I am wondering if you are using OSGi console and you are able to install and start your bundle why you don't install and start the spring bundle? Anyway I think that BundleListener resolves your issue: package pl.jaceklaskowski.osgi; import java.util.logging.Level; import java.util.logging.Logger; import org.osgi.framework.Bundle; import org.osgi.framework.BundleActivator; import org.osgi.framework.BundleContext; import org.osgi.framework.BundleEvent; import org.osgi.framework.BundleException; import org.osgi.framework.BundleListener; public class AktywatorPakunku implements BundleActivator, BundleListener { Logger log = Logger.getLogger(AktywatorPakunku.class.getName()); private Bundle bundle; public void start(BundleContext bundleContext) throws Exception { // add bundle listener bundleContext.addBundleListener(this); bundle = bundleContext.installBundle( file:c:/projs/osgi/spring-osgi-activationpolicy/target/spring-osgi-activationpolicy-1.0.jar ); long bundleId = bundle.getBundleId(); String bundleLocation = bundle.getLocation(); String bundleSymbolicName = bundle.getSymbolicName(); System.out.println(); System.out.println(Charakterystyka zainstalowanego pakunku:); System.out.println( Identyfikator: + bundleId); System.out.println( Identyfikator położenia: + bundleLocation); System.out.println( Nazwa symboliczna: + bundleSymbolicName); System.out.println(); } public void stop(BundleContext bundleContext) throws Exception { // remove bundle listener bundleContext.removeBundleListener(this); log.info(stop() wykonano - czyszczę po sobie); } public void bundleChanged(BundleEvent event) { if (event.getType() == Bundle.RESOLVED event.getBundle() == bundle) { try { System.out.println(Startuję pakunek + bundle.getSymbolicName()); bundle.start(); } catch (BundleException e) { log.log(Level.SEVERE, e.getMessage()); } } } } --- Best regards, Lukasz Bobowiec Software Engineer, Common Agent Services [EMAIL PROTECTED] (+48 12) 628 9882 IBM SWG Lab, Cracow, Poland IBM Polska Sp. z o.o. oddział w Krakowie ul. Armii Krajowej 18 30 -150 Kraków NIP: 526-030-07-24 Sąd Rejonowy dla m.st. Warszawy, XIII Wydział Gospodarczy KRS KRS 012941, Kapitał zakładowy: 3.073.600 PLN Jacek Laskowski [EMAIL PROTECTED] Sent by: [EMAIL PROTECTED] 2008-04-04 08:55 Please respond to [EMAIL PROTECTED]; Please respond to Equinox development mailing list equinox-dev@eclipse.org To equinox-dev@eclipse.org cc Subject [equinox-dev] Caused by: org.osgi.framework.BundleException: State change in progress for bundle...by thread OSGi Console Hi, Why do I face the following exception: [EMAIL PROTECTED] /cygdrive/c/projs/osgi/spring-osgi-install $ java -jar c:/apps/eclipse/plugins/org.eclipse.osgi_3.4.0.v20080205.jar -console osgi ss Framework is launched. id State Bundle 0 ACTIVE org.eclipse.osgi_3.4.0.v20080205 osgi install file:c:/projs/osgi/spring-osgi-install/target/spring-osgi-install-1.0.jar Bundle id is 1 osgi start 1 2008-04-03 22:26:06 pl.jaceklaskowski.osgi.AktywatorPakunku start Charakterystyka zainstalowanego pakunku: Identyfikator: 2 Identyfikator położenia: file:c:/projs/osgi/spring-osgi-activationpolicy/target/spring-osgi-activationpolicy-1.0.jar Nazwa symboliczna: pl.jaceklaskowski.osgi.spring-osgi-activationpolicy Startuj?Ö pakunek pl.jaceklaskowski.osgi.spring-osgi-activationpolicy 2008-04-03 22:26:07 pl.jaceklaskowski.osgi.AktywatorPakunku start Charakterystyka zainstalowanego pakunku: Identyfikator: 2 Identyfikator położenia:
Re: [equinox-dev] Caused by: org.osgi.framework.BundleException: State change in progress for bundle...by thread OSGi Console
Hi Lukasz's solution assumes that the bundle you are installing will eventually enter the RESOLVED state. This is not going to happen automatically. You would have to run a PackageAdmin.resolveBundles to make the bundle resolve. The actual exception seems to be occurring because the second bundle you are installing and starting is trying to start the original bundle again. Since this is all happening on the same thread the Framework does not allow the second lifecycle operation proceed because the thread is already in the process of starting the first bundle. Tom From: Lukasz Bobowiec [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: equinox-dev@eclipse.org Date: 04/04/2008 05:41 AM Subject:Re: [equinox-dev] Caused by: org.osgi.framework.BundleException: State change in progress for bundle...by thread OSGi Console Hi Jacek, I think this is some threading issue. First of all remember that in the start/stop methods of BundleActivator you shouldn't spawn a long running task (just use a new Thread to do this). In the javadoc to org.osgi.framework.BundleActivator#start() method is written: Called when this bundle is started so the Framework can perform the bundle-specific activities necessary to start this bundle. This method can be used to register services or to allocate any resources that this bundle needs. This method must complete and return to its caller in a timely manner. Otherwise you can block the OSGi console thread. I suspect that installing and resolving the Spring bundle may consume some amount of time and it should be in the start method. Moreover nesting a start of another bundle in your bundle is not the best idea. I am wondering if you are using OSGi console and you are able to install and start your bundle why you don't install and start the spring bundle? Anyway I think that BundleListener resolves your issue: package pl.jaceklaskowski.osgi; import java.util.logging.Level; import java.util.logging.Logger; import org.osgi.framework.Bundle; import org.osgi.framework.BundleActivator; import org.osgi.framework.BundleContext; import org.osgi.framework.BundleEvent; import org.osgi.framework.BundleException; import org.osgi.framework.BundleListener; public class AktywatorPakunku implements BundleActivator, BundleListener { Logger log = Logger.getLogger(AktywatorPakunku.class.getName()); private Bundle bundle; public void start(BundleContext bundleContext) throws Exception { // add bundle listener bundleContext.addBundleListener(this); bundle = bundleContext.installBundle( file:c:/projs/osgi/spring-osgi-activationpolicy/target/spring-osgi-activationpolicy-1.0.jar ); long bundleId = bundle.getBundleId(); String bundleLocation = bundle.getLocation(); String bundleSymbolicName = bundle.getSymbolicName(); System.out.println(); System.out.println(Charakterystyka zainstalowanego pakunku:); System.out.println( Identyfikator: + bundleId); System.out.println( Identyfikator położenia: + bundleLocation); System.out.println( Nazwa symboliczna: + bundleSymbolicName); System.out.println(); } public void stop(BundleContext bundleContext) throws Exception { // remove bundle listener bundleContext.removeBundleListener(this); log.info(stop() wykonano - czyszczę po sobie); } public void bundleChanged(BundleEvent event) { if (event.getType() == Bundle.RESOLVED event.getBundle() == bundle) { try {
Re: [equinox-dev] The RCP-delta feature
Hi Thomas, Are you wanting a feature to install the RCP-delta packs or a feature that contains only the launchers? The launchers for the various platforms are available from the equinox download page at http://download.eclipse.org/eclipse/equinox/drops/S-3.4 M6-200803301350/index.php But I think the launcher zips suffer from the same issues you have about the RCP-delta pack zip available on the Eclipse SDK download page. What is the recommended work flow in p2 to get the RCP-delta pack installed into your target? Seems like we would need an update site for the delta pack if we want a clean way to provision it with p2. Tom From: Thomas Hallgren [EMAIL PROTECTED] To: Equinox development mailing list equinox-dev@eclipse.org Date: 04/03/2008 04:48 AM Subject:[equinox-dev] The RCP-delta feature Hi, I was trying to find the org.eclipse.equinox.executable feature on an update site at Eclipse.org but failed. Do I miss something here or is the only way to install the RCP-delta feature to download the zip and unpack it on top of an existing platform? Using a Buckminster build it would be great if it could be treated just like any other installable feature. Regards, Thomas Hallgren ___ equinox-dev mailing list equinox-dev@eclipse.org https://dev.eclipse.org/mailman/listinfo/equinox-dev inline: graycol.gifinline: ecblank.gif___ equinox-dev mailing list equinox-dev@eclipse.org https://dev.eclipse.org/mailman/listinfo/equinox-dev
[equinox-dev] [prov] p2 source plug-ins
Ciao Guys :) Just tried to use the official M6 plug-ins from my target platform to check something and found no source during debugging, guess adding the source plug-ins to the SDK is on your list already but wanted to make sure ... HTH, Ciao, hh ___ equinox-dev mailing list equinox-dev@eclipse.org https://dev.eclipse.org/mailman/listinfo/equinox-dev
Re: [equinox-dev] [prov] p2 source plug-ins
Yes it is a known bug. | | From: | | | |Haigermoser, Helmut [EMAIL PROTECTED] | | | | To:| | | |equinox-dev@eclipse.org | | | | Date: | | | |04/04/2008 12:12 PM | | | | Subject: | | | |[equinox-dev] [prov] p2 source plug-ins | | Ciao Guys :) Just tried to use the official M6 plug-ins from my target platform to check something and found no source during debugging, guess adding the source plug-ins to the SDK is on your list already but wanted to make sure ... HTH, Ciao, hh ___ equinox-dev mailing list equinox-dev@eclipse.org https://dev.eclipse.org/mailman/listinfo/equinox-dev ___ equinox-dev mailing list equinox-dev@eclipse.org https://dev.eclipse.org/mailman/listinfo/equinox-dev
[equinox-dev] pack200 M5 question
Using the example on this page http://wiki.eclipse.org/index.php/Pack200 Specifically : java -jar /eclipse/startup.jar -application org.eclipse.update.core.siteOptimizer -jarProcessor -processAll -repack -sign signing-script.sh -outputDir ./out sample.jar For Eclipse 3.2.x - this seems to work ok For Eclipse 3.4 M5 - I thought I would only have to change startup.jar to org.eclipse.equinox.launcher.jar but this did not seem to work. What else needs to change? Janet Dmitrovich WPLC Expeditor Software Development [EMAIL PROTECTED] 512-838-4912 T/L:678-4912 FAX:512-838-3703 11501 Burnet Road, Austin TX 78758 (Internal ZIP: 9372) ___ equinox-dev mailing list equinox-dev@eclipse.org https://dev.eclipse.org/mailman/listinfo/equinox-dev
Re: [equinox-dev] pack200 M5 question
Janet, Changing startup.jar to org.eclipse.equinox.launcher should work, note that you need to make sure you reference the actual jar in your install which will have a version number on it. Eg: java -jar /eclipse/plugins/org.eclipse.equinox.launcher_1.0.100.v20080303.jar -application -Andrew Janet Dmitrovich [EMAIL PROTECTED] Sent by: [EMAIL PROTECTED] 04/04/2008 02:35 PM Please respond to Equinox development mailing list equinox-dev@eclipse.org To equinox-dev@eclipse.org cc Subject [equinox-dev] pack200 M5 question Using the example on this page http://wiki.eclipse.org/index.php/Pack200 Specifically : java -jar /eclipse/startup.jar -application org.eclipse.update.core.siteOptimizer -jarProcessor -processAll -repack -sign signing-script.sh -outputDir ./out sample.jar For Eclipse 3.2.x - this seems to work ok For Eclipse 3.4 M5 - I thought I would only have to change startup.jar to org.eclipse.equinox.launcher.jar but this did not seem to work. What else needs to change? Janet Dmitrovich WPLC Expeditor Software Development [EMAIL PROTECTED] 512-838-4912 T/L:678-4912 FAX:512-838-3703 11501 Burnet Road, Austin TX 78758 (Internal ZIP: 9372) ___ equinox-dev mailing list equinox-dev@eclipse.org https://dev.eclipse.org/mailman/listinfo/equinox-dev ___ equinox-dev mailing list equinox-dev@eclipse.org https://dev.eclipse.org/mailman/listinfo/equinox-dev
[equinox-dev] Project meta data is out of date for eclipse.equinox
Projects are required to keep meta data up to date using the MyFoundation Portal (http://portal.eclipse.org/). The following problems were found with this project's meta-data: * Project home page does not have an About This Project or Information about project item at the top of the left menu. Projects are required to provide that standard link on their home page (see http://www.eclipse.org/projects/dev_process/project-status-infrastructure/l eft-menu.php). ___ equinox-dev mailing list equinox-dev@eclipse.org https://dev.eclipse.org/mailman/listinfo/equinox-dev