You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@karaf.apache.org by SapnaB <sa...@gmail.com> on 2014/06/02 08:01:36 UTC

Re: Karaf blueprint "Failure" while extending console

Hi,

I did use the maven-bundle-plugin to bundle the plugin and have the relevant
manifest now.
The build is successful, but when I try and start the bundle in karaf, I get
the following exception:

ERROR: Bundle org.apache.karaf.shell.samples.shell-sample-commands [98]
Error starting
mvn:org.apache.karaf.shell.samples/shell-sample-commands/1.0-SNAPSHOT
(org.osgi.framework.BundleException: Unresolved constraint in bundle
org.apache.karaf.shell.samples.shell-sample-commands [98]: Unable to resolve
98.0: missing requirement [98.0] osgi.wiring.package;
(&(osgi.wiring.package=org.apache.felix.karaf.shell.console)(version>=1.4.0)(!(version>=2.0.0))))
org.osgi.framework.BundleException: Unresolved constraint in bundle
org.apache.karaf.shell.samples.shell-sample-commands [98]: Unable to resolve
98.0: missing requirement [98.0] osgi.wiring.package;
(&(osgi.wiring.package=org.apache.felix.karaf.shell.console)(version>=1.4.0)(!(version>=2.0.0)))
        at
org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:3826)
        at org.apache.felix.framework.Felix.startBundle(Felix.java:1868)
        at
org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1191)
        at
org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:295)
        at java.lang.Thread.run(Thread.java:722)

Any pointers on how I can get rid of this exception and run the bundle
successfully?

Thanks in advance,
Sapna




--
View this message in context: http://karaf.922171.n3.nabble.com/Karaf-blueprint-Failure-while-extending-console-tp4029372p4033375.html
Sent from the Karaf - Dev mailing list archive at Nabble.com.

Re: Karaf blueprint "Failure" while extending console

Posted by SapnaB <sa...@gmail.com>.
Hi All,

Thanks for all the suggestions. I could now execute the bundle.

I uninstalled the existing erroneous bundle and installed again. That did
away with the incorrect dependency on
org.apache.*felix*.karaf.shell.console.

Regards,
Sapna





 



--
View this message in context: http://karaf.922171.n3.nabble.com/Karaf-blueprint-Failure-while-extending-console-tp4029372p4033379.html
Sent from the Karaf - Dev mailing list archive at Nabble.com.

Re: Karaf blueprint "Failure" while extending console

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
You use the 2.2.x manual with 2.1.x karaf bundle.

Upgrade to 2.3.x and it should work.

Regards
JB

On 06/02/2014 08:26 AM, SapnaB wrote:
> Hi JB,
>
> I used maven 3.2.1 (mvn archetype:create) to create the command bundle.
> Im usign Karaf 2.3.2 and the manual Im referring to is :
>
> http://karaf.apache.org/manual/latest-2.2.x/developers-guide/extending-console.html
>
> The maven dependency to karaf shell console is as below:
> <dependency>
>        <groupId>org.apache.karaf.shell</groupId>
>        <artifactId>org.apache.karaf.shell.console</artifactId>
>        <version>2.2.11</version>
>      </dependency>
>
> I guess I need to find out where the dependency to
> org.apache.*felix*.karaf.shell.console is coming from.
>
> Regards,
> Sapna
>
>
>
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/Karaf-blueprint-Failure-while-extending-console-tp4029372p4033377.html
> Sent from the Karaf - Dev mailing list archive at Nabble.com.
>

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: Karaf blueprint "Failure" while extending console

Posted by SapnaB <sa...@gmail.com>.
Hi JB,

I used maven 3.2.1 (mvn archetype:create) to create the command bundle.
Im usign Karaf 2.3.2 and the manual Im referring to is :

http://karaf.apache.org/manual/latest-2.2.x/developers-guide/extending-console.html

The maven dependency to karaf shell console is as below:
<dependency>
      <groupId>org.apache.karaf.shell</groupId>
      <artifactId>org.apache.karaf.shell.console</artifactId>
      <version>2.2.11</version>
    </dependency>

I guess I need to find out where the dependency to
org.apache.*felix*.karaf.shell.console is coming from.

Regards,
Sapna






--
View this message in context: http://karaf.922171.n3.nabble.com/Karaf-blueprint-Failure-while-extending-console-tp4029372p4033377.html
Sent from the Karaf - Dev mailing list archive at Nabble.com.

Re: Karaf blueprint "Failure" while extending console

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi,

the shell-sample-commands bundle seems very old (or not correct) as it 
reference the package org.apache.felix.karaf.shell.console in version 
1.4.0 and 2.0.0.

I would advice to take a look on the dev guide:
http://karaf.apache.org/manual/latest-2.3.x/developers-guide/extending-console.html 
for Karaf 2.3.x
http://karaf.apache.org/manual/latest/developers-guide/extending.html 
for Karaf 3.0.x

in the "manual creation" section.

I guess that you use the archetype to create the command bundle ? In 
this case, which version ?
I will take a look if the archetype is up to date.

As I said to another user yesterday, I also advice to take a look in the 
OSGi spec to understand what is wiring/package resolution and help to 
diagnostic this kind of exception.

Regards
JB

On 06/02/2014 08:01 AM, SapnaB wrote:
> Hi,
>
> I did use the maven-bundle-plugin to bundle the plugin and have the relevant
> manifest now.
> The build is successful, but when I try and start the bundle in karaf, I get
> the following exception:
>
> ERROR: Bundle org.apache.karaf.shell.samples.shell-sample-commands [98]
> Error starting
> mvn:org.apache.karaf.shell.samples/shell-sample-commands/1.0-SNAPSHOT
> (org.osgi.framework.BundleException: Unresolved constraint in bundle
> org.apache.karaf.shell.samples.shell-sample-commands [98]: Unable to resolve
> 98.0: missing requirement [98.0] osgi.wiring.package;
> (&(osgi.wiring.package=org.apache.felix.karaf.shell.console)(version>=1.4.0)(!(version>=2.0.0))))
> org.osgi.framework.BundleException: Unresolved constraint in bundle
> org.apache.karaf.shell.samples.shell-sample-commands [98]: Unable to resolve
> 98.0: missing requirement [98.0] osgi.wiring.package;
> (&(osgi.wiring.package=org.apache.felix.karaf.shell.console)(version>=1.4.0)(!(version>=2.0.0)))
>          at
> org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:3826)
>          at org.apache.felix.framework.Felix.startBundle(Felix.java:1868)
>          at
> org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1191)
>          at
> org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:295)
>          at java.lang.Thread.run(Thread.java:722)
>
> Any pointers on how I can get rid of this exception and run the bundle
> successfully?
>
> Thanks in advance,
> Sapna
>
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/Karaf-blueprint-Failure-while-extending-console-tp4029372p4033375.html
> Sent from the Karaf - Dev mailing list archive at Nabble.com.
>

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com