[jboss-dev-forums] [JBoss OSGi Dev] - Bundle.start() does not transition to ACTIVE

thomas.diesler@jboss.com do-not-reply at jboss.com
Fri Aug 21 09:29:35 EDT 2009


It seems that bundle.start() does not transition the bundle's state.


  | [tdiesler at tdvaio osgi-int]$ mvn -Dtest=SimpleBundleTestCase install
  | 
  | Running org.jboss.test.osgi.simple.SimpleBundleTestCase
  | Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 2.793 sec <<< FAILURE!
  | 
  | java.lang.AssertionError: Bundle state expected:<32> but was:<2>
  | 	at org.junit.Assert.fail(Assert.java:92)
  | 	at org.junit.Assert.failNotEquals(Assert.java:689)
  | 	at org.junit.Assert.assertEquals(Assert.java:127)
  | 	at org.junit.Assert.assertEquals(Assert.java:514)
  | 	at org.jboss.test.osgi.simple.SimpleBundleTestCase.testBundleInstall(SimpleBundleTestCase.java:78)
  | 

I see


  |    /**
  |     * Start a bundle
  |     * 
  |     * @param bundleState the bundle state
  |     * @throws BundleException the bundle exception
  |     */
  |    public void start(OSGiBundleState bundleState) throws BundleException
  |    {
  |       try
  |       {
  |          // todo check actually changed state
  |          deployerClient.change(bundleState.getDeploymentUnit().getName(), DeploymentStages.INSTALLED);
  |       }
  |       catch (DeploymentException e)
  |       {
  |          Throwable t = e.getCause();
  |          if (t instanceof BundleException)
  |             throw (BundleException) t;
  |          throw new BundleException("Error starting " + bundleState, e);
  |       }
  |    }
  | 

Could you please explain how this is supposed to work?

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4250889#4250889

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4250889



More information about the jboss-dev-forums mailing list