Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Duplicate
-
Testing OSGi Mock 2.4.16
-
None
-
None
Description
Calling OsgiContext.registerInjectActivateService(T service,
java.util.Map<String, Object> properties) on a service with an activate method that has a signature in the style of:
protected void activate(Map<String, Object> props)
results in a RuntimeException:
java.lang.RuntimeException: Bind method with name bindAuthorizationService not found for reference 'authorizationService' for class <SERVICE_UNDER_TEST>
It seems that the framework expects a BundleContext to be present in the activate method's signature. I was able to work around this issue by updating the method signature to:
protected void activate(BundleContext bundleContext, Map<String, Object> props)
but ideally, we would be able to use either signature.
Attachments
Issue Links
- duplicates
-
SLING-7284 Extend OsgiServiceUtil#invokeBindUnbindMethod to support more DS 1.3+ method signatures
- Closed