1 Reply Latest reply on May 18, 2012 5:16 AM by Thomas Diesler

    Deploying Blueprint OSGi bundles in JBOSS 7.1.2

    jjaannrr Newbie

      Hi All,

       

      please, has anyone successfully deployed Blueprint powered OSGi bundles in JBOSS 7.1.2.Final? I've experienced a few issues with that:

       

       

      1) In JBoss 7.1.2 bundles (any bundles, not just Blueprint ones) are not started automatically when dropped into deployments folder. I have to start them in JBOSS webconsole. Is this intentional in 7.1.2?

      (Bundles are automatically started when deployed during JBOSS startup.)

       

       

      2) I cannot fully undeploy bundles deployed during JBOSS startup. *.undeployed file is created, jar is not listed in Server->Manage Deployments but bundle is still listed as active in Runtime Operations->OSGi list

       

       

      3) When starting Blueprint powered bundles I get the following warning. Everything seems to work fine, though:

      2012-05-17 16:12:37,232 WARNING [org.eclipse.gemini.blueprint.extender.internal.activator.ContextLoaderListener$NamespaceBundleLister](HttpManagementService-threads - 1) Got exception while handling event BundleEvent[type=RESOLVED,source=reims-helloworld-spring-client:7.0.0.SNAPSHOT]: org.jboss.msc.service.DuplicateServiceException: Service jboss.module.spec.service."deployment.reims-helloworld-spring-client"."7.0.0.SNAPSHOT" is already registered
                at org.jboss.msc.service.ServiceRegistrationImpl.setInstance(ServiceRegistrationImpl.java:154)
                at org.jboss.msc.service.ServiceControllerImpl.startInstallation(ServiceControllerImpl.java:227)
                at org.jboss.msc.service.ServiceContainerImpl.install(ServiceContainerImpl.java:560)
                at org.jboss.msc.service.ServiceTargetImpl.install(ServiceTargetImpl.java:201)
                at org.jboss.msc.service.ServiceControllerImpl$ChildServiceTarget.install(ServiceControllerImpl.java:2228)
                at org.jboss.msc.service.ServiceBuilderImpl.install(ServiceBuilderImpl.java:307)
                at org.jboss.as.osgi.service.ModuleLoaderIntegration.addModule(ModuleLoaderIntegration.java:128)
                at org.jboss.osgi.framework.internal.ModuleManagerPlugin.createHostModule(ModuleManagerPlugin.java:298)
                at org.jboss.osgi.framework.internal.ModuleManagerPlugin.addModule(ModuleManagerPlugin.java:196)
                at org.jboss.osgi.framework.internal.ResolverPlugin.addModules(ResolverPlugin.java:253)
                at org.jboss.osgi.framework.internal.ResolverPlugin.applyResolverResults(ResolverPlugin.java:201)
                at org.jboss.osgi.framework.internal.ResolverPlugin.resolveAndApply(ResolverPlugin.java:121)
                at org.jboss.osgi.framework.internal.AbstractBundleState.ensureResolved(AbstractBundleState.java:551)
                at org.jboss.osgi.framework.internal.HostBundleRevision.findEntries(HostBundleRevision.java:126)
                at org.jboss.osgi.framework.internal.AbstractBundleState.findEntries(AbstractBundleState.java:443)
                at org.eclipse.gemini.blueprint.extender.internal.support.NamespaceManager.maybeAddNamespaceHandlerFor(NamespaceManager.java:130)
                at org.eclipse.gemini.blueprint.extender.internal.activator.ContextLoaderListener.maybeAddNamespaceHandlerFor(ContextLoaderListener.java:462)
                at org.eclipse.gemini.blueprint.extender.internal.activator.ContextLoaderListener$NamespaceBundleLister.handleEvent(ContextLoaderListener.java:169)
                at org.eclipse.gemini.blueprint.extender.internal.activator.ContextLoaderListener$BaseListener.bundleChanged(ContextLoaderListener.java:137)
                at org.jboss.osgi.framework.internal.FrameworkEventsPlugin.fireBundleEvent(FrameworkEventsPlugin.java:372)
                at org.jboss.osgi.framework.internal.AbstractBundleState.fireBundleEvent(AbstractBundleState.java:198)
                at org.jboss.osgi.framework.internal.AbstractBundleState.changeState(AbstractBundleState.java:192)
                at org.jboss.osgi.framework.internal.AbstractBundleState.changeState(AbstractBundleState.java:174)
                at org.jboss.osgi.framework.internal.ResolverPlugin.setBundleToResolved(ResolverPlugin.java:277)
                at org.jboss.osgi.framework.internal.ResolverPlugin.applyResolverResults(ResolverPlugin.java:207)
                at org.jboss.osgi.framework.internal.ResolverPlugin.resolveAndApply(ResolverPlugin.java:121)
                at org.jboss.osgi.framework.internal.AbstractBundleState.ensureResolved(AbstractBundleState.java:551)
                at org.jboss.osgi.framework.internal.HostBundleState.startInternal(HostBundleState.java:232)
                at org.jboss.osgi.framework.internal.AbstractBundleState.start(AbstractBundleState.java:485)
                at org.jboss.as.osgi.management.BundleResourceHandler.handleOperation(BundleResourceHandler.java:145)
                at org.jboss.as.osgi.management.BundleResourceHandler.executeRuntimeStep(BundleResourceHandler.java:99)
                at org.jboss.as.controller.AbstractRuntimeOnlyHandler$1.execute(AbstractRuntimeOnlyHandler.java:90)
                at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:397)
                at org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:284)
                at org.jboss.as.controller.AbstractOperationContext.completeStep(AbstractOperationContext.java:211)
                at org.jboss.as.controller.ModelControllerImpl$DefaultPrepareStepHandler.execute(ModelControllerImpl.java:473)
                at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:397)
                at org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:284)
                at org.jboss.as.controller.AbstractOperationContext.completeStep(AbstractOperationContext.java:211)
                at org.jboss.as.controller.ModelControllerImpl.internalExecute(ModelControllerImpl.java:126)
                at org.jboss.as.controller.ModelControllerImpl.execute(ModelControllerImpl.java:111)
                at org.jboss.as.controller.ModelControllerImpl$1.execute(ModelControllerImpl.java:316)
                at org.jboss.as.controller.ModelControllerImpl$1.execute(ModelControllerImpl.java:306)
                at org.jboss.as.domain.http.server.DomainApiHandler.processRequest(DomainApiHandler.java:319)
                at org.jboss.as.domain.http.server.DomainApiHandler.doHandle(DomainApiHandler.java:225)
                at org.jboss.as.domain.http.server.DomainApiHandler.handle(DomainApiHandler.java:232)
                at org.jboss.as.domain.http.server.security.SubjectAssociationHandler.handle(SubjectAssociationHandler.java:51)
                at org.jboss.com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:78)
                at org.jboss.sun.net.httpserver.AuthFilter.doFilter(AuthFilter.java:69)
                at org.jboss.com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:81)
                at org.jboss.sun.net.httpserver.ServerImpl$Exchange$LinkHandler.handle(ServerImpl.java:710)
                at org.jboss.com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:78)
                at org.jboss.as.domain.http.server.RealmReadinessFilter.doFilter(RealmReadinessFilter.java:54)
                at org.jboss.com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:81)
                at org.jboss.sun.net.httpserver.ServerImpl$Exchange.run(ServerImpl.java:682)
                at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
                at java.lang.Thread.run(Thread.java:662)
                at org.jboss.threads.JBossThread.run(JBossThread.java:122)
      
      
        • 1. Re: Deploying Blueprint OSGi bundles in JBOSS 7.1.2
          Thomas Diesler Master

          1) In JBoss 7.1.2 bundles (any bundles, not just Blueprint ones) are not started automatically when dropped into deployments folder. I have to start them in JBOSS webconsole. Is this intentional in 7.1.2?

          (Bundles are automatically started when deployed during JBOSS startup.)

          Yes, this is by design. An autostart feature would imply bundle ordering, which should not be imposed onm the user. You can script deploy/start in the Command Line Interface (CLI)

           

          2) I cannot fully undeploy bundles deployed during JBOSS startup. *.undeployed file is created, jar is not listed in Server->Manage Deployments but bundle is still listed as active in Runtime Operations->OSGi list

           

          This is likely a bug: AS7-4835

          3) When starting Blueprint powered bundles I get the following warning

           

          This is a framework bug: AS7-4836

           

          Thanks for reporting this :-)