karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christian Schneider (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (KARAF-4081) Karaf-Command 'diag' does not provide full information for Spring-DM bundles
Date Tue, 27 Oct 2015 13:50:28 GMT

    [ https://issues.apache.org/jira/browse/KARAF-4081?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14976412#comment-14976412

Christian Schneider commented on KARAF-4081:

I tested your jar file. When I do feature:install spring-dm and drop the jar in the deploy
folder I get this from diag:
karaf@root()> diag
Spring OSGi Bundle (52)
Status: Waiting
Spring DM
10/27/15 2:40 PM

So the main problem is that we do not get more detailed informations. I looked into the code
and found that we get a BootstrappingDependencyEvent in this case. This event contains a OsgiServiceDependency
where we can retrieve the bean name and the service it waits for. 

I added the necessary code and now I get 

karaf@root()> diag
Spring OSGi Bundle (52)
Status: Waiting
Spring DM
10/27/15 2:40 PM
Bean &messageEnvelope is wating for OSGi service with filter (objectClass=com.mycompany.springdmtest.SimpleMessageEnvelope)

Is that what you expected?

> Karaf-Command 'diag' does not provide full information for Spring-DM bundles
> ----------------------------------------------------------------------------
>                 Key: KARAF-4081
>                 URL: https://issues.apache.org/jira/browse/KARAF-4081
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf-shell
>    Affects Versions: 4.0.1
>         Environment: Linux (Mint 17.2)
>            Reporter: Kerry Billingham
>            Assignee: Christian Schneider
>            Priority: Minor
>         Attachments: springdmtest-1.0-SNAPSHOT.jar
> When using the Karaf commandline command 'diag' to diagnose a Spring-DM bundle, not all
diagnostic information is provided.
> For example, I have several Spring-DM enabled bundles which I wish to deploy in Karaf
however often I do not have their Spring-dependencies available. This means the bundles go
to the waiting state as can be seen with the 'list' command. As I am not the author of these
bundles I need to discovery easily exactly what dependencies are currently unavailable.
> Using the 'diag' command on the Spring-DM enabled bundles initially only states the bundle
is 'waiting' but it does not state what dependency it is waiting for. I understand that this
is a bug with Karaf 'diag' command, see link below.
> Currently the only way to resolve the issue is to either inspect the Karaf logs for bundle
startup or failure messages (which can be inconvenient if the logs are constantly updating
as in my case) or inspect the bundle itself.
> I can confirm I have the org.apache.karaf.bundle.springstate bundle installed. This issue
was raised following this Stack Overflow post:
> http://stackoverflow.com/questions/32936160/interrogate-osgi-spring-dm-framework-for-a-bundles-dependencies
> The issue can be re-created by deploying a Spring-DM enabled bundle into Karaf which
has a dependency on another Spring-DM enabled bundle but which is NOT made available.

This message was sent by Atlassian JIRA

View raw message