OSGi Development with Eclipse IDE and JBoss AS 7

Inspired by Chasing a White Rabbit with JBoss Tools 3.3 M2 and Using OSGi in JBoss AS7 I thought I’d give them a try that eventually resulted in an article summing up my experiences – OSGi Development with Eclipse IDE and JBoss AS 7.

“In this article I’m describing how to use Eclipse IDE 3.7 (along with JBoss Tools 3.3.0.M2 Development Release) to create and deploy a OSGi service component (as defined in OSGi Declarative Services Specification) to JBoss AS 7.0.0.CR1. I’m on the lookout for a simple yet extensive OSGi tooling environment and Eclipse IDE is always referred as such.”

Why the sample bundle in this article provides no services is still a mystery to me and am working on it. Any help would be greatly appreciated. I’m a OSGi self-learner and feedback is a way to get me going in a proper direction.

Be Sociable, Share!
This entry was posted in Frameworks.

5 Responses to OSGi Development with Eclipse IDE and JBoss AS 7

  1. Adelar says:

    Very usefull your article. Thanks :)

  2. Ankur says:

    Did you find anything why it provides no service. IF yes then please share, I am also trying the same.

    • No, I didn’t. Honestly, I haven’t given it a try after I wrote the blog entry. I pay more attention to Enterprise OSGi with IBM WebSphere AS 8.5 these days and JBoss AS slipped under my radar. What version of JBoss AS do you work with?

  3. Ankur says:

    Hi Jacek,

    I also tried one more way of doing this can you have a look at it
    I tried the example given over here (http://weblogs.java.net/blog/ss141213/archive/2010/04/08/jax-ws-web-service-osgi-bundle) and deployed the same on JBoss 7.0.2
    The changes I made is , I renamed webservice.war to webservice.jar and this is the exception I got

    15:30:55,089 INFO [org.jboss.osgi.framework.internal.BundleManager] (MSC service thread 1-1) Install bundle: sahoo.hybridapp.jaxws1.web-service:1.0.0.SNAPSHOT
    15:30:55,099 ERROR [org.jboss.osgi.framework.internal.FrameworkEventsPlugin] (MSC service thread 1-1) Framework ERROR: org.osgi.framework.BundleException: Canno
    t resolve bundle resModule: [sahoo.hybridapp.jaxws1.web-service:1.0.0.SNAPSHOT]
    at org.jboss.osgi.framework.internal.ResolverPlugin.resolve(ResolverPlugin.java:157) [jbosgi-framework-core-1.0.0.CR8.jar:1.0.0.CR8]
    at org.jboss.osgi.framework.internal.AbstractBundleState.ensureResolved(AbstractBundleState.java:551) [jbosgi-framework-core-1.0.0.CR8.jar:1.0.0.CR8]
    at org.jboss.osgi.framework.internal.HostBundleState.startInternal(HostBundleState.java:210) [jbosgi-framework-core-1.0.0.CR8.jar:1.0.0.CR8]
    at org.jboss.osgi.framework.internal.AbstractBundleState.start(AbstractBundleState.java:494) [jbosgi-framework-core-1.0.0.CR8.jar:1.0.0.CR8]
    at org.jboss.as.osgi.deployment.BundleStartTracker$1.processService(BundleStartTracker.java:144) [jboss-as-osgi-service-7.0.2.Final.jar:7.0.2.Final]
    at org.jboss.as.osgi.deployment.BundleStartTracker$1.transition(BundleStartTracker.java:119) [jboss-as-osgi-service-7.0.2.Final.jar:7.0.2.Final]
    at org.jboss.msc.service.ServiceControllerImpl.invokeListener(ServiceControllerImpl.java:1429) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]
    at org.jboss.msc.service.ServiceControllerImpl.access$2600(ServiceControllerImpl.java:49) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]
    at org.jboss.msc.service.ServiceControllerImpl$ListenerTask.run(ServiceControllerImpl.java:1952) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_22]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_22]
    at java.lang.Thread.run(Thread.java:662) [:1.6.0_22]
    Caused by: org.jboss.osgi.resolver.XResolverException: Unable to resolve Module[sahoo.hybridapp.jaxws1.web-service:1.0.0.SNAPSHOT]: missing requirement [Module[
    sahoo.hybridapp.jaxws1.web-service:1.0.0.SNAPSHOT]] package; (&(package=javax.jws)(version>=2.0.0))
    at org.jboss.osgi.resolver.felix.FelixResolver.resolveInternal(FelixResolver.java:117) [jbosgi-resolver-felix-1.0.9.jar:1.0.9]
    at org.jboss.osgi.resolver.spi.AbstractResolver.resolve(AbstractResolver.java:148) [jbosgi-resolver-spi-1.0.9.jar:1.0.9]
    at org.jboss.osgi.framework.internal.ResolverPlugin.resolve(ResolverPlugin.java:155) [jbosgi-framework-core-1.0.0.CR8.jar:1.0.0.CR8]
    … 11 more

    15:30:55,119 ERROR [org.jboss.as.osgi] (MSC service thread 1-1) JBAS011912: Cannot start bundle: sahoo.hybridapp.jaxws1.web-service:1.0.0.SNAPSHOT: org.osgi.fra
    mework.BundleException: Cannot resolve bundle: sahoo.hybridapp.jaxws1.web-service:1.0.0.SNAPSHOT
    at org.jboss.osgi.framework.internal.HostBundleState.startInternal(HostBundleState.java:211) [jbosgi-framework-core-1.0.0.CR8.jar:1.0.0.CR8]
    at org.jboss.osgi.framework.internal.AbstractBundleState.start(AbstractBundleState.java:494) [jbosgi-framework-core-1.0.0.CR8.jar:1.0.0.CR8]
    at org.jboss.as.osgi.deployment.BundleStartTracker$1.processService(BundleStartTracker.java:144) [jboss-as-osgi-service-7.0.2.Final.jar:7.0.2.Final]
    at org.jboss.as.osgi.deployment.BundleStartTracker$1.transition(BundleStartTracker.java:119) [jboss-as-osgi-service-7.0.2.Final.jar:7.0.2.Final]
    at org.jboss.msc.service.ServiceControllerImpl.invokeListener(ServiceControllerImpl.java:1429) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]
    at org.jboss.msc.service.ServiceControllerImpl.access$2600(ServiceControllerImpl.java:49) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]
    at org.jboss.msc.service.ServiceControllerImpl$ListenerTask.run(ServiceControllerImpl.java:1952) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_22]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_22]
    at java.lang.Thread.run(Thread.java:662) [:1.6.0_22]

    15:30:55,119 ERROR [sahoo.hybridapp.jaxws1.web-service] (Thread-13) FrameworkEvent ERROR: org.apache.felix.log.LogException: org.osgi.framework.BundleException:
    Cannot resolve bundle resModule: [sahoo.hybridapp.jaxws1.web-service:1.0.0.SNAPSHOT]
    at org.jboss.osgi.framework.internal.ResolverPlugin.resolve(ResolverPlugin.java:157) [jbosgi-framework-core-1.0.0.CR8.jar:1.0.0.CR8]
    at org.jboss.osgi.framework.internal.AbstractBundleState.ensureResolved(AbstractBundleState.java:551) [jbosgi-framework-core-1.0.0.CR8.jar:1.0.0.CR8]
    at org.jboss.osgi.framework.internal.HostBundleState.startInternal(HostBundleState.java:210) [jbosgi-framework-core-1.0.0.CR8.jar:1.0.0.CR8]
    at org.jboss.osgi.framework.internal.AbstractBundleState.start(AbstractBundleState.java:494) [jbosgi-framework-core-1.0.0.CR8.jar:1.0.0.CR8]
    at org.jboss.as.osgi.deployment.BundleStartTracker$1.processService(BundleStartTracker.java:144)
    at org.jboss.as.osgi.deployment.BundleStartTracker$1.transition(BundleStartTracker.java:119)
    at org.jboss.msc.service.ServiceControllerImpl.invokeListener(ServiceControllerImpl.java:1429) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]
    at org.jboss.msc.service.ServiceControllerImpl.access$2600(ServiceControllerImpl.java:49) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]
    at org.jboss.msc.service.ServiceControllerImpl$ListenerTask.run(ServiceControllerImpl.java:1952) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_22]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_22]
    at java.lang.Thread.run(Thread.java:662) [:1.6.0_22]
    Caused by: org.apache.felix.log.LogException: org.jboss.osgi.resolver.XResolverException: Unable to resolve Module[sahoo.hybridapp.jaxws1.web-service:1.0.0.SNAP
    SHOT]: missing requirement [Module[sahoo.hybridapp.jaxws1.web-service:1.0.0.SNAPSHOT]] package; (&(package=javax.jws)(version>=2.0.0))
    at org.jboss.osgi.resolver.felix.FelixResolver.resolveInternal(FelixResolver.java:117) [jbosgi-resolver-felix-1.0.9.jar:1.0.9]
    at org.jboss.osgi.resolver.spi.AbstractResolver.resolve(AbstractResolver.java:148) [jbosgi-resolver-spi-1.0.9.jar:1.0.9]
    at org.jboss.osgi.framework.internal.ResolverPlugin.resolve(ResolverPlugin.java:155) [jbosgi-framework-core-1.0.0.CR8.jar:1.0.0.CR8]
    … 11 more

Leave a Reply

%d bloggers like this: