Michael Vorburger created KARAF-5767:
----------------------------------------

             Summary: missing OSGi service for @Reference in Action does not 
lead to failed diag but 
                 Key: KARAF-5767
                 URL: https://issues.apache.org/jira/browse/KARAF-5767
             Project: Karaf
          Issue Type: Bug
          Components: karaf-shell
    Affects Versions: 4.2.0
            Reporter: Michael Vorburger


While [migrating a Karaf command from extending deprecated OsgiCommandSupport 
to implementing the Action 
interface|https://git.opendaylight.org/gerrit/#/c/72204], I've noticed that if 
you have a {{@Reference}} to a type under which there is no OSGi Service 
registered, then that command is simply ignored - without any error in the log.

While I understand perfectly well that this lazy initialiation is how 
Declarative Services (DS) work, because the bundle that provides said service 
could still be installed later, it still seems to me that {{diag}} (which is 
based on {{org.apache.karaf.bundle.core.BundleService}} AFAIK) could and in an 
ideal world should report such missing services.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to