Tim,

thanks for the tip, appreciate it... but didn't seem to work.

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|Apache ServiceMix :: Bundles :: asm (3.3.0.1)* <<<
added asm*
   13|Active     |    1|Unnamed - play.echo:echo-service1:jar:1.0-SNAPSHOT
(1.0.0.SNAPSHOT)

---- even with asm active, my bundle #13 is active, but i don't think it has
been blueprint activated.


switch to 0.2-incubating, and my bundle's init-method (loop echo message)
runs:

g! lb
START LEVEL 2
   ID|State      |Level|Name
    0|Active     |    0|System Bundle (3.0.8)
    1|Active     |    1|Apache Aries Util (0.2.0.incubating)
    2|Active     |    1|Apache Aries Blueprint Bundle (0.2.0.incubating)
    3|Active     |    1|OPS4J Pax Logging - API (1.6.0)
    4|Active     |    1|OPS4J Pax Logging - Service (1.6.0)
    5|Active     |    1|OPS4J Pax Url - mvn: (1.2.5)
    6|Active     |    1|osgi.cmpn (4.2.0.200908310645)
    7|Active     |    2|Apache Felix Gogo Command (0.8.0)
    8|Active     |    2|Apache Felix Gogo Runtime (0.8.0)
    9|Active     |    2|Apache Felix Gogo Shell (0.8.0)
   10|Active     |    2|Apache Felix Bundle Repository (1.6.4)
   11|Resolved   |    1|Unnamed - play.echo:echo-service1:jar:1.0-SNAPSHOT
(1.0.0.SNAPSHOT)
g!* start 11*
[Gogo shell] DEBUG org.apache.aries.blueprint.container.BlueprintExtender -
Scanning bundle play.echo.service1 for blueprint application
[Gogo shell] DEBUG org.apache.aries.blueprint.container.BlueprintExtender -
Found blueprint application in bundle play.echo.service1 with paths:
[bundle://11.0:0/OSGI-INF/blueprint/config.xml]
[Blueprint Extender: 2] DEBUG
org.apache.aries.blueprint.container.BlueprintContainerImpl - Running
blueprint container for bundle play.echo.service1 in state Unknown
[Blueprint Extender: 2] DEBUG
org.apache.aries.blueprint.container.BlueprintEventDispatcher - Sending
blueprint container event BlueprintEvent[type=CREATING] for bundle
play.echo.service1
[Blueprint Extender: 2] DEBUG
org.apache.aries.blueprint.container.BlueprintContainerImpl - Running
blueprint container for bundle play.echo.service1 in state
WaitForNamespaceHandlers
[Blueprint Extender: 2] DEBUG
org.apache.aries.blueprint.container.BlueprintContainerImpl - Running
blueprint container for bundle play.echo.service1 in state Populated
g! [FelixDispatchQueue] DEBUG play.echo.service1 - BundleEvent STARTED
[Blueprint Extender: 2] DEBUG
org.apache.aries.blueprint.container.BlueprintContainerImpl - Tracking
service references: []
[Blueprint Extender: 2] DEBUG
org.apache.aries.blueprint.container.BlueprintContainerImpl - Running
blueprint container for bundle play.echo.service1 in state
WaitForInitialReferences
[Blueprint Extender: 2] DEBUG
org.apache.aries.blueprint.container.BlueprintContainerImpl - Running
blueprint container for bundle play.echo.service1 in state
InitialReferencesSatisfied
[Blueprint Extender: 2] DEBUG
org.apache.aries.blueprint.container.BlueprintContainerImpl - Running
blueprint container for bundle play.echo.service1 in state
WaitForInitialReferences2
[Blueprint Extender: 2] DEBUG
org.apache.aries.blueprint.container.BlueprintContainerImpl - Running
blueprint container for bundle play.echo.service1 in state Create
[Blueprint Extender: 2] DEBUG
org.apache.aries.blueprint.container.BlueprintContainerImpl - Instantiating
components: [blueprintContainer, blueprintBundle, blueprintBundleContext,
blueprintConverter, es1]
[Blueprint Extender: 2] INFO play.echo.service1.EchoService1 - LOGGGER !!!!
EchoService1 CREATED!!
[Blueprint Extender: 2] DEBUG play.echo.service1 - ServiceEvent REGISTERED
[Blueprint Extender: 2] DEBUG
org.apache.aries.blueprint.container.BlueprintEventDispatcher - Sending
blueprint container event BlueprintEvent[type=CREATED] for bundle
play.echo.service1
[Blueprint Extender: 2] DEBUG
org.apache.aries.blueprint.container.BlueprintContainerImpl - Running
blueprint container for bundle play.echo.service1 in state Created
*[Thread-5] INFO play.echo.service1.EchoService1 - running echo service
1298196005377
[Thread-5] INFO play.echo.service1.EchoService1 - running echo service
1298196006378
[Thread-5] INFO play.echo.service1.EchoService1 - running echo service
1298196007379*
*stop 11*
[Gogo shell] DEBUG org.apache.aries.blueprint.container.BlueprintExtender -
Destroying BlueprintContainer for bundle play.echo.service1
[Gogo shell] DEBUG
org.apache.aries.blueprint.container.BlueprintEventDispatcher - Sending
blueprint container event BlueprintEvent[type=DESTROYING] for bundle
play.echo.service1
[Gogo shell] DEBUG play.echo.service1 - ServiceEvent UNREGISTERING
[Gogo shell] DEBUG
org.apache.aries.blueprint.container.BlueprintEventDispatcher - Sending
blueprint container event BlueprintEvent[type=DESTROYED] for bundle
play.echo.service1
[Gogo shell] DEBUG
org.apache.aries.blueprint.container.BlueprintContainerImpl - Blueprint
container destroyed: org.apache.felix.framework.BundleContextImpl@9b87f6
[FelixDispatchQueue] DEBUG play.echo.service1 - BundleEvent STOPPED
g!






On Sun, Feb 20, 2011 at 5:43 PM, Tim Moloney <tim.molo...@gmail.com> wrote:

> 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    '    '
>

Reply via email to