felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Clement Escoffier <clement.escoff...@gmail.com>
Subject Re: Does obr and ipojo get confused?
Date Wed, 07 Oct 2009 10:18:07 GMT
Hi,

On 07.10.2009, at 12:11, peter lawrey wrote:

> The problem I have had with OBR and iPOJO is that sometimes I get an
> error saying that ipojo is not unique but the module loads and can be
> started okay, and other times it fails to load. (same error) I have
> found that the Hello Client examples demonstrate the issue very  
> well. ;)
>
> What is the best way around this?
> Should I avoid OBR and just use the hot deploy?
> What do most people do with iPOJO?

iPOJO is set as a singleton bundle. It avoid installing twice iPOJO on  
the same framework (which can lead to a big mess :-)).
OBR currently does not support singleton bundle, but I fix that the  
last week (by basically remove the singleton part of the symbolic  
name). So it should works with the trunk version of the OBR bundle.

This bundle will be released soonish with the new Felix release (Karl  
has planned the release the next weekend).


Regards,


Clement


>
> Thank you in advance,
>  Peter.
>
> I have built and installed trunk of apache felix 1.1.0-SNAPSHOT from
> today. - ok
> I have built iPOJO 1.5.0-SNAPSHOT - ok
>
> karaf@root> obr:start "Hello Service Provider"  - ok. note: there is
> only one module for iPOJO installed.
>
> karaf@root> obr:start "Hello Service Client" - reports
>
> Target resource(s):
> -------------------
>   Hello Service Client (1.5.0.SNAPSHOT)
>
> Required resource(s):
> ---------------------
>   Apache Felix iPOJO (1.5.0.SNAPSHOT)
>
> org.osgi.framework.BundleException: Bundle symbolic name and version  
> are
> not unique: org.apache.felix.ipojo:1.5.0.SNAPSHOT
>        at
> org.apache.felix.framework.BundleImpl.createModule(BundleImpl.java: 
> 1125)
>        at
> org.apache.felix.framework.BundleImpl.<init>(BundleImpl.java:82)
>        at
> org.apache.felix.framework.Felix.installBundle(Felix.java:2379)
>        at
> org.apache.felix.framework.Felix.installBundle(Felix.java:2282)
>        at
> org 
> .apache.felix.framework.BundleContextImpl.installBundle(BundleContext
> Impl.java:130)
>        at
> org 
> .apache.felix.bundlerepository.ResolverImpl.deploy(ResolverImpl.java:
> 546)
>        at
> org 
> .apache.felix.karaf.shell.obr.ObrCommandSupport.doDeploy(ObrCommandSu
> pport.java:188)
>        at
> org 
> .apache.felix.karaf.shell.obr.StartCommand.doExecute(StartCommand.jav
> a:26)
>        at
> org 
> .apache.felix.karaf.shell.obr.ObrCommandSupport.doExecute(ObrCommandS
> upport.java:49)
>        at
> org 
> .apache.felix.karaf.shell.console.OsgiCommandSupport.execute(OsgiComm
> andSupport.java:41)
>        at
> org 
> .apache.felix.gogo.commands.basic.AbstractCommand.execute(AbstractCom
> mand.java:34)
>        at
> org 
> .apache.felix.gogo.runtime.shell.CommandProxy.execute(CommandProxy.ja
> va:45)
>        at
> org.apache.felix.gogo.runtime.shell.Closure.execute(Closure.java:211)
>        at
> org 
> .apache.felix.gogo.runtime.shell.Closure.executeStatement(Closure.jav
> a:146)
>        at org.apache.felix.gogo.runtime.shell.Pipe.run(Pipe.java:91)
>        at
> org.apache.felix.gogo.runtime.shell.Closure.execute(Closure.java:75)
>        at
> org 
> .apache.felix.gogo.runtime.shell.CommandSessionImpl.execute(CommandSe
> ssionImpl.java:71)
>        at
> org.apache.felix.karaf.shell.console.jline.Console.run(Console.java: 
> 119)
>        at java.lang.Thread.run(Thread.java:619)
> Deploying...done.
>
> karaf@root> list - iPOJO is unique!
> START LEVEL 100
>   ID   State         Blueprint      Level  Name
> [   0] [Active     ] [            ] [    0] System Bundle (2.0.0)
> [   1] [Active     ] [Created     ] [   30] Apache Felix Karaf ::  
> Shell
> OSGi Commands (1.1.0.SNAPSHOT)
> [   2] [Active     ] [Created     ] [   30] Apache Felix Karaf ::  
> Shell
> PackageAdmin Commands (1.1.0.SNAPSHOT)
> [   3] [Active     ] [            ] [   30] Apache MINA Core  
> (2.0.0.M6)
> [   4] [Active     ] [Created     ] [   30] Apache Felix Karaf ::
> Management (1.1.0.SNAPSHOT)
> [   5] [Active     ] [Created     ] [   30] Apache Felix Karaf ::  
> Spring
> Deployer (1.1.0.SNAPSHOT)
> [   6] [Active     ] [Created     ] [   30] Apache Felix Karaf ::  
> Shell
> Various Commands (1.1.0.SNAPSHOT)
> [   7] [Active     ] [Created     ] [   30] Apache Felix Karaf ::
> Blueprint Deployer (1.1.0.SNAPSHOT)
> [   8] [Active     ] [            ] [   30] Apache Mina SSHD :: Core
> (0.2.0)
> [   9] [Active     ] [Created     ] [   30] Apache Felix Karaf ::
> Features Core (1.1.0.SNAPSHOT)
> [  10] [Active     ] [            ] [   30] Apache Felix Gogo Shell
> Runtime (0.2.0)
> [  11] [Active     ] [Created     ] [   30] Apache Felix Karaf :: JAAS
> Modules (1.1.0.SNAPSHOT)
> [  12] [Active     ] [Created     ] [   30] Apache Felix Karaf ::  
> Shell
> SSH (1.1.0.SNAPSHOT)
> [  13] [Active     ] [            ] [   30] org.osgi.impl.bundle.jmx
> (4.2.0.200907080519)
> [  14] [Active     ] [Created     ] [   30] Apache Felix Karaf ::  
> Shell
> Console (1.1.0.SNAPSHOT)
> [  15] [Active     ] [Created     ] [   30] Apache Felix Karaf ::  
> Shell
> ConfigAdmin Commands (1.1.0.SNAPSHOT)
> [  16] [Active     ] [Created     ] [   30] Apache Felix Karaf ::  
> Shell
> Admin (1.1.0.SNAPSHOT)
> [  17] [Active     ] [Created     ] [   30] Apache Felix Karaf :: JAAS
> Config (1.1.0.SNAPSHOT)
> [  18] [Active     ] [Created     ] [   30] Apache Felix Karaf ::  
> Shell
> Log Commands (1.1.0.SNAPSHOT)
> [  19] [Active     ] [Created     ] [   30] Apache Felix Karaf ::
> Features Management (1.1.0.SNAPSHOT)
> [  20] [Active     ] [Created     ] [   30] Apache Felix Karaf ::
> Features Deployer (1.1.0.SNAPSHOT)
> [  21] [Active     ] [Created     ] [   30] Apache Felix Karaf ::
> Features Command (1.1.0.SNAPSHOT)
> [  22] [Active     ] [            ] [   10] Apache Felix Prefrences
> Service (1.0.2)
> [  23] [Active     ] [            ] [   10] Apache Felix Configuration
> Admin Service (1.2.4)
> [  24] [Active     ] [            ] [    8] OPS4J Pax Logging - API
> (1.4)
> [  25] [Active     ] [            ] [    8] OPS4J Pax Logging -  
> Service
> (1.4)
> [  26] [Active     ] [            ] [    5] OPS4J Pax Url - mvn:  
> (1.0.0)
> [  27] [Active     ] [            ] [    5] OPS4J Pax Url - wrap:
> (1.0.0)
> [  28] [Active     ] [            ] [    5] Apache Felix File Install
> (2.0.0)
> [  29] [Active     ] [Created     ] [   20] Apache Geronimo Blueprint
> Bundle (1.0.0)
> [  30] [Active     ] [            ] [   60] Apache Felix Bundle
> Repository (1.4.0)
> [  31] [Active     ] [Created     ] [   60] Apache Felix Karaf ::  
> Shell
> OBR Commands (1.1.0.SNAPSHOT)
> [  32] [Active     ] [            ] [   60] Hello Service Provider  
> using
> Annotations (1.5.0.SNAPSHOT)
> [  33] [Active     ] [            ] [   60] Apache Felix iPOJO
> (1.5.0.SNAPSHOT)
> [  34] [Active     ] [            ] [   60] Hello Service
> (1.5.0.SNAPSHOT)
> [  47] [Resolved   ] [            ] [   60] Hello Service Client
> (1.5.0.SNAPSHOT)
>
> karaf@root> start 45 - module starts fine anyway!
> karaf@root> hello clement @
>
> Note: now its ok, not sure why it thought ipojo was not unique.
>
> NOTE: The real problem is loading "Hello Service Client using
> Annotations"
>
> karaf@root> uninstall 47
>
> karaf@root> obr:start "Hello Service Client using Annotations" - try  
> the
> example with annotations.
> Target resource(s):
> -------------------
>   Hello Service Client using Annotations (1.5.0.SNAPSHOT)
>
> Required resource(s):
> ---------------------
>   Apache Felix iPOJO (1.5.0.SNAPSHOT)
>
> org.osgi.framework.BundleException: Bundle symbolic name and version  
> are
> not unique: org.apache.felix.ipojo:1.5.0.SNAPSHOT
>        at
> org.apache.felix.framework.BundleImpl.createModule(BundleImpl.java: 
> 1125)
>        at
> org.apache.felix.framework.BundleImpl.<init>(BundleImpl.java:82)
>        at
> org.apache.felix.framework.Felix.installBundle(Felix.java:2379)
>        at
> org.apache.felix.framework.Felix.installBundle(Felix.java:2282)
>        at
> org 
> .apache.felix.framework.BundleContextImpl.installBundle(BundleContext
> Impl.java:130)
>        at
> org 
> .apache.felix.bundlerepository.ResolverImpl.deploy(ResolverImpl.java:
> 546)
>        at
> org 
> .apache.felix.karaf.shell.obr.ObrCommandSupport.doDeploy(ObrCommandSu
> pport.java:188)
>        at
> org 
> .apache.felix.karaf.shell.obr.StartCommand.doExecute(StartCommand.jav
> a:26)
>        at
> org 
> .apache.felix.karaf.shell.obr.ObrCommandSupport.doExecute(ObrCommandS
> upport.java:49)
>        at
> org 
> .apache.felix.karaf.shell.console.OsgiCommandSupport.execute(OsgiComm
> andSupport.java:41)
>        at
> org 
> .apache.felix.gogo.commands.basic.AbstractCommand.execute(AbstractCom
> mand.java:34)
>        at
> org 
> .apache.felix.gogo.runtime.shell.CommandProxy.execute(CommandProxy.ja
> va:45)
>        at
> org.apache.felix.gogo.runtime.shell.Closure.execute(Closure.java:211)
>        at
> org 
> .apache.felix.gogo.runtime.shell.Closure.executeStatement(Closure.jav
> a:146)
>        at org.apache.felix.gogo.runtime.shell.Pipe.run(Pipe.java:91)
>        at
> org.apache.felix.gogo.runtime.shell.Closure.execute(Closure.java:75)
>        at
> org 
> .apache.felix.gogo.runtime.shell.CommandSessionImpl.execute(CommandSe
> ssionImpl.java:71)
>        at
> org.apache.felix.karaf.shell.console.jline.Console.run(Console.java: 
> 119)
>        at java.lang.Thread.run(Thread.java:619)
> Deploying...done.
> karaf@root> list - module wasn't even loaded, but is basically the  
> same
> as the previous example. (And very simple)
> START LEVEL 100
>   ID   State         Blueprint      Level  Name
> [   0] [Active     ] [            ] [    0] System Bundle (2.0.0)
> [   1] [Active     ] [Created     ] [   30] Apache Felix Karaf ::  
> Shell
> OSGi Commands (1.1.0.SNAPSHOT)
> [   2] [Active     ] [Created     ] [   30] Apache Felix Karaf ::  
> Shell
> PackageAdmin Commands (1.1.0.SNAPSHOT)
> [   3] [Active     ] [            ] [   30] Apache MINA Core  
> (2.0.0.M6)
> [   4] [Active     ] [Created     ] [   30] Apache Felix Karaf ::
> Management (1.1.0.SNAPSHOT)
> [   5] [Active     ] [Created     ] [   30] Apache Felix Karaf ::  
> Spring
> Deployer (1.1.0.SNAPSHOT)
> [   6] [Active     ] [Created     ] [   30] Apache Felix Karaf ::  
> Shell
> Various Commands (1.1.0.SNAPSHOT)
> [   7] [Active     ] [Created     ] [   30] Apache Felix Karaf ::
> Blueprint Deployer (1.1.0.SNAPSHOT)
> [   8] [Active     ] [            ] [   30] Apache Mina SSHD :: Core
> (0.2.0)
> [   9] [Active     ] [Created     ] [   30] Apache Felix Karaf ::
> Features Core (1.1.0.SNAPSHOT)
> [  10] [Active     ] [            ] [   30] Apache Felix Gogo Shell
> Runtime (0.2.0)
> [  11] [Active     ] [Created     ] [   30] Apache Felix Karaf :: JAAS
> Modules (1.1.0.SNAPSHOT)
> [  12] [Active     ] [Created     ] [   30] Apache Felix Karaf ::  
> Shell
> SSH (1.1.0.SNAPSHOT)
> [  13] [Active     ] [            ] [   30] org.osgi.impl.bundle.jmx
> (4.2.0.200907080519)
> [  14] [Active     ] [Created     ] [   30] Apache Felix Karaf ::  
> Shell
> Console (1.1.0.SNAPSHOT)
> [  15] [Active     ] [Created     ] [   30] Apache Felix Karaf ::  
> Shell
> ConfigAdmin Commands (1.1.0.SNAPSHOT)
> [  16] [Active     ] [Created     ] [   30] Apache Felix Karaf ::  
> Shell
> Admin (1.1.0.SNAPSHOT)
> [  17] [Active     ] [Created     ] [   30] Apache Felix Karaf :: JAAS
> Config (1.1.0.SNAPSHOT)
> [  18] [Active     ] [Created     ] [   30] Apache Felix Karaf ::  
> Shell
> Log Commands (1.1.0.SNAPSHOT)
> [  19] [Active     ] [Created     ] [   30] Apache Felix Karaf ::
> Features Management (1.1.0.SNAPSHOT)
> [  20] [Active     ] [Created     ] [   30] Apache Felix Karaf ::
> Features Deployer (1.1.0.SNAPSHOT)
> [  21] [Active     ] [Created     ] [   30] Apache Felix Karaf ::
> Features Command (1.1.0.SNAPSHOT)
> [  22] [Active     ] [            ] [   10] Apache Felix Prefrences
> Service (1.0.2)
> [  23] [Active     ] [            ] [   10] Apache Felix Configuration
> Admin Service (1.2.4)
> [  24] [Active     ] [            ] [    8] OPS4J Pax Logging - API
> (1.4)
> [  25] [Active     ] [            ] [    8] OPS4J Pax Logging -  
> Service
> (1.4)
> [  26] [Active     ] [            ] [    5] OPS4J Pax Url - mvn:  
> (1.0.0)
> [  27] [Active     ] [            ] [    5] OPS4J Pax Url - wrap:
> (1.0.0)
> [  28] [Active     ] [            ] [    5] Apache Felix File Install
> (2.0.0)
> [  29] [Active     ] [Created     ] [   20] Apache Geronimo Blueprint
> Bundle (1.0.0)
> [  30] [Active     ] [            ] [   60] Apache Felix Bundle
> Repository (1.4.0)
> [  31] [Active     ] [Created     ] [   60] Apache Felix Karaf ::  
> Shell
> OBR Commands (1.1.0.SNAPSHOT)
> [  32] [Active     ] [            ] [   60] Hello Service Provider  
> using
> Annotations (1.5.0.SNAPSHOT)
> [  33] [Active     ] [            ] [   60] Apache Felix iPOJO
> (1.5.0.SNAPSHOT)
> [  34] [Active     ] [            ] [   60] Hello Service
> (1.5.0.SNAPSHOT)
> karaf@root>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Mime
View raw message