1 Reply Latest reply on Nov 7, 2012 4:05 AM by Georg r

    camel-example-osgi-2.9.2 in JBoss AS 7.1.1 fails

    labo32 Newbie

      Hello,

       

      the camel-example-osgi-2.9.2 throws exception when installing into JBoss AS 7.1.1 (OSGi subsystem enabled, camel jars as JBoss module)

       

       

      09:33:48,486 INFO  [org.jboss.osgi.framework.internal.FrameworkActive] (MSC service thread 1-2) OSGi Framework started

      09:33:48,492 INFO  [org.jboss.osgi.framework.internal.BundleManager] (MSC service thread 1-3) Install bundle: org.apache.camel.camel-e

      ample-osgi:2.9.2

      09:33:48,495 ERROR [org.jboss.osgi.framework.internal.FrameworkEventsPlugin] (MSC service thread 1-3) Framework ERROR: org.osgi.framew

      rk.BundleException: Cannot resolve bundle resModule: [org.apache.camel.camel-example-osgi:2.9.2]

              at org.jboss.osgi.framework.internal.ResolverPlugin.resolve(ResolverPlugin.java:157) [jbosgi-framework-core-1.1.8.Final.jar:1.

      .8.Final]

              at org.jboss.osgi.framework.internal.AbstractBundleState.ensureResolved(AbstractBundleState.java:551) [jbosgi-framework-core-1

      1.8.Final.jar:1.1.8.Final]

              at org.jboss.osgi.framework.internal.HostBundleState.startInternal(HostBundleState.java:211) [jbosgi-framework-core-1.1.8.Fina

      .jar:1.1.8.Final]

              at org.jboss.osgi.framework.internal.AbstractBundleState.start(AbstractBundleState.java:494) [jbosgi-framework-core-1.1.8.Fina

      .jar:1.1.8.Final]

              at org.jboss.as.osgi.deployment.BundleStartTracker$1.processService(BundleStartTracker.java:144) [jboss-as-osgi-service-7.1.1.

      inal.jar:7.1.1.Final]

              at org.jboss.as.osgi.deployment.BundleStartTracker$1.transition(BundleStartTracker.java:119) [jboss-as-osgi-service-7.1.1.Fina

      .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.G

      ]

              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) [rt.jar:1.6.0_29]

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_29]

              at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_29]

      Caused by: org.jboss.osgi.resolver.XResolverException: Unable to resolve Module[org.apache.camel.camel-example-osgi:2.9.2]: missing re

      uirement [Module[org.apache.camel.camel-example-osgi:2.9.2]] package; (&(package=org.apache.camel.builder)(version>=2.9.0)(!(version>=

      .10.0)))

              at org.jboss.osgi.resolver.felix.FelixResolver.resolveInternal(FelixResolver.java:117) [jbosgi-resolver-felix-1.0.13.Final.jar

      1.0.13.Final]

              at org.jboss.osgi.resolver.spi.AbstractResolver.resolve(AbstractResolver.java:149) [jbosgi-resolver-spi-1.0.13.Final.jar:1.0.1

      .Final]

              at org.jboss.osgi.framework.internal.ResolverPlugin.resolve(ResolverPlugin.java:155) [jbosgi-framework-core-1.1.8.Final.jar:1.

      .8.Final]

              ... 11 more

       

      09:33:48,570 ERROR [org.jboss.as.osgi] (MSC service thread 1-3) JBAS011900: Cannot start bundle: org.apache.camel.camel-example-osgi:2

      9.2: org.osgi.framework.BundleException: Cannot resolve bundle: org.apache.camel.camel-example-osgi:2.9.2

              at org.jboss.osgi.framework.internal.HostBundleState.startInternal(HostBundleState.java:212) [jbosgi-framework-core-1.1.8.Fina

      .jar:1.1.8.Final]

              at org.jboss.osgi.framework.internal.AbstractBundleState.start(AbstractBundleState.java:494) [jbosgi-framework-core-1.1.8.Fina

      .jar:1.1.8.Final]

              at org.jboss.as.osgi.deployment.BundleStartTracker$1.processService(BundleStartTracker.java:144) [jboss-as-osgi-service-7.1.1.

      inal.jar:7.1.1.Final]

              at org.jboss.as.osgi.deployment.BundleStartTracker$1.transition(BundleStartTracker.java:119) [jboss-as-osgi-service-7.1.1.Fina

      .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.G

      ]

              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) [rt.jar:1.6.0_29]

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_29]

              at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_29]

       

      09:33:48,570 ERROR [org.apache.camel.camel-example-osgi] (Thread-77) FrameworkEvent ERROR: org.apache.felix.log.LogException: org.osgi

      framework.BundleException: Cannot resolve bundle resModule: [org.apache.camel.camel-example-osgi:2.9.2]

              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) [rt.jar:1.6.0_29]

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_29]

              at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_29]

      Caused by: org.apache.felix.log.LogException: org.jboss.osgi.resolver.XResolverException: Unable to resolve Module[org.apache.camel.ca

      el-example-osgi:2.9.2]: missing requirement [Module[org.apache.camel.camel-example-osgi:2.9.2]] package; (&(package=org.apache.camel.b

      ilder)(version>=2.9.0)(!(version>=2.10.0)))

              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

       

      09:33:48,650 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018559: Deployed "camel-example-osgi-2.9.2.jar"

       

       

       

       

      What is going wrong with the bundle / the installation ?

      Thanks
      Labo

        • 1. Re: camel-example-osgi-2.9.2 in JBoss AS 7.1.1 fails
          Georg r Newbie

          Hi Labo,

           

          not sure whether you can mix dependencies form JBoss modules + osgi-container.

           

          I managed to run the example (version 2.10.2), deployig the following dependencies:

           

          camel-core-2.10.2.jar,

          camel-example-jms-file-2.10.2.jar,

          camel-example-osgi-2.10.2.jar,

          camel-spring-2.10.2.jar,

          com.springsource.org.aopalliance-1.0.0.jar,

          com.springsource.org.apache.commons.logging-1.1.1.jar,

          commons-logging-osgi-20081215.jar,

          log4j-1.2.17.jar,

          slf4j-api-1.6.6.jar,

          slf4j-log4j12-1.6.6.jar,

          spring-aop-3.0.7.RELEASE.jar,

          spring-asm-3.0.7.RELEASE.jar,

          spring-beans-3.0.7.RELEASE.jar,

          spring-context-3.0.7.RELEASE.jar,

          spring-core-3.0.7.RELEASE.jar,

          spring-expression-3.0.7.RELEASE.jar,

          spring-tx-3.0.7.RELEASE.jar.

           

          Furthermore, you need to implement a Bundle Activator within the example that

          - creates a CamelContext

          - adds the route to the CamelContext and

          - starts the context.

           

          Did you manage to start the Felix Web Console (https://docs.jboss.org/author/display/JBOSGI/Getting+Started)?

           

          Thanks,

          Georg