[jboss-osgi-issues] [JBoss JIRA] Updated: (JBOSGI-450) Bundle containing a BundleTracker causes subsequent bundle install/starts to fail
David Bosschaert (JIRA)
jira-events at lists.jboss.org
Wed May 18 08:37:00 EDT 2011
[ https://issues.jboss.org/browse/JBOSGI-450?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
David Bosschaert updated JBOSGI-450:
------------------------------------
Attachment: TestBundle_1.0.0.jar
To reproduce, simply install/start the attached bundle. Any subsequent bundles being installed expose the problem.
The attached bundle contains the following code:
{code}public class Activator implements BundleActivator {
private BundleTracker bt;
public void start(BundleContext context) throws Exception {
System.out.println("Hello World!!");
bt = new BundleTracker(context, Bundle.INSTALLED | Bundle.RESOLVED | Bundle.STARTING | Bundle.ACTIVE, new MyCustomizer());
bt.open();
}
public void stop(BundleContext context) throws Exception {
System.out.println("Goodbye World!!");
bt.close();
}
}{code}
{code}public class MyCustomizer implements BundleTrackerCustomizer {
@Override
public Object addingBundle(Bundle bundle, BundleEvent event) {
return bundle;
}
@Override
public void modifiedBundle(Bundle bundle, BundleEvent event, Object object) {
}
@Override
public void removedBundle(Bundle bundle, BundleEvent event, Object object) {
}
}{code}
> Bundle containing a BundleTracker causes subsequent bundle install/starts to fail
> ---------------------------------------------------------------------------------
>
> Key: JBOSGI-450
> URL: https://issues.jboss.org/browse/JBOSGI-450
> Project: JBoss OSGi
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Core Framework
> Affects Versions: JBossOSGi 1.0.x
> Reporter: David Bosschaert
> Assignee: David Bosschaert
> Attachments: deadlock.txt, TestBundle_1.0.0.jar
>
>
> When installing/starting a bundle with a BundleTracker in it subsuquent bundle install/starts fail with the following exception.
> 20:01:00,460 INFO [org.jboss.osgi.framework.internal.BundleManager] (MSC service thread 1-2) Install bundle: org.apache.aries.spifly.examples.spi.bundle:0.4.0.SNAPSHOT
> 20:01:02,531 ERROR [org.jboss.osgi.framework.internal.FutureServiceValue] (MSC service thread 1-2) Cannot start service jbosgi.bundle.11.INSTALLED
> 20:01:02,532 WARN [org.jboss.osgi.framework.internal.FrameworkEventsPlugin] (MSC service thread 1-2) Error while firing INSTALLED for bundleState: org.apache.aries.spifly.examples.spi.bundle:0.4.0.SNAPSHOT: java.lang.IllegalStateException: Timeout starting bundle service: service jbosgi.bundle.11.INSTALLED
> at org.jboss.osgi.framework.internal.BundleProxy.awaitBundleServiceActive(BundleProxy.java:231)
> at org.jboss.osgi.framework.internal.BundleProxy.getState(BundleProxy.java:101)
> at org.jboss.osgi.framework.internal.HostBundleProxy.getState(HostBundleProxy.java:39)
> at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:406)
> at org.jboss.osgi.framework.internal.FrameworkEventsPlugin.fireBundleEvent(FrameworkEventsPlugin.java:361)
> at org.jboss.osgi.framework.internal.AbstractBundleState.changeState(AbstractBundleState.java:198)
> at org.jboss.osgi.framework.internal.AbstractBundleState.changeState(AbstractBundleState.java:181)
> at org.jboss.osgi.framework.internal.UserBundleService.start(UserBundleService.java:65)
> at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1675)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_20]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_20]
> at java.lang.Thread.run(Thread.java:619) [:1.6.0_20]
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-osgi-issues
mailing list