You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by jamie campbell <ja...@parit.ca> on 2010/01/02 22:45:16 UTC

how to analyze bundle status in karaf (or the felix shell)

I'm setting a system up in karaf, with local shell enabled.  One of the 
bundles (maven info, groupId: org.hibernate ; artifactId: 
com.springsource.org.hibernate.annotations ; version 3.4.0.GA) gets to 
the "installed" state, but doesn't get to active or resolved.

I've read the dependencies listed using 
http://www.springsource.com/repository/app/search , and verified they're 
satisfied.  I also went right to the pom and verified the dependencies 
listed there are satisfied.  I've also used the headers command in 
karaf, and verified that the import packages list is satisfied.  I read 
the mailing list archives for this list and googled, and had a brief bit 
of excitement thinking that "inspect package requirement" would be 
helpful, but it shows me nothing (literally bundle imports packages : 
nothing).

Is there a shell command of some sort I can use on a bundle id to tell 
me "this bundle is still waiting for requirements satisfaction of blah, 
blah, and blah" ?

-Jamie

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


Re: how to analyze bundle status in karaf (or the felix shell)

Posted by Chris Custine <ch...@gmail.com>.
At the moment, I resolve these types of issues by setting felix.log.level=4
in etc/config.properties (or if you are using the latest snapshot Karaf
builds you can use use the new "dev:framework --enable-debug" command and
then restart).  This will give you more information about the fragment
resolution issues when resolution fails.

In this particular case, you are running into
https://issues.apache.org/jira/browse/FELIX-1919 which has had some
discussion recently and hopefully we can find a solution at some point.
 Richard's first comment on the issue contains the specifics on why this
happens.

Thanks,
Chris

--
Chris Custine
FUSESource :: http://fusesource.com
My Blog :: http://blog.organicelement.com
Apache ServiceMix :: http://servicemix.apache.org
Apache Felix :: http://felix.apache.org
Apache Directory Server :: http://directory.apache.org


On Sat, Jan 2, 2010 at 2:45 PM, jamie campbell <ja...@parit.ca> wrote:

> I'm setting a system up in karaf, with local shell enabled.  One of the
> bundles (maven info, groupId: org.hibernate ; artifactId:
> com.springsource.org.hibernate.annotations ; version 3.4.0.GA) gets to the
> "installed" state, but doesn't get to active or resolved.
>
> I've read the dependencies listed using
> http://www.springsource.com/repository/app/search , and verified they're
> satisfied.  I also went right to the pom and verified the dependencies
> listed there are satisfied.  I've also used the headers command in karaf,
> and verified that the import packages list is satisfied.  I read the mailing
> list archives for this list and googled, and had a brief bit of excitement
> thinking that "inspect package requirement" would be helpful, but it shows
> me nothing (literally bundle imports packages : nothing).
>
> Is there a shell command of some sort I can use on a bundle id to tell me
> "this bundle is still waiting for requirements satisfaction of blah, blah,
> and blah" ?
>
> -Jamie
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>

Re: how to analyze bundle status in karaf (or the felix shell)

Posted by "Richard S. Hall" <he...@ungoverned.org>.
On 1/2/10 16:45, jamie campbell wrote:
> I'm setting a system up in karaf, with local shell enabled.  One of 
> the bundles (maven info, groupId: org.hibernate ; artifactId: 
> com.springsource.org.hibernate.annotations ; version 3.4.0.GA) gets to 
> the "installed" state, but doesn't get to active or resolved.
>
> I've read the dependencies listed using 
> http://www.springsource.com/repository/app/search , and verified 
> they're satisfied.  I also went right to the pom and verified the 
> dependencies listed there are satisfied.  I've also used the headers 
> command in karaf, and verified that the import packages list is 
> satisfied.  I read the mailing list archives for this list and 
> googled, and had a brief bit of excitement thinking that "inspect 
> package requirement" would be helpful, but it shows me nothing 
> (literally bundle imports packages : nothing).

Yeah, that only inspects the resolved state, so if the bundle is not 
resolved, then there is nothing to inspect.

> Is there a shell command of some sort I can use on a bundle id to tell 
> me "this bundle is still waiting for requirements satisfaction of 
> blah, blah, and blah" ?

No, it is even difficult to write such a command. A bundle may not be 
able to resolve not only because a dependency is missing, but because 
there are various constraint violations. If there are constraint 
violations, then there is often no single answer as to why the bundle is 
failing. The best you can get is a list of case in which it does fail. 
Unfortunately, the analysis to do this is basically equivalent to 
writing a full blown OSGi resolver, which isn't much fun, let me tell you.

For now, the best you can do is to try to start it and see why it 
complains. Try to fix its complaint and start it again. Repeat until 
successful.

In the future I might be willing to look into a better analysis tool, 
since I have been banging my head against the wall for a few weeks now 
for creating a new resolver algorithm implementation for the framework. 
I have made some progress, but still have some issues that are 
challenging me.

-> richard

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