You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Laci Gaspar <la...@gmail.com> on 2014/02/03 14:01:21 UTC
Unresolved constraint
Hi
I get the following error when I want to install bundle:
Error executing command: Error installing bundles:
Unable to start bundle
mvn:ch.curabill.msp.service/templateRoute/1.0-SNAPSHOT: Unresolved
constraint in bundle templateRoute [132]:Unable to resolve 132.0:
missing requirement [132.0]
osgi.wiring.package;(&(osgi.wiring.package=org.apache.camel.osgi)(version>=2.12.0)(!(version>=3.0.0)))
First, how do I read such an error message?
Am I right in my interpretation that org.apache.camel.osgi is missing
with a 2.12.0 <= version < 3.0.0 ?
I tried to add a dependency to my pom:
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-osgi</artifactId>
<version>2.3.0</version>
</dependency>
but that didn't help.
Any help is appreciated.
Regards,
Laci
Re: Unresolved constraint
Posted by Laci Gaspar <la...@gmail.com>.
That's what I did and now I understand it too.
Thanks for your explanation!
Cheers
Laci
On 03.02.2014 16:02, Jean-Baptiste Onofré wrote:
> You don't have to define camel-core-osgi in your dependency, just
> camel-core. But it's not enought.
>
> You have to install camel-spring or camel-blueprint (depending of the
> DSL that you want to use) in the runtime as these bundles expose the
> Camel OSGi services.
>
> Regards
> JB
>
> On 02/03/2014 03:49 PM, Laci Gaspar wrote:
>> Thanks for your answers.
>>
>> I had several camel bundles already installed. Here's what I did:
>>
>> karaf@root> list | grep camel
>> [ 60] [Active ] [ ] [ 50] camel-core (2.12.2)
>> [ 61] [Active ] [Created ] [ 50] camel-karaf-commands
>> (2.12.2)
>> [ 62] [Active ] [Created ] [ 50] camel-blueprint (2.12.2)
>> [ 75] [Active ] [ ] [ 50] camel-jms (2.12.2)
>> [ 79] [Active ] [ ] [ 50] camel-http (2.12.2)
>> karaf@root> features:chooseurl camel 2.12.2
>> adding feature url
>> mvn:org.apache.camel.karaf/apache-camel/2.12.2/xml/features
>> karaf@root> features:install camel
>> karaf@root> list | grep camel
>> [ 60] [Active ] [ ] [ ] [ 50] camel-core
>> (2.12.2)
>> [ 61] [Active ] [Created ] [ ] [ 50]
>> camel-karaf-commands (2.12.2)
>> [ 62] [Active ] [Created ] [ ] [ 50] camel-blueprint
>> (2.12.2)
>> [ 75] [Active ] [ ] [ ] [ 50] camel-jms (2.12.2)
>> [ 79] [Active ] [ ] [ ] [ 50] camel-http
>> (2.12.2)
>> [ 140] [Active ] [ ] [ ] [ 50] camel-spring
>> (2.12.2)
>>
>> So, it seems, that I was missing camel-spring. After I installed that,
>> it worked.
>> Adding camel-core-osgi to my dependency didn't work (before installing
>> camel-spring)
>>
>> well, it's still a bit mysterious to me, I'll just keep asking ;-)
>> Thanks for your help, I appreciate it very much, that you all answer so
>> quickly.
>>
>> regards,
>> Laci
>>
>
Re: Unresolved constraint
Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
You don't have to define camel-core-osgi in your dependency, just
camel-core. But it's not enought.
You have to install camel-spring or camel-blueprint (depending of the
DSL that you want to use) in the runtime as these bundles expose the
Camel OSGi services.
Regards
JB
On 02/03/2014 03:49 PM, Laci Gaspar wrote:
> Thanks for your answers.
>
> I had several camel bundles already installed. Here's what I did:
>
> karaf@root> list | grep camel
> [ 60] [Active ] [ ] [ 50] camel-core (2.12.2)
> [ 61] [Active ] [Created ] [ 50] camel-karaf-commands (2.12.2)
> [ 62] [Active ] [Created ] [ 50] camel-blueprint (2.12.2)
> [ 75] [Active ] [ ] [ 50] camel-jms (2.12.2)
> [ 79] [Active ] [ ] [ 50] camel-http (2.12.2)
> karaf@root> features:chooseurl camel 2.12.2
> adding feature url
> mvn:org.apache.camel.karaf/apache-camel/2.12.2/xml/features
> karaf@root> features:install camel
> karaf@root> list | grep camel
> [ 60] [Active ] [ ] [ ] [ 50] camel-core (2.12.2)
> [ 61] [Active ] [Created ] [ ] [ 50]
> camel-karaf-commands (2.12.2)
> [ 62] [Active ] [Created ] [ ] [ 50] camel-blueprint
> (2.12.2)
> [ 75] [Active ] [ ] [ ] [ 50] camel-jms (2.12.2)
> [ 79] [Active ] [ ] [ ] [ 50] camel-http (2.12.2)
> [ 140] [Active ] [ ] [ ] [ 50] camel-spring (2.12.2)
>
> So, it seems, that I was missing camel-spring. After I installed that,
> it worked.
> Adding camel-core-osgi to my dependency didn't work (before installing
> camel-spring)
>
> well, it's still a bit mysterious to me, I'll just keep asking ;-)
> Thanks for your help, I appreciate it very much, that you all answer so
> quickly.
>
> regards,
> Laci
>
--
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com
Re: Unresolved constraint
Posted by Laci Gaspar <la...@gmail.com>.
Thanks for your answers.
I had several camel bundles already installed. Here's what I did:
karaf@root> list | grep camel
[ 60] [Active ] [ ] [ 50] camel-core (2.12.2)
[ 61] [Active ] [Created ] [ 50] camel-karaf-commands (2.12.2)
[ 62] [Active ] [Created ] [ 50] camel-blueprint (2.12.2)
[ 75] [Active ] [ ] [ 50] camel-jms (2.12.2)
[ 79] [Active ] [ ] [ 50] camel-http (2.12.2)
karaf@root> features:chooseurl camel 2.12.2
adding feature url
mvn:org.apache.camel.karaf/apache-camel/2.12.2/xml/features
karaf@root> features:install camel
karaf@root> list | grep camel
[ 60] [Active ] [ ] [ ] [ 50] camel-core (2.12.2)
[ 61] [Active ] [Created ] [ ] [ 50]
camel-karaf-commands (2.12.2)
[ 62] [Active ] [Created ] [ ] [ 50] camel-blueprint
(2.12.2)
[ 75] [Active ] [ ] [ ] [ 50] camel-jms (2.12.2)
[ 79] [Active ] [ ] [ ] [ 50] camel-http (2.12.2)
[ 140] [Active ] [ ] [ ] [ 50] camel-spring (2.12.2)
So, it seems, that I was missing camel-spring. After I installed that,
it worked.
Adding camel-core-osgi to my dependency didn't work (before installing
camel-spring)
well, it's still a bit mysterious to me, I'll just keep asking ;-)
Thanks for your help, I appreciate it very much, that you all answer so
quickly.
regards,
Laci
Re: Unresolved constraint
Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi guys,
Just waking up ;)
1/ the CamelContext are exposed as OSGi service, as Charlie said, use
feature:list |grep -i camel (or features:list if you use Karaf 2.x).
It's the same for the Camel components: they exposed as OSGi services.
That's why you have to install the component feature to be able to use
the component scheme.
2/ camel-osgi is no more a valid artifact (since 2.4.x). Now, you have
to use camel-core/camel-core-osgi.
3/ my advice is to just define camel-core as provided in your dependency
set and use the correct OSGi import.
I hope it helps.
Regards
JB
On 02/03/2014 03:27 PM, Charlie Mordant wrote:
> Hi again!
>
> Starting from your initial problem (bundle not starting with a missing
> requierement),
>
> you should have typed in your Karaf console: 'feature:list' and see all
> the camel features (with no one named camel-osgi with the 2.12 version,
> but some other starting with camel-*).
> In doubt, you would have tried installing the base camel feature
> ('feature:install camel').
> Then looked at the camel bundles installed: 'la | grep *camel*'
> Then, looked at the Symbolic-Name header of this bundle: 'bundle:headers
> <ACamelBundle> | grep Bundle-SymbolicName'.
>
> Seeing this, you would have changed your manifest entry to camel.core,
> camel.blueprint, then installing the additionnal features you wanted ;).
>
> Regards,
--
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com
Re: Unresolved constraint
Posted by Charlie Mordant <cm...@gmail.com>.
Hi again!
Starting from your initial problem (bundle not starting with a missing
requierement),
you should have typed in your Karaf console: 'feature:list' and see all the
camel features (with no one named camel-osgi with the 2.12 version, but
some other starting with camel-*).
In doubt, you would have tried installing the base camel feature
('feature:install camel').
Then looked at the camel bundles installed: 'la | grep *camel*'
Then, looked at the Symbolic-Name header of this bundle: 'bundle:headers
<ACamelBundle> | grep Bundle-SymbolicName'.
Seeing this, you would have changed your manifest entry to camel.core,
camel.blueprint, then installing the additionnal features you wanted ;).
Regards,
Re: Unresolved constraint
Posted by Laci Gaspar <la...@gmail.com>.
Hi
this helped, thanks!
As a side question, so that I will bother the list a bit less: how could
I have guessed your solution
(features:install camel)
from my error message.
Unable to resolve 134.0: missing requirement [134.0]
osgi.wiring.package;
(&(osgi.wiring.package=org.apache.camel.osgi)(version>=2.12.0)(!(version>=3.0.0)))
thanks,
Laci
On 03.02.2014 14:38, Claus Ibsen wrote:
> Hi
>
> camel-osgi is no longer a module. So you should remove that from your pom.xml.
>
> You should just use camel-spring or camel-blueprint if you use OSGi,
> depending on using spring-dm or aries blueprint.
>
> So install camel first in ServiceMix / Karaf
>
> features:install camel
>
> And if blueprint hasn't been installed (in earlier camel releases it didn't)
>
> features:install camel-blueprint
>
Re: Unresolved constraint
Posted by Claus Ibsen <cl...@gmail.com>.
Hi
camel-osgi is no longer a module. So you should remove that from your pom.xml.
You should just use camel-spring or camel-blueprint if you use OSGi,
depending on using spring-dm or aries blueprint.
So install camel first in ServiceMix / Karaf
features:install camel
And if blueprint hasn't been installed (in earlier camel releases it didn't)
features:install camel-blueprint
On Mon, Feb 3, 2014 at 2:01 PM, Laci Gaspar <la...@gmail.com> wrote:
> Hi
> I get the following error when I want to install bundle:
> Error executing command: Error installing bundles:
> Unable to start bundle
> mvn:ch.curabill.msp.service/templateRoute/1.0-SNAPSHOT: Unresolved
> constraint in bundle templateRoute [132]:Unable to resolve 132.0: missing
> requirement [132.0]
> osgi.wiring.package;(&(osgi.wiring.package=org.apache.camel.osgi)(version>=2.12.0)(!(version>=3.0.0)))
>
> First, how do I read such an error message?
> Am I right in my interpretation that org.apache.camel.osgi is missing with a
> 2.12.0 <= version < 3.0.0 ?
>
> I tried to add a dependency to my pom:
> <dependency>
> <groupId>org.apache.camel</groupId>
> <artifactId>camel-osgi</artifactId>
> <version>2.3.0</version>
> </dependency>
>
> but that didn't help.
>
> Any help is appreciated.
> Regards,
> Laci
--
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
Make your Camel applications look hawt, try: http://hawt.io
Re: Unresolved constraint
Posted by Charlie Mordant <cm...@gmail.com>.
I think that because you must not reference camel-osgi in your Manifest but
instead camel-* (core, blueprint, cdi,cxf,jms...)-2.12-0 because now their
manifests are filled.
2014-02-03 Laci Gaspar <la...@gmail.com>:
> yes, you're right... but If I look here:
> mvnrepository.com/artifact/org.apache.camel/camel-osgi
> the latest version is 2.3.0
> confused...
>
>
> On 03.02.2014 14:09, Charlie Mordant wrote:
>
> Hi,
>
> I think you're right in your interpretation!
>
> But, adding your dependency don't resolve the problem because 2.3.0 <
> 2.12.0
>
> Regards, Charlie
>
>
>
> 2014-02-03 Laci Gaspar <la...@gmail.com>:
>
>> Hi
>> I get the following error when I want to install bundle:
>> Error executing command: Error installing bundles:
>> Unable to start bundle
>> mvn:ch.curabill.msp.service/templateRoute/1.0-SNAPSHOT: Unresolved
>> constraint in bundle templateRoute [132]:Unable to resolve 132.0: missing
>> requirement [132.0]
>> osgi.wiring.package;(&(osgi.wiring.package=org.apache.camel.osgi)(version>=2.12.0)(!(version>=3.0.0)))
>>
>> First, how do I read such an error message?
>> Am I right in my interpretation that org.apache.camel.osgi is missing
>> with a 2.12.0 <= version < 3.0.0 ?
>>
>> I tried to add a dependency to my pom:
>> <dependency>
>> <groupId>org.apache.camel</groupId>
>> <artifactId>camel-osgi</artifactId>
>> <version>2.3.0</version>
>> </dependency>
>>
>> but that didn't help.
>>
>> Any help is appreciated.
>> Regards,
>> Laci
>>
>
>
>
--
Cordialement,
Charlie Mordant
Re: Unresolved constraint
Posted by Laci Gaspar <la...@gmail.com>.
yes, you're right... but If I look here:
mvnrepository.com/artifact/org.apache.camel/camel-osgi
the latest version is 2.3.0
confused...
On 03.02.2014 14:09, Charlie Mordant wrote:
> Hi,
>
> I think you're right in your interpretation!
>
> But, adding your dependency don't resolve the problem because 2.3.0 <
> 2.12.0
>
> Regards, Charlie
>
>
>
> 2014-02-03 Laci Gaspar <lacigas@gmail.com <ma...@gmail.com>>:
>
> Hi
> I get the following error when I want to install bundle:
> Error executing command: Error installing bundles:
> Unable to start bundle
> mvn:ch.curabill.msp.service/templateRoute/1.0-SNAPSHOT: Unresolved
> constraint in bundle templateRoute [132]:Unable to resolve 132.0:
> missing requirement [132.0]
> osgi.wiring.package;(&(osgi.wiring.package=org.apache.camel.osgi)(version>=2.12.0)(!(version>=3.0.0)))
>
> First, how do I read such an error message?
> Am I right in my interpretation that org.apache.camel.osgi is
> missing with a 2.12.0 <= version < 3.0.0 ?
>
> I tried to add a dependency to my pom:
> <dependency>
> <groupId>org.apache.camel</groupId>
> <artifactId>camel-osgi</artifactId>
> <version>2.3.0</version>
> </dependency>
>
> but that didn't help.
>
> Any help is appreciated.
> Regards,
> Laci
>
>
Re: Unresolved constraint
Posted by Charlie Mordant <cm...@gmail.com>.
Hi,
I think you're right in your interpretation!
But, adding your dependency don't resolve the problem because 2.3.0 < 2.12.0
Regards, Charlie
2014-02-03 Laci Gaspar <la...@gmail.com>:
> Hi
> I get the following error when I want to install bundle:
> Error executing command: Error installing bundles:
> Unable to start bundle mvn:ch.curabill.msp.service/templateRoute/1.0-SNAPSHOT:
> Unresolved constraint in bundle templateRoute [132]:Unable to resolve
> 132.0: missing requirement [132.0] osgi.wiring.package;(&(osgi.
> wiring.package=org.apache.camel.osgi)(version>=2.12.0)(!(version>=3.0.0)))
>
> First, how do I read such an error message?
> Am I right in my interpretation that org.apache.camel.osgi is missing with
> a 2.12.0 <= version < 3.0.0 ?
>
> I tried to add a dependency to my pom:
> <dependency>
> <groupId>org.apache.camel</groupId>
> <artifactId>camel-osgi</artifactId>
> <version>2.3.0</version>
> </dependency>
>
> but that didn't help.
>
> Any help is appreciated.
> Regards,
> Laci
>