[jboss-user] [Beginner's Corner] - JBoss AS 7 with OSGi and JMS

marquies do-not-reply at jboss.com
Thu Jul 12 20:46:38 EDT 2012


marquies [https://community.jboss.org/people/marquies] created the discussion

"JBoss AS 7 with OSGi and JMS"

To view the discussion, visit: https://community.jboss.org/message/747886#747886

--------------------------------------------------------------
Hi all!

What I want to do: I would like to build an OSGi bundle whichs connects to a JMS queue, all in JBoss AS.

What I have done: I tried and compiled the quickstarts helloworld-osgi and helloworld-jms, both successfull. Then I mixed them, I copied the JMS code to the OSGi bundle changed the pom. It compiles, the bundle is build, but the installation in jboss failed:  missing requirement [Module[jboss-as-helloworld-osgi:7.1.1.Final]] package; (package=javax.jms)

I guessed that JBoss AS provides javax.jms, doesn't it?

01:57:08,777 INFO  [org.jboss.as.server] (management-handler-thread - 14) JBAS018562: Redeployed "jboss-as-helloworld-osgi-7.1.1.Final.jar"
01:57:08,778 INFO  [org.jboss.as.server] (management-handler-thread - 14) JBAS018565: Replaced deployment "jboss-as-helloworld-osgi-7.1.1.Final.jar" with deployment "jboss-as-helloworld-osgi-7.1.1.Final.jar"
01:57:08,777 ERROR [org.jboss.as.osgi] (MSC service thread 1-4) JBAS011900: Cannot start bundle: jboss-as-helloworld-osgi:7.1.1.Final: org.osgi.framework.BundleException: Cannot resolve bundle: jboss-as-helloworld-osgi:7.1.1.Final
        at org.jboss.osgi.framework.internal.HostBundleState.startInternal(HostBundleState.java:212) [jbosgi-framework-core-1.1.8.Final.jar:1.1.8.Final]
        at org.jboss.osgi.framework.internal.AbstractBundleState.start(AbstractBundleState.java:494) [jbosgi-framework-core-1.1.8.Final.jar:1.1.8.Final]
        at org.jboss.as.osgi.deployment.BundleStartTracker$1.processService(BundleStartTracker.java:144) [jboss-as-osgi-service-7.1.1.Final.jar:7.1.1.Final]
        at org.jboss.as.osgi.deployment.BundleStartTracker$1.transition(BundleStartTracker.java:119) [jboss-as-osgi-service-7.1.1.Final.jar:7.1.1.Final]
        at org.jboss.msc.service.ServiceControllerImpl.invokeListener(ServiceControllerImpl.java:1416) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
        at org.jboss.msc.service.ServiceControllerImpl.access$2700(ServiceControllerImpl.java:49) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
        at org.jboss.msc.service.ServiceControllerImpl$ListenerTask.run(ServiceControllerImpl.java:1954) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [classes.jar:1.6.0_33]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [classes.jar:1.6.0_33]
        at java.lang.Thread.run(Thread.java:680) [classes.jar:1.6.0_33]


01:57:08,779 ERROR [jboss-as-helloworld-osgi] (Thread-79) FrameworkEvent ERROR: org.apache.felix.log.LogException: org.osgi.framework.BundleException: Cannot resolve bundle resModule: [jboss-as-helloworld-osgi:7.1.1.Final]
        at org.jboss.osgi.framework.internal.ResolverPlugin.resolve(ResolverPlugin.java:157)
        at org.jboss.osgi.framework.internal.AbstractBundleState.ensureResolved(AbstractBundleState.java:551)
        at org.jboss.osgi.framework.internal.HostBundleState.startInternal(HostBundleState.java:211)
        at org.jboss.osgi.framework.internal.AbstractBundleState.start(AbstractBundleState.java:494)
        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:1416)
        at org.jboss.msc.service.ServiceControllerImpl.access$2700(ServiceControllerImpl.java:49)
        at org.jboss.msc.service.ServiceControllerImpl$ListenerTask.run(ServiceControllerImpl.java:1954)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [classes.jar:1.6.0_33]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [classes.jar:1.6.0_33]
        at java.lang.Thread.run(Thread.java:680) [classes.jar:1.6.0_33]
Caused by: org.apache.felix.log.LogException: org.jboss.osgi.resolver.XResolverException: Unable to resolve Module[jboss-as-helloworld-osgi:7.1.1.Final]: missing requirement [Module[jboss-as-helloworld-osgi:7.1.1.Final]] package; (package=javax.jms)
        at org.jboss.osgi.resolver.felix.FelixResolver.resolveInternal(FelixResolver.java:117)
        at org.jboss.osgi.resolver.spi.AbstractResolver.resolve(AbstractResolver.java:149)
        at org.jboss.osgi.framework.internal.ResolverPlugin.resolve(ResolverPlugin.java:155)
        ... 11 more



Generated MANIFEST.MF


Manifest-Version: 1.0
Built-By: breucking
Build-Jdk: 1.6.0_33
Bundle-Version: 7.1.1.Final
Tool: Bnd-1.15.0
Bundle-Name: jboss-as-helloworld-osgi
Bnd-LastModified: 1342140094712
Bundle-Activator: org.jboss.as.quickstarts.helloworld.osgi.Activator
Created-By: Apache Maven Bundle Plugin
Bundle-ManifestVersion: 2
Bundle-SymbolicName: jboss-as-helloworld-osgi
Import-Package: javax.jms,javax.naming,org.osgi.framework;version="[1.
 5,2)"
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/747886#747886]

Start a new discussion in Beginner's Corner at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2075]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20120712/8ae39a74/attachment.html 


More information about the jboss-user mailing list