2 Replies Latest reply: Apr 4, 2011 3:25 PM by susmit Shukla RSS

OSGI Container docs for Arquillian

susmit Shukla Newbie

I was looking around for steps to set up a osgi embedded conatiner with arquillian but could not find if Arquillian provides support for OSGI embedded/remote conatiner. The list of supported container does not conatin osgi container settings. Any pointrs or documantation for setting up OSGI container with Arquillian would be very useful.

 

Complete container refrence guide also doesn't list steps to configure OSGi container:

http://docs.jboss.org/arquillian/reference/latest/en-US/html_single/#container.reference

  • 1. Re: OSGI Container docs for Arquillian
    susmit Shukla Newbie

    I found the documentation for setting up OSGi embedded server:

    http://docs.jboss.org/arquillian/reference/1.0.0.Alpha4/en-US/html_single/#container.osgi-embedded-42

    but while running a sample test, got a bunch of deployment errors:

     

    How to get OSGiBundleManager to install properly to OSGi embedded container through Arquillian?

     

    Caused by: java.lang.IllegalStateException: Cannot deploy bootstrap beans

        at org.jboss.osgi.framework.launch.OSGiFrameworkFactory.newFramework(OSGiFrameworkFactory.java:162)

        at org.jboss.osgi.spi.framework.PropertiesBootstrapProvider.createFramework(PropertiesBootstrapProvider.java:241)

        at org.jboss.osgi.spi.framework.PropertiesBootstrapProvider.initFrameworkInstance(PropertiesBootstrapProvider.java:165)

        at org.jboss.osgi.spi.framework.PropertiesBootstrapProvider.configureInternal(PropertiesBootstrapProvider.java:159)

        at org.jboss.osgi.spi.framework.PropertiesBootstrapProvider.getFramework(PropertiesBootstrapProvider.java:296)

        at org.jboss.arquillian.container.osgi.embedded_4_2.OSGiEmbeddedContainer.setup(OSGiEmbeddedContainer.java:56)

        at org.jboss.arquillian.impl.handler.ContainerCreator.callback(ContainerCreator.java:56)

        at org.jboss.arquillian.impl.handler.ContainerCreator.callback(ContainerCreator.java:46)

        at org.jboss.arquillian.impl.event.MapEventManager.fire(MapEventManager.java:63)

        ... 24 more

    Caused by: java.lang.IllegalStateException: Incompletely deployed:

     

    DEPLOYMENTS MISSING DEPENDENCIES:

      Deployment "OSGiResolverPlugin" is missing the following dependencies:

        Dependency "OSGiBundleManager" (should be in state "Installed", but is actually in state "Described")

      Deployment "OSGiServiceManagerPlugin" is missing the following dependencies:

        Dependency "OSGiBundleManager" (should be in state "Installed", but is actually in state "Described")

      Deployment "OSGiModuleDeployer" is missing the following dependencies:

        Dependency "OSGiBundleManager" (should be in state "Installed", but is actually in state "Described")

      Deployment "OSGiClassLoaderSystem" is missing the following dependencies:

        Dependency "OSGiSystemPackages" (should be in state "Installed", but is actually in state "Described")

      Deployment "OSGiStoragePlugin" is missing the following dependencies:

        Dependency "OSGiBundleManager" (should be in state "Installed", but is actually in state "Described")

      Deployment "OSGiBundleManager" is missing the following dependencies:

        Dependency "OSGiFrameworkProperties" (should be in state "Installed", but is actually not found)

        Dependency "OSGiClassLoaderSystem" (should be in state "Installed", but is actually in state "Described")

      Deployment "DeployerService" is missing the following dependencies:

        Dependency "null" (should be in state "Installed", but is actually unresolved (Demands 'MDRService'))

        Dependency "OSGiBundleManager" (should be in state "Installed", but is actually in state "Described")

      Deployment "OSGiClassLoadingDeployer" is missing the following dependencies:

        Dependency "OSGiClassLoaderFactory" (should be in state "Installed", but is actually in state "Instantiated")

        Dependency "OSGiClassLoaderDomain" (should be in state "Installed", but is actually in state "Instantiated")

      Deployment "OSGiFrameworkEventsPlugin" is missing the following dependencies:

        Dependency "OSGiBundleManager" (should be in state "Installed", but is actually in state "Described")

      Deployment "OSGiSystemPackages" is missing the following dependencies:

        Dependency "OSGiBundleManager" (should be in state "Instantiated", but is actually in state "Described")

      Deployment "LifecycleInterceptorService" is missing the following dependencies:

        Dependency "null" (should be in state "Installed", but is actually unresolved (Demands 'MDRService'))

        Dependency "OSGiBundleManager" (should be in state "Installed", but is actually in state "Described")

      Deployment "MDRService" is missing the following dependencies:

        Dependency "OSGiBundleManager" (should be in state "Installed", but is actually in state "Described")

      Deployment "OSGiStartLevelMetaDataDeployer" is missing the following dependencies:

        Dependency "OSGiBundleManager" (should be in state "Installed", but is actually in state "Described")

      Deployment "PackageAdminService" is missing the following dependencies:

        Dependency "null" (should be in state "Installed", but is actually unresolved (Demands 'MDRService'))

        Dependency "OSGiBundleManager" (should be in state "Installed", but is actually in state "Described")

      Deployment "OSGiClassLoaderDomain" is missing the following dependencies:

        Dependency "OSGiClassLoaderSystem" (should be in state "Installed", but is actually in state "Described")

        Dependency "OSGiClassLoaderSystem" (should be in state "Installed", but is actually in state "Described")

      Deployment "OSGiClassLoaderFactory" is missing the following dependencies:

        Dependency "OSGiClassLoaderSystem" (should be in state "Installed", but is actually in state "Described")

      Deployment "OSGiBundleStateCreateDeployer" is missing the following dependencies:

        Dependency "OSGiBundleManager" (should be in state "Installed", but is actually in state "Described")

      Deployment "OSGiFragmentClassLoadingDeployer" is missing the following dependencies:

        Dependency "OSGiClassLoaderFactory" (should be in state "Installed", but is actually in state "Instantiated")

        Dependency "OSGiClassLoaderDomain" (should be in state "Installed", but is actually in state "Instantiated")

      Deployment "ClassLoaderDeployer" is missing the following dependencies:

        Dependency "OSGiClassLoaderSystem" (should be in state "Installed", but is actually in state "Described")

      Deployment "WebXMLVerifier" is missing the following dependencies:

        Dependency "OSGiBundleManager" (should be in state "Installed", but is actually in state "Described")

     

        at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.internalValidate(AbstractKernelDeployer.java:278)

        at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.validate(AbstractKernelDeployer.java:174)

        at org.jboss.osgi.framework.launch.OSGiFrameworkFactory.newFramework(OSGiFrameworkFactory.java:158)

        ... 32 more

  • 2. Re: OSGI Container docs for Arquillian
    susmit Shukla Newbie

    The best place to get a running osgi bundle example from arquillian was to get the source itself, and it has a example test case in the containers/osgi-embedded project. Source code can be got here:

    https://github.com/jbosgi/arquillian

     

    project:

    arquillian-osgi-embedded > OSGiEmbeddedFrameworkTestCase