I recently upgraded from 0.3-incubating-SNAPSHOT to 0.3 and included org.apache.servicemix.bundles.asm-3.3_1 to get my app working again. I guess that the dependencies changed in the final release of blueprint.
On Sun, Feb 20, 2011 at 3:52 AM, KcTang <kct...@big2.net> wrote: > Thanks for the quick response! > > Why do i need (or not need) asm? > > I think i have asm as a jar for application dependency (probably not an > exported system package - didn't check), but not as an osgi bundle. Can you > provide details on that? FWIW, my app's dependency tree looks like this: > > [INFO] [dependency:tree {execution: default-cli}] > [INFO] play.osgi:osgi-launcher:jar:1.0-SNAPSHOT > [INFO] +- > org.apache.felix:org.apache.felix.bundlerepository:jar:1.6.4:provided > [INFO] | +- org.osgi:org.osgi.core:jar:4.1.0:provided > [INFO] | \- org.easymock:easymock:jar:2.4:provided > [INFO] +- org.apache.felix:org.apache.felix.shell:jar:1.4.2:provided > [INFO] | \- org.osgi:org.osgi.compendium:jar:4.0.0:provided > [INFO] +- org.apache.felix:org.apache.felix.shell.tui:jar:1.4.1:provided > [INFO] +- org.apache.felix:org.apache.felix.gogo.command:jar:0.8.0:provided > [INFO] +- org.apache.felix:org.apache.felix.gogo.runtime:jar:0.8.0:provided > [INFO] +- org.apache.felix:org.apache.felix.gogo.shell:jar:0.8.0:provided > [INFO] +- org.apache.felix:org.osgi.service.obr:jar:1.0.2:provided > [INFO] | \- org.apache.felix:org.osgi.core:jar:1.0.1:provided > [INFO] +- play.osgi:osgi-service:jar:1.0-SNAPSHOT:compile > [INFO] | +- commons-lang:commons-lang:jar:2.6:compile > [INFO] | +- org.apache.felix:org.apache.felix.main:jar:3.0.8:compile > [INFO] | +- cglib:cglib:jar:2.2:compile > [INFO] | | \- asm:asm:jar:3.1:compile > [INFO] | +- org.springframework:spring-core:jar:3.0.5.RELEASE:compile > [INFO] | | +- org.springframework:spring-asm:jar:3.0.5.RELEASE:compile > [INFO] | | \- commons-logging:commons-logging:jar:1.1.1:compile > [INFO] | +- org.springframework:spring-beans:jar:3.0.5.RELEASE:compile > [INFO] | +- org.springframework:spring-context:jar:3.0.5.RELEASE:compile > [INFO] | | +- org.springframework:spring-aop:jar:3.0.5.RELEASE:compile > [INFO] | | | \- aopalliance:aopalliance:jar:1.0:compile > [INFO] | | \- > org.springframework:spring-expression:jar:3.0.5.RELEASE:compile > [INFO] | +- org.springframework:spring-test:jar:3.0.5.RELEASE:compile > [INFO] | \- ch.qos.logback:logback-classic:jar:0.9.28:runtime > [INFO] | \- ch.qos.logback:logback-core:jar:0.9.28:runtime > [INFO] +- org.apache.felix:org.apache.felix.framework:jar:3.0.8:compile > [INFO] +- org.slf4j:slf4j-api:jar:1.6.1:compile > [INFO] \- junit:junit:jar:4.8.1:test > > > Aries bundles do resolve. Here's my console output: > > # --- on startup of my app/container (aries blueprint is active) > > g! lb > START LEVEL 2 > ID|State |Level|Name > 0|Active | 0|System Bundle (3.0.8) > 1|Active | 1|Apache Aries Util (0.3.0) > 2|Active | 1|Apache Aries Blueprint Bundle (0.3.0) > 3|Active | 1|Apache Aries Proxy (0.3.0) > 4|Active | 1|OPS4J Pax Logging - API (1.6.0) > 5|Active | 1|OPS4J Pax Logging - Service (1.6.0) > 6|Active | 1|OPS4J Pax Url - mvn: (1.2.5) > 7|Active | 1|osgi.cmpn (4.2.0.200908310645) > 8|Active | 2|Apache Felix Gogo Command (0.8.0) > 9|Active | 2|Apache Felix Gogo Runtime (0.8.0) > 10|Active | 2|Apache Felix Gogo Shell (0.8.0) > 11|Active | 2|Apache Felix Bundle Repository (1.6.4) > > # --- installed my blueprint enabled bundle & start it > > g! install mvn:play.echo/echo-service1/1.0-SNAPSHOT > [Gogo shell] DEBUG org.ops4j.pax.url.mvn.internal.AetherBridgeConnection - > Ather URL Handler not available. Using mvn fallback to resolve > mvn:play.echo/echo-service1/1.0-SNAPSHOT > [Gogo shell] DEBUG org.ops4j.pax.url.mvn.internal.Connection - Resolving > [mvn:play.echo/echo-service1/1.0-SNAPSHOT] > [Gogo shell] DEBUG org.ops4j.pax.url.mvn.internal.Connection - Collecting > versions from repository > [file:/home/kctang/.m2/repository/,releases=true,snapshots=true] > [Gogo shell] DEBUG org.ops4j.pax.url.mvn.internal.Connection - Resolving > snapshot version [1.0-SNAPSHOT] > [Gogo shell] DEBUG org.ops4j.pax.url.mvn.internal.Connection - Resolving > metadata > Bundle ID: 12 > [FelixDispatchQueue] DEBUG play.echo.service1 - BundleEvent INSTALLED > g! start 12 > DEBUG: WIRE: [12.0] package; > (&(package=org.osgi.service.blueprint)(version>=1.0.0)(!(version>=2.0.0))) > -> [2.0] > DEBUG: WIRE: [12.0] package; > (&(package=org.slf4j)(version>=1.6.0)(!(version>=2.0.0))) -> [4.0] > [FelixDispatchQueue] DEBUG play.echo.service1 - BundleEvent RESOLVED > [FelixDispatchQueue] DEBUG play.echo.service1 - BundleEvent STARTED > > # --- everything started, including my blueprint enabled bundled. however, > something should be displayed in console as init-method prints stuff out > (confirmed to work with 0.2-incubating). > > g! lb > START LEVEL 2 > ID|State |Level|Name > 0|Active | 0|System Bundle (3.0.8) > 1|Active | 1|Apache Aries Util (0.3.0) > 2|Active | 1|Apache Aries Blueprint Bundle (0.3.0) > 3|Active | 1|Apache Aries Proxy (0.3.0) > 4|Active | 1|OPS4J Pax Logging - API (1.6.0) > 5|Active | 1|OPS4J Pax Logging - Service (1.6.0) > 6|Active | 1|OPS4J Pax Url - mvn: (1.2.5) > 7|Active | 1|osgi.cmpn (4.2.0.200908310645) > 8|Active | 2|Apache Felix Gogo Command (0.8.0) > 9|Active | 2|Apache Felix Gogo Runtime (0.8.0) > 10|Active | 2|Apache Felix Gogo Shell (0.8.0) > 11|Active | 2|Apache Felix Bundle Repository (1.6.4) > 12|Active | 1|Unnamed - play.echo:echo-service1:jar:1.0-SNAPSHOT > (1.0.0.SNAPSHOT) > g! > > > any idea? > > > > > > On Sun, Feb 20, 2011 at 4:03 PM, Alasdair Nottingham <n...@apache.org> wrote: >> >> Hi, >> Do you have a bundle that provides asm? Do the Aries bundles in 0.3 >> resolve? >> >> Alasdair Nottingham >> On 20 Feb 2011, at 07:36, KcTang <kct...@big2.net> wrote: >> >> Hi! >> >> I'm trying to provide blueprint services in my embedded felix container. >> >> To do this, i've developed a very simple echo service bundle that has a >> /OSGI-INF/blueprint/config.xml that looks like: >> >> <?xml version="1.0" encoding="UTF-8"?> >> <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" > >> <bean id="es1" class="play.echo.service1.EchoService1" >> init-method="start" > >> </bean> >> <service ref="es1" >> interface="play.echo.service1.EchoService1Interface" /> >> </blueprint> >> >> --- >> The embedded osgi container in my application has these bundles (before >> installing aries blueprint): >> >> g! lb >> START LEVEL 2 >> ID|State |Level|Name >> 0|Active | 0|System Bundle (3.0.8) >> 1|Active | 1|OPS4J Pax Logging - API (1.6.0) >> 2|Active | 1|OPS4J Pax Logging - Service (1.6.0) >> 3|Active | 1|OPS4J Pax Url - mvn: (1.2.5) >> 4|Active | 1|osgi.cmpn (4.2.0.200908310645) >> 5|Active | 2|Apache Felix Gogo Command (0.8.0) >> 6|Active | 2|Apache Felix Gogo Runtime (0.8.0) >> 7|Active | 2|Apache Felix Gogo Shell (0.8.0) >> 8|Active | 2|Apache Felix Bundle Repository (1.6.4) >> >> --- >> >> With 0.2-incubating, I am able to get my echo service bundle to run >> properly if i install these blueprint bundles first: >> >> install >> mvn:org.apache.aries.blueprint/org.apache.aries.blueprint/0.2-incubating >> install mvn:org.apache.aries/org.apache.aries.util/0.2-incubating >> # start blueprint's bundle id, then: >> install mvn:play.echo/echo-service1/1.0-SNAPSHOT >> # start my bundle id >> >> Observation: echo-service1 bundle is "Active". the EchoService1.start() >> method actually gets called when echo-service1's bundle is started. >> >> I also noticed that this is the version that Apache Karaf 2.1.3 is using >> (and my echo-service1 bundle works well there too). >> >> --- >> However, if i install my bundle after installing 0.3 bundles like this: >> >> install mvn:org.apache.aries.blueprint/org.apache.aries.blueprint/0.3 >> install mvn:org.apache.aries/org.apache.aries.util/0.3 >> install mvn:org.apache.aries.proxy/org.apache.aries.proxy.api/0.3 >> # start blueprint's bundle id, then: >> install mvn:play.echo/echo-service1/1.0-SNAPSHOT >> # start my bundle id >> >> Observation: echo-service1 bundle is "Active". However, both >> EchoService1's constructor and EchoService1.start() method is not called at >> all. >> >> --- >> >> Very much appreciated if someone can let me know what is wrong here and >> provide a solution to this. >> >> > > -- Tim Moloney ManTech Real-time Systems Laboratory 2015 Cattlemen Road \ / Sarasota, FL 34232 .________\(O)/________. (941) 377-6775 x208 ' ' O(.)O ' '